Commit Graph

108 Commits

Author SHA1 Message Date
Brad King
d91c02e40f Tests: Factor out RunCMake helper to get UNIX user id 2023-11-30 17:05:00 -05:00
Brad King
e0765c2c46 Tests: Teach RunCMake to ignore Xcode DVTAssertions warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] DVTAssertions: Warning ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2023-09-26 10:04:07 -04:00
Orkun Tokdemir
10b09647f2 RunCMake: Add RunCMake_TEST_EXPECT_RESULT 2023-09-13 15:59:57 +02:00
Brad King
a8c50d6faf Merge topic 'orkun_21677_16_06_2023'
09b650d000 Autogen: Move QtAutoMocDeps tests to RunCMake/Autogen
ebc9e448b3 Autogen: Add depfile support for Makefiles
e5358b9d8d RunCMake: Add RunCMake_TEST_NOT_EXPECT variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8570
2023-09-13 08:42:55 -04:00
Kyle Edwards
34d46acfc8 Tests/RunCMake: Set $ENV{PWD} before each test
This will more accurately emulate how a shell would run CMake.

Also, don't set $ENV{PWD} in Tests/RunCMake/SymlinkTrees, since RunCMake is
now already doing this.
2023-09-11 16:58:14 -04:00
Orkun Tokdemir
e5358b9d8d RunCMake: Add RunCMake_TEST_NOT_EXPECT variables 2023-09-11 14:51:58 +02:00
Brad King
efadf839be Tests: Teach RunCMake to ignore LLVMFlang -flang-experimental-exec warning
This flag is needed for now to tell `flang-new` to support creating
executables.  In our CI job we always pass this flag, but it is not
always used.  The compiler may warn:

    flang-new: warning: argument unused during compilation: '-flang-experimental-exec'

Teach RunCMake to drop such incidental lines before matching against
expected output.
2023-05-09 09:23:36 -04:00
Brad King
c78be340ba Tests: Teach RunCMake to ignore Intel Fortran remark 10440
The Intel Fortran compiler may remark:

    ifx: remark #10440: Note that use of a debug option without any
    optimization-level option will turnoff most compiler optimizations
    similar to use of '-O0'

Teach RunCMake to drop such incidental lines before matching against
expected output.

This extends commit b2d030e8fe (Tests: Teach RunCMake to ignore Intel
-Rdebug-disables-optimization remarks, 2022-06-14, v3.26.0-rc1~395^2)
to cover the `ifx` Fortran compiler too.
2023-05-09 09:09:12 -04:00
Brad King
28dd02c3ba Merge topic 'autogen-system-include'
7bf4e30090 Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set
033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property
8ba16db163 Tests/RunCMake: Add option for dynamic expected output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8400
2023-05-04 09:01:08 -04:00
Brad King
1b7649604e Tests: Teach RunCMake to ignore Intel Classic deprecation on Windows
Extend commit 29e45a94b0 (Tests: Teach RunCMake to ignore Intel Classic
compiler deprecation warnings, 2022-10-03, v3.25.0-rc1~51^2~1) to cover
warnings from `icl` too.
2023-05-01 15:51:21 -04:00
Orkun Tokdemir
8ba16db163 Tests/RunCMake: Add option for dynamic expected output
Add `RunCMake_TEST_EXPECT_*` variables for this.
2023-04-27 12:19:28 -04:00
Brad King
fbdb509efe Merge topic 'vs-sdk-selection'
8ecb645934 VS: Select Windows SDK matching WindowsSDKVersion env var
f90c8ab54e VS: Select latest available Windows SDK version by default
b512c53d43 VS: Add support for setting WindowsTargetPlatformVersion to 10.0
2f3d945f83 VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selection
f0a67b6291 VS: Parse comma-separated fields from CMAKE_GENERATOR_PLATFORM
e259063b0a VS: Defer Windows SDK selection until CMAKE_GENERATOR_PLATFORM is known
8499374c6a VS: Simplify logic to require SDK for Windows Store
1c8d4b4bf1 Tests: Teach RunCMake_TEST_FILTER to account for test variant description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8389
2023-04-06 09:13:31 -04:00
Brad King
1c8d4b4bf1 Tests: Teach RunCMake_TEST_FILTER to account for test variant description 2023-04-05 12:06:13 -04:00
Brad King
39b6e87b1d Merge topic 'test-xcode-14.3'
3bb46b29fd Tests: Teach RunCMake to ignore Xcode DVTCoreDeviceEnabledState warnings

Merge-request: !8392
2023-04-04 14:28:01 -04:00
Brad King
3bb46b29fd Tests: Teach RunCMake to ignore Xcode DVTCoreDeviceEnabledState warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default

Teach RunCMake to drop such incidental lines before matching against
expected output.
2023-04-04 13:00:07 -04:00
Brad King
9fd0ecdedb Tests: Fix RunCMake infrastructure for LCC and CMP0129
Since commit 3958ed878f (LCC: Add policy CMP0129 regarding interpreting
LCC as GNU, 2021-10-19, v3.23.0-rc1~508^2) we intended to enable policy
`CMP0129` in RunCMake tests via `-DCMAKE_POLICY_DEFAULT_CMP0129=NEW`.
Fix the condition activating that to check `CMAKE_C_COMPILER_ID` where
it is always available.

Remove now-unnecessary CMP0129 settings in RunCMake cases.
2023-04-03 09:42:22 -04:00
Brad King
3a4791548d Deprecate compatibility with CMake versions older than 3.5
Issue a deprecation warning on calls to `cmake_minimum_required` or
`cmake_policy` that set policies based on versions older than 3.5.
Note that the effective policy version includes `...<max>` treatment.
Update the check from commit 5845c218d7 (Deprecate compatibility with
CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
2023-02-11 06:25:11 -05:00
Brad King
3092b14ed0 Tests: Teach RunCMake to optionally ignore policy version deprecation warnings
Avoid requiring tests for deprecated behavior to match the warnings
explicitly.
2023-02-09 16:20:31 -05:00
Matthew Woehlke
746c776caf ConfigureLog: Add infrastructure for structured configure event logging
Add infrastructure for a "configure log".  Use YAML for a balance of
machine- and human-readability to records details of configure-time
events in a structured format.

Teach the RunCMake test framework to support matching the configure log.

Issue: #23200
2022-12-16 10:11:37 -05:00
Matthew Woehlke
e8b8d82cbf Tests: Generalize RunCMake expectation component names
Do not assume all the component names start in "std".

Co-authored-by: Brad King <brad.king@kitware.com>
2022-12-14 11:42:29 -05:00
Brad King
b2d030e8fe Tests: Teach RunCMake to ignore Intel -Rdebug-disables-optimization remarks
The Intel compiler may remark:

    icpx: remark: Note that use of '-g' without any optimization-level
    option will turn off most compiler optimizations similar to use of
    '-O0' [-Rdebug-disables-optimization]

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-10-27 08:17:54 -04:00
Brad King
29e45a94b0 Tests: Teach RunCMake to ignore Intel Classic compiler deprecation warnings 2022-10-03 17:51:11 -04:00
Alex Turbov
a509602699 Build: Modernize some foreach calls to use IN LISTS/IN ITEMS 2022-09-22 09:24:46 -04:00
Brad King
aafa598e24 Merge topic 'xcode-14'
627c08e28b Tests: Teach RunCMake to ignore Xcode DVTSDK warnings
ab40020b17 Xcode: Suppress "Run Script" build phase warning during compiler id
89e1113e0c Xcode: Use ad-hoc signing during compiler id on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7350
2022-06-11 05:39:11 -04:00
Brad King
65f2e9263c Merge branch 'xcode-14' into release-3.23
Merge-request: !7350
2022-06-11 05:37:53 -04:00
Brad King
627c08e28b Tests: Teach RunCMake to ignore Xcode DVTSDK warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...]  [MT] DVTSDK: Warning: SDK path collision for path ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-06-10 14:24:03 -04:00
Brad King
7e4d6bbe02 Merge topic 'ci-xcode-13.3' into release-3.23
65b6daf776 gitlab-ci: update macOS jobs to use Xcode 13.3
94361a1309 Tests: Ignore all classes in Xcode internal objc warnings
da9f864513 Tests: Teach RunCMake to ignore Xcode extension point warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7204
2022-04-26 11:12:51 -04:00
Gregor Jasny
94361a1309 Tests: Ignore all classes in Xcode internal objc warnings
Xcode on Apple Silicon warns not only about AMSupportURL classes
but also many more.
2022-04-25 15:52:15 -04:00
Brad King
da9f864513 Tests: Teach RunCMake to ignore Xcode extension point warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] Requested but did not find extension point with
                        identifier ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-04-25 14:35:11 -04:00
Brad King
4471f2b0d7 Merge topic 'xcode-pch' into release-3.23
476c6a8910 PCH: Fix Xcode non-pch language exclusion
fcf1fcfd0c Tests: Ignore all classes in Xcode internal objc warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7166
2022-04-12 08:10:47 -04:00
Gregor Jasny
fcf1fcfd0c Tests: Ignore all classes in Xcode internal objc warnings
Xcode on Apple Silicon warns not only about AMSupportURL classes
but also many more.
2022-04-11 14:15:52 -04:00
Gregor Jasny
183b6bbf51 Tests: Ignore all classes in Xcode internal objc warnings
Xcode on Apple Silicon warns not only about AMSupportURL classes
but also many more.
2022-04-03 22:39:17 +02:00
Brad King
af5e4e44ca Tests: Teach RunCMake to ignore lld-link PDB item index warnings
In commit fade5b5b8c (gitlab-ci: Update Windows builds to MSVC 19.31
toolset, 2022-03-09, v3.23.0-rc3~4^2~1) we switched from MSVC toolset
version 14.30.30705 to version 14.31.31103.  The latter causes the
Clang 13.0.0 lld-link tool to warn about invalid PDB item indexes, as
discussed [here](https://developercommunity.visualstudio.com/t/1667797).

This causes the RunCMake.PrecompileHeaders test PchLibObjLibExe case to
fail on NMake builds due to unexpected content on stderr.  The warnings
appear with Ninja too, but `ninja` prints them on stdout.  Teach the
RunCMake infrastructure to ignore these warnings.
2022-03-11 09:41:45 -05:00
Brad King
4ee96f6e77 Merge topic 'test-RunCMake-xcodebuild-incidental'
6ade07ef89 Tests: Teach RunCMake to ignore Xcode extension point warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6992
2022-02-17 08:46:53 -05:00
Brad King
67f97f5478 Tests: Add RunCMake helper to run cmake with raw execute_process args 2022-02-16 12:10:19 -05:00
Brad King
6ade07ef89 Tests: Teach RunCMake to ignore Xcode extension point warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] Requested but did not find extension point with
                        identifier ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-02-16 11:21:54 -05:00
makise-homura
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU
Due to MCST LCC compiler identification is now changed to LCC,
there should be a way for old projects to still identify it as GNU,
as it was before.
This commits adds the policy:
CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU.
This policy controls such a behavior.
OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
2021-10-21 17:24:22 +03:00
Gregor Jasny
a7bbbbf73b Tests: ignore Xcode DVTPlugInManager output 2021-06-10 22:50:06 +02:00
Orgad Shaneh
ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Brad King
efcdec9a19 Merge topic 'nmc-cc-no-output'
6dd89529e8 Ninja Multi-Config: Fix crash on custom command config with no output
e21a80e97d Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5950
2021-03-30 09:50:48 -04:00
Brad King
e21a80e97d Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output
Ninja versions prior to 1.6.0 occasionally print this message.
2021-03-29 09:55:57 -04:00
Brad King
8dd8d63665 Tests: Add RunCMake hook to describe test variants 2021-03-22 13:26:29 -04:00
Brad King
e8065554a8 Tests: Teach RunCMake to always print the command on failure
Previously we only printed explicit `RunCMake_TEST_COMMAND` cases on
failure.  Refactor the RunCMake infrastructure so that we always define
`RunCMake_TEST_COMMAND` internally, and print it on failure.
2021-03-09 07:43:29 -05:00
Brad King
5f03744e36 Tests: Move RunCMake option construction closer to use 2021-03-09 07:35:18 -05:00
Brad King
f4d154755a Tests: Reverse RunCMake code path order 2021-03-09 07:35:18 -05:00
Brad King
adc351db8f Tests: Add RunCMake helper to run a plain script
Many tests covering CMake scripting commands can work without
initializing a full generator.
2021-03-03 16:41:30 -05:00
Brad King
d33c2c93d8 Tests: Update for upstream ninja change to write status on stderr
Upstream ninja commit `ad3d29fb53` (Put builder output through status
interface) from ninja PR 1899 changed the status output from stdout to
stderr.  In particular, `ninja: no work to do` is now printed on stderr.
Update our RunCMake tests to accept this difference.

A few RunCMake test cases check for `ninja: no work to do`.  For those,
move the message to stdout using `RunCMake_TEST_OUTPUT_MERGE`.  The rest
of the test cases do not care about the message, so remove it from the
actual stderr content before comparing against that expected.
2021-02-23 10:55:12 -05:00
Brad King
928ca50b6f Tests: Teach RunCMake to ignore Xcode install_name_tool signature warnings
The `install_name_tool` may warn:

    install_name_tool: warning: changes being made to the file will
    invalidate the code signature in: ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2020-11-24 14:33:59 -05:00
Brad King
383e81aa60 Tests: Teach RunCMake to ignore Xcode internal objc warnings
Xcode on Apple Silicon warns:

    objc[...]: Class AMSupportURL... is implemented in both ...
    One of the two will be used. Which one is undefined.

Teach RunCMake to drop such lines before matching against expected
output.
2020-09-30 11:58:44 -04:00
Gregor Jasny
16692f4926 Apple: suppress Xcode 12 ranlib warning
The Xcode 12 (Beta) toolchain for arm64 emits a warning when static
libraries are created:

```
ranlib: archive member: libStaticLib.a(a.c.o) offset in archive not a multiple of 8 (must be since member is an 64-bit object file)
```

Due to the unexpected output multiple tests are broken. To make those
tests pass we filter the problematic output in the test driver.

See: https://developer.apple.com/forums/thread/652620
2020-07-17 15:42:26 +02:00