Tell cmake to get SKIP_TEST_SUITES from ENV

If the variable SKIP_TEST_SUITES is not defined with -D, but is defined
in an environment variable, tell cmake to get it from there.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann
2022-11-28 10:18:05 +00:00
parent 0f1bdea5f1
commit 04f25fc3fe

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".