Commit Graph

1747 Commits

Author SHA1 Message Date
Michael Hirsch
8a16a727f8 ctest_config: pass -S, -B args for log clarity
Fixes: #24135
2022-11-04 15:32:15 -04:00
Tobias Ribizel
59fcbba65e ctest_memcheck: ignore false-positives in CUDA's compute-sanitizer
Add a list of false-positive messages from CUDA's compute-sanitizer to
the CTest memcheck.

Fixes: #24001
2022-10-07 11:36:12 -04:00
Brad King
120945587f Merge topic 'ctest_ninja_full_output'
65260d6c1e ctest: only report make-level errors when no others are found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7710
2022-09-27 10:20:30 -04:00
Zack Galbreath
65260d6c1e ctest: only report make-level errors when no others are found
In commit ab9ad2a6a0 (ctest: report make-level errors to CDash when
using launchers, 2020-09-24, v3.19.0-rc1~84^2~1) we taught CTest to
capture and report errors from the build command when using launchers.

This had the unintended side effect of reporting a separate build error containing
the full build output when the build command returns non-zero. To fix this problem,
we now only report build command errors from CTest launchers when no other
more specific build errors are found.

Fixes: #23991
2022-09-26 09:40:58 -04:00
Brad King
29c0633793 Merge topic 'truncation_invalid'
bd30d20bc3 Tests: Add cases covering bad ctest output truncation types
dbf840392d ctest: print error for invalid CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7596
2022-09-09 09:52:06 -04:00
Frank Winklmeier
dbf840392d ctest: print error for invalid CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION
Print an error message for invalid values of
`CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` in a ctest dashboard script.
The option was added by commit 140704d443 (ctest: add option for
output truncation, 2022-03-07, v3.24.0-rc1~513^2).

Fixes: #23869
2022-09-07 11:52:03 -04:00
Alex Reinking
e2854b4fa2 cmCTestRunTest: Implement the ENVIRONMENT test property with EnvDiff too
Going through the same internal API for both `ENVIRONMENT` and
`ENVIRONMENT_MODIFICATION` properties will make it easier to implement
checkpointing for `MYVAR=reset:` more efficiently if the need ever
presents itself.  It also makes the two-stage nature of the environment
mutation clearer in the code itself.
2022-08-15 14:19:16 -04:00
Alex Reinking
bfa1c5285b cmSystemTools: Add EnvDiff class to hold ENVIRONMENT_MODIFICATION logic
Prepare to re-use this logic when enhancing `cmake -E env`.
2022-08-15 14:11:47 -04:00
Alex Reinking
a0b1c4ee90 cmCTestRunTest: Simplify by using GetSystemPathlistSeparator
Part of the implementation of `ENVIRONMENT_MODIFICATION` replicated the
logic in this function. Using it here de-duplicates code and will be
useful during the upcoming refactoring.
2022-08-15 14:11:20 -04:00
Alex Reinking
4e6cbb1f13 cmCTestRunTest: Remove unnecessary CMAKE_BOOTSTRAP guard
CTest is not compiled during CMake's `bootstrap` build.
2022-08-15 14:10:34 -04:00
Brad King
98cf623821 cmCTestHandlerCommand: Capture list of parsed keywords via binding 2022-07-25 13:52:11 -04:00
Brad King
f95a5832c7 cmArgumentParser: Drop unused keywordsMissingValue argument to Parse()
All clients have been converted to encoding this requirement in their
bindings.
2022-07-25 13:51:43 -04:00
Brad King
e6d1e29ffa cmArgumentParser: Model maybe-empty and non-empty lists with wrapper types
Previously bindings to `std::vector<std::string>` required at least one
value.  Some clients have been filtering `keywordsMissingValue` to
support keywords followed by empty lists.  Instead, require clients to
specify whether a keyword's list can be empty as part of the binding
type.
2022-07-07 09:48:58 -04:00
Brad King
2586afa31b cmCTest*Command:: Use cm::optional for keyword argument presence 2022-07-05 16:55:40 -04:00
Brad King
1ee5a4a548 cmArgumentParser: Avoid allocating copies of keyword strings 2022-07-05 16:34:57 -04:00
FeRD (Frank Dana)
98a10290a8 cmSystemTools: Fix 'ErrorOccurred' spelling
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.

Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
2022-06-13 09:05:24 -04:00
Ben Boeckel
b89c085237 clang-tidy: fix readability-static-definition-in-anonymous-namespace lints 2022-05-24 09:09:44 -04:00
Ben Boeckel
6ff03d463f clang-tidy: address google-readability-casting lints
At least those involving `static_cast`.
2022-05-24 09:09:43 -04:00
Ben Boeckel
9409e5c04f clang-tidy: address readability-container-data-pointer lints 2022-05-24 09:09:43 -04:00
Ben Boeckel
a5f8cbe8b1 clang-tidy: address modernize-use-default-member-init lints 2022-05-24 09:09:43 -04:00
Ben Boeckel
97220f5b3f cmCTestSubmitHandler: avoid double fetching envvars
Technically, they can change between these two calls, so use the
verified pointer to assign to strings. Discovered by `clang-analyzer`.
2022-05-21 17:23:19 -04:00
Ben Boeckel
f1d55ff7e9 style: use cmStrCat in some more locations 2022-05-19 15:54:28 -04:00
Martin Duffy
30336dab66 cmJSONHelpers: Restructure cmJSONHelpers
Restructure cmJSONHelpers to prevent SunPro errors when passing context.
2022-05-05 12:12:12 -04:00
Brad King
75e8173322 Source: Fix clang -Wunused-but-set-variable warnings 2022-04-06 16:02:05 -04:00
Brad King
ab5baa32ad Merge topic 'ctest-WORKING_DIRECTORY'
a116fd413d ctest: print WORKING_DIRECTORY property with -V

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7060
2022-03-10 08:39:33 -05:00
Kevin Puetz
a116fd413d ctest: print WORKING_DIRECTORY property with -V 2022-03-09 13:00:01 -06:00
Frank Winklmeier
140704d443 ctest: add option for output truncation
Add `--test-output-truncation` to `ctest`. This option can be used to
customize which part of the test output is being truncated. Currently
supported values are `tail`, `middle` and `head`.

Also add equivalent `CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variable.

Fixes: #23206
2022-03-08 08:18:02 -05:00
Frank Winklmeier
4634de335b cmCTestTestHandler: refactor CleanTestOutput method
Refactor the code to skip over UTF-8 multi-bytes into its own lambda
function so it can more easily be re-used.
2022-03-08 08:08:20 -05:00
Carsten Rudolph
b2f8f0bb87 cmGlobalVisualStudio10Generator: Auto restore NuGet packages. 2022-01-22 06:35:41 -05:00
Carsten Rudolph
193b8fca52 cmBuildOptions: Split build arguments into separate object. 2022-01-22 06:35:38 -05:00
Brad King
78c20892bf Merge topic 'ctest-add_subdirectory'
7c5a120c38 Tests: Add case covering both ctest subdirectory commands
04deda1d2a CTest: Extract common implementation of add_subdirectory and subdirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6795
2021-12-09 10:39:20 -05:00
friendlyanon
04deda1d2a CTest: Extract common implementation of add_subdirectory and subdirs
The two functions have basically the same functionality in a CTest
context, however the add_subdirectory implementation was missing code
for changing the current working directory similarly to how it was done
for subdirs. This commit extracts the common code and also fixes that
bug.

Issue: #22921
2021-12-08 11:36:43 -05:00
Brad King
7b677dbb92 cmListFileBacktrace: Remove unused "bottom" entry
All uses of `GetBottom` by clients have been removed, so drop the
method and its supporting infrastructure.
2021-12-08 10:03:48 -05:00
Rose
b86b6aaa4a Source: Cleanup and simplify some code 2021-11-04 09:20:48 -04:00
Rose
6f4727aaa0 Source: Replace C headers with C++ ones
In applicable areas only, of course.
2021-11-02 14:45:29 -04:00
Brad King
4c68a0e71a Merge topic 'envmod-test-modifying-existing'
9c4d6404eb Tests/Environment: also test modifying ambient values
7d52d48a32 cmCTestRunTest: get the default value from the environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6682
2021-11-01 09:08:11 -04:00
Ben Boeckel
7d52d48a32 cmCTestRunTest: get the default value from the environment
This only works due to some assumptions about how the `ENVIRONMENT`
property is processed. Comments have been added to notify anyone
modifying the behavior about where to look.

Fixes: #22819
2021-10-29 10:54:02 -04:00
Brad King
a956be4847 Merge topic 'warnings-cleanup'
7e4e192ce2 Source: fix clang-tidy modernize-redundant-void-arg warning
8d671dd94c Source: fix more -Wmissing-prototypes warnings
1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static
319944b3d2 Source: fix some -Wunused-macros warnings
5257d9e71a Source: fix only -Wshorten-64-to-32 warning with explicit cast

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6648
2021-10-27 09:24:54 -04:00
Brad King
9bb7982a15 Merge topic 'purge-sprintf'
b7e9cd05cd Replace the only non-standard _snprintf with snprintf
5ba6e8ac59 Source: Replace most calls to sprintf with snprintf

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6649
2021-10-27 09:23:17 -04:00
Brad King
ede11598ba Merge topic 'simplify-boolean-expressions'
dd918c517d Source: Simplify some boolean expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6654
2021-10-27 09:22:04 -04:00
Brad King
b33c67a6f7 Merge topic 'envmod-support-mod-to-new-variables'
69f95cf1d9 cmCTestRunTest: fix modifying non-existent envvars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6663
2021-10-27 09:20:46 -04:00
Ben Boeckel
69f95cf1d9 cmCTestRunTest: fix modifying non-existent envvars
When appending or modifying to a variable that has not been modified
before, the iterator was not valid, but it was used to insert into the
map again. Instead, just use indexing into the map since we know it will
exist by the end of the function anyways.

Fixes: #22796
2021-10-26 12:51:44 -04:00
Sean McBride
b7e9cd05cd Replace the only non-standard _snprintf with snprintf 2021-10-25 18:23:13 -04:00
Sean McBride
5ba6e8ac59 Source: Replace most calls to sprintf with snprintf 2021-10-25 18:23:13 -04:00
Sean McBride
8d671dd94c Source: fix more -Wmissing-prototypes warnings 2021-10-25 12:27:10 -04:00
Sean McBride
1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static 2021-10-25 12:27:09 -04:00
Sean McBride
319944b3d2 Source: fix some -Wunused-macros warnings
- deleted one unused define
- moved define into #if block where it is used
2021-10-25 12:27:08 -04:00
Rose
dd918c517d Source: Simplify some boolean expressions 2021-10-23 11:30:27 -04:00
Brad King
d723bac01c Merge topic 'lcc-compiler'
02b2607a5c Help: Add release note for MCST LCC compiler support
e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture
0995c75301 Tests/RPM: skip tests tat rely on debugedit if it's not found
ea55ac9a51 Tests/RunCMake/CommandLine: Deal with locales that are different from English

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6608
2021-10-19 09:22:22 -04:00
Brad King
e495f360b2 Merge topic 'ctest_submit-inactivity-timeout'
5d178fcc53 CTest: Add CTEST_SUBMIT_INACTIVITY_TIMEOUT variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6584
2021-10-18 09:27:14 -04:00