Commit Graph

112 Commits

Author SHA1 Message Date
Kyle Edwards
4568d046c4 Properties: Add CMAKE_ROLE global property
This property allows scripts to determine whether they're in project
mode, script mode, find-package mode, CTest, or CPack.
2019-01-17 09:44:29 -05:00
Kyle Edwards
b4444d6054 Tests: Split CPack DEB and RPM tests into smaller tests
The DEB and RPM tests are quite large, which can result in CTest
clients timing out on these tests even though they're working properly.
The RPM test in particular causes a lot of timeouts on the CMake
dashboard machines. This change splits these tests into smaller tests
so that they don't time out.
2019-01-10 13:56:35 -05:00
Kyle Edwards
450131cc0e Tests: Add infrastructure to split up large CPack tests
This allows CPack generator tests to be split into smaller tests of
the format "<generator>.<test>".
2019-01-10 13:56:35 -05:00
Nils Gladitz
4a3ae1710e CPack/External: Fix status messages of staging scripts
Set progress callback on cmake instance used by CPack.  The progress
callback is used to output STATUS messages which are otherwise missing
when issued from e.g. CPack External staging scripts.

Fixes: #18567
2018-12-07 07:33:30 -05:00
Craig Scott
20d5e77a27 CPack: Rename Ext generator to External
Ext and External were used inconsistently in the code and the
docs. This change converts all uses of Ext to External, including
within variable names used by the generator.
2018-11-05 07:56:03 -05:00
Andrew Fuller
d8a3939aef CPack/Deb: Add ability to split out debug symbols into .ddeb package 2018-09-21 20:19:31 +00:00
David Faure
7a7e94d6f7 CPack (DEB/RPM): add test for per-component description/summmary. 2018-08-30 22:08:11 +02:00
Nils Gladitz
4a0f664aaf CPackExt: Add CPACK_EXT_ENABLE_STAGING and CPACK_EXT_PACKAGE_SCRIPT
CPACK_EXT_ENABLE_STAGING enables optional staging
and CPACK_EXT_PACKAGE_SCRIPT allows to specify an optional
script file that can package staged files via an
external packaging tool.

Issue: #18236
2018-08-14 08:37:03 +02:00
Andrew Fuller
548ac51d8e CPack/Deb: Support SOURCE_DATE_EPOCH when packaging files 2018-07-25 13:39:07 -07:00
Kyle Edwards
36ef57a939 Tests: Add test for cmake --build . --target package 2018-07-17 09:07:10 -04:00
Kyle Edwards
2ef966bc77 Testing: Add test for CPack External generator
This test case ensures that the CPack External generator produces
the proper .json file, and also ensures that the version negotation
with CPACK_EXT_REQUESTED_VERSIONS works properly.
2018-07-02 09:51:02 -04:00
Luz Paz
3ab7bf8285 Various typo fixes
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Domen Vrankar
a2031d3a3a CPack/RPM: check executable flags for debuginfo packages
Debuginfo packages can not be created from programs and
shared libraries that do not have execute permissions.
2017-12-06 21:04:20 +01:00
Domen Vrankar
325f34d150 CPack tests: add possibility for expecting config developer warnings 2017-11-19 14:55:00 +01:00
Domen Vrankar
176281e131 CPack test: correctly handle CPACK_PACKAGING_INSTALL_PREFIX
Every CPack generator sets default CPACK_PACKAGING_INSTALL_PREFIX
variable value differently so test framework should support
that correctly - previous version expected RPM/Deb /usr default and
removed it for Archive packagers as the default there is /.
2017-11-19 14:55:00 +01:00
Domen Vrankar
7e896029cd CPack: enable setting default dir creation permissions
Introduces CPACK_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS
variable which adds support for functionality introduced
by CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable.

Fixes #17333

# Conflicts:
#	Help/release/dev/cmake-default-dir-install-permissions.rst
2017-11-08 20:27:11 +01:00
Domen Vrankar
a4c829167d CPack test: expand output checking fallback
Some tests can have the same output for a certain
subtest no matter which packaging generator is used.
2017-11-08 20:27:11 +01:00
luzpaz
777e87ae00 Fix trivial typos in text
Some are user facing.

Found using

    codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`

whereby the whitelist contained:

    ans
    dum
    helpfull
    emmited
    emmitted
    buil
    iff
    isnt
    nto
    ot
    pathes
    substract
    te
    todays
    upto
    whitespaces
2017-11-03 10:25:05 -04:00
Brad King
58e0692b62 Merge topic 'cpack-deb-0-so-version-support'
5784ab8f CPack/Deb: handle shlibs file generation when SOVERSION set to 0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1423
2017-10-30 08:55:36 -04:00
Brad King
e48397ee29 Merge topic 'cpack-rpm-dist-test-fix'
9ce00cae CPack/RPM: DIST-MONOLITHIC-type subtest fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1424
2017-10-30 08:52:48 -04:00
Domen Vrankar
9ce00caee3 CPack/RPM: DIST-MONOLITHIC-type subtest fix
Test was failing in case dist macro contained
a + symbol which is valid but must be escaped
for using the string as a regex.

Fixes #17328
2017-10-30 08:48:46 -04:00
Domen Vrankar
5784ab8fca CPack/Deb: handle shlibs file generation when SOVERSION set to 0
Setting CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS did not
auto generate shlibs control file when .so version
of the library was set to 0.

Fixes #17318
2017-10-29 00:20:54 +02:00
Domen Vrankar
529729d6e7 CPack/Deb: CPACK_DEBIAN_PACKAGE_VERSION regex testing exception
CPACK_DEBIAN_PACKAGE_VERSION variable could in the past also
contain release and epoch version so regex test should expect
the entire versioning if both CPACK_DEBIAN_PACKAGE_RELEASE
and CPACK_DEBIAN_PACKAGE_EPOCH are not set.
Also since the checks were not performed in the past the regex
test of CPACK_DEBIAN_PACKAGE_VERSION variable content should
only report author warnings instead of errors in case of the
test fail.

Fixes: #17339
2017-10-11 00:10:01 +02:00
Brad King
33eec57232 Merge topic 'cpack-rpm-deb-version'
74b7457f CPack RPM and DEB: improved package version handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1296
2017-09-22 10:14:49 -04:00
Domen Vrankar
74b7457f12 CPack RPM and DEB: improved package version handling
Adds support for epoch version to CPackRPM and
CPackDeb packagers.
Also adds better version checking to CPackDeb
that complies with Debian rules.

Fixes: #17057
2017-09-21 19:54:17 +02:00
Brad King
5737bb3756 Merge topic 'cpack-different-checksum-file-per-generator'
b06870e5 CPack: use a distinct checksum file for each generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1291
2017-09-21 08:19:52 -04:00
Domen Vrankar
b06870e5ff CPack: use a distinct checksum file for each generator
Different CPack generators could produce checksum files with the same
name which were overwritten by each other since only package name
without extensions was used for checksum file name generation.  This
patch adds package extension to checksum files to prevent collisions.

Fixes: #16840
2017-09-20 14:01:23 -04:00
Alex Turbov
091663395e CPack: Add missing check for CPACK_INSTALL_SCRIPT variable
Also add a test case that uses CPACK_INSTALL_SCRIPT.

Co-Author: Domen Vrankar <domen.vrankar@gmail.com>
Fixes: #15005
2017-09-20 13:33:22 -04:00
Domen Vrankar
80047bd611 CPack: extend testing framework
Some CPack tests require running
commands after the inclusion of
CPack.cmake and this patch enables
such tests to declare run_after_include_cpack
function which is run after the
inclusion.
2017-08-19 22:41:14 +02:00
Domen Vrankar
9e06e97d30 CPack/Archive: per component filenames support
Support for setting archive packager specific
per component filenames and monolithic package
filenames.
2017-05-17 00:47:15 +02:00
Domen Vrankar
2638406813 CPack test symlinks in package 2017-05-14 23:45:18 +02:00
Domen Vrankar
3eb0f08084 Improved CPack tests error logging 2017-05-14 23:45:18 +02:00
Brad King
89e2c92f54 Merge topic 'cpack-rpm-debuginfo-honor-package-filename'
f237f5f8 CPack/RPM: support for debuginfo package renaming
6c09c5d6 CPack/RPM honor package file name on debuginfo enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !620
2017-03-27 09:13:31 -04:00
Brad King
42b7d132a8 Merge topic 'cpack-rpm-tests-handle-build-id-links'
4ba065b2 CPack/RPM tests: handle build-id links

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !628
2017-03-27 09:09:42 -04:00
Domen Vrankar
4ba065b22b CPack/RPM tests: handle build-id links
Build id links generation was introduced
in rpm 4.13.0.1 so files related to them
should be ignored as they are not relevant
for the tests.

Fixes #16710
2017-03-27 09:08:24 -04:00
Domen Vrankar
f237f5f851 CPack/RPM: support for debuginfo package renaming 2017-03-25 15:25:55 +01:00
Domen Vrankar
6c09c5d64c CPack/RPM honor package file name on debuginfo enabled
Packages with debuginfo enabled should
still honor defined package file name
if file name is not set to RPM-DEFAULT.

Fixes #16715
2017-03-24 19:52:02 +01:00
Domen Vrankar
598400a3e7 CPack/RPM: handle extra slashes
Extra slashes in some locations can
cause errors during package generation
and can also be present in generated
rpm packages causing issues for the
package user.

Closes #16619
2017-03-13 23:22:55 +01:00
Domen Vrankar
624709c824 CPack/STGZ: minimalistic packages test 2017-01-22 22:07:16 +01:00
Domen Vrankar
af77368ed3 CPack/RPM test for using custom binary spec file 2017-01-10 18:47:52 +01:00
Brad King
c43cf158d7 Merge topic 'cpack-new-tests'
36bc7e4c store old locale to a temporary variable
05c14ea0 RunCMake.CPack_* add COMPONENT to minimal test
5b0a64eb CPack/Archive minimal tests for more formats
2017-01-10 09:34:55 -05:00
Brad King
2c8eb2696a Merge topic 'cpack-deb-md5sums-paths-fix'
6daa2d38 CPack/Deb invalid md5sums file fix
2017-01-10 09:34:52 -05:00
Domen Vrankar
adbf72280d CPack test additional std out/err regex file overloads
Added std out/std err expected regex file name
overloads for packaging type.
2017-01-10 08:40:16 +01:00
Domen Vrankar
6daa2d384e CPack/Deb invalid md5sums file fix
Monolithic deb packages were packaged
with invalid md5sums file as trailing
slash in path was causing string replace
to fail and preserve build path.

Fixes #16517
2016-12-23 21:10:52 +01:00
Domen Vrankar
05c14ea0a9 RunCMake.CPack_* add COMPONENT to minimal test
Add component based packages testing to current
monolithic minimal package tests.
2016-12-23 21:03:05 +01:00
Domen Vrankar
5b0a64ebc5 CPack/Archive minimal tests for more formats 2016-12-23 21:01:38 +01:00
Harry Mallon
a5a6f61be3 CPackRPM now supports multiple directives in CPACK_RPM_USER_FILELIST
* In older version "%dir %attr(-, root, root) foo" would put "%dir foo"
  in the final spec file.
* Also added comment to describe this and advise not not to add trailing
  slashes to directories in USER_FILELIST.
* Includes test in RunCMake CPack which now passes.
2016-12-03 20:39:05 +01:00
Domen Vrankar
50c3ebb903 Tests: CPack test documentation facelift 2016-11-27 23:20:35 +01:00
Domen Vrankar
a8a4709808 Tests: CPack/DEB test change prerequirements check
Prerequirements should be searched for in
generator prerequirements function and only
checked for presence in configure file in
per test prerequirements function.
2016-11-27 23:20:35 +01:00
Domen Vrankar
48456535f3 Tests: source CPack tests don't require build stage 2016-11-27 23:20:35 +01:00