diff options
-rw-r--r-- | test/common/odp_cunit_common.c | 14 | ||||
-rw-r--r-- | test/common/odp_cunit_common.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/common/odp_cunit_common.c b/test/common/odp_cunit_common.c index 790c361f6..f5c437344 100644 --- a/test/common/odp_cunit_common.c +++ b/test/common/odp_cunit_common.c @@ -555,3 +555,17 @@ int odp_cunit_ret(int val) { return allow_skip_result ? 0 : val; } + +int odp_cunit_ci_skip(const char *test_name) +{ + const char *ci_skip; + const char *found; + + ci_skip = getenv("CI_SKIP"); + if (ci_skip == NULL) + return 0; + + found = strstr(ci_skip, test_name); + + return found != NULL; +} diff --git a/test/common/odp_cunit_common.h b/test/common/odp_cunit_common.h index 567d75592..3e06ba10c 100644 --- a/test/common/odp_cunit_common.h +++ b/test/common/odp_cunit_common.h @@ -107,6 +107,9 @@ int odp_cunit_ret(int val); int odp_cunit_print_inactive(void); int odp_cunit_set_inactive(void); +/* Check from CI_SKIP environment variable if the test case should be skipped by CI */ +int odp_cunit_ci_skip(const char *test_name); + /* * Wrapper for CU_ASSERT_FATAL implementation to show the compiler that * the function does not return if the assertion fails. This reduces bogus |