Merge pull request #6736 from davidhorstmann-arm/2.28-cmake-get-skip-test-from-env

[backport 2.28] Tell cmake to get SKIP_TEST_SUITES from ENV
This commit is contained in:
Dave Rodgman
2022-12-06 18:38:51 +00:00
committed by GitHub

View File

@@ -26,6 +26,10 @@ endif()
# on non-POSIX platforms.
add_definitions("-D_POSIX_C_SOURCE=200809L")
# If SKIP_TEST_SUITES is not defined with -D, get it from the environment.
if((NOT DEFINED SKIP_TEST_SUITES) AND (DEFINED ENV{SKIP_TEST_SUITES}))
set(SKIP_TEST_SUITES $ENV{SKIP_TEST_SUITES})
endif()
# Test suites caught by SKIP_TEST_SUITES are built but not executed.
# "foo" as a skip pattern skips "test_suite_foo" and "test_suite_foo.bar"
# but not "test_suite_foobar".