aboutsummaryrefslogtreecommitdiff
path: root/test/common/odp_cunit_common.c
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2021-05-28 11:40:25 +0300
committerPetri Savolainen <petri.savolainen@nokia.com>2021-05-31 11:06:31 +0300
commit50d602b2c9d075d214ad443be0b68ab72d88869f (patch)
treea8144269ca0ad938f703be8d5f0647a8b8a146a6 /test/common/odp_cunit_common.c
parent52a9d393b37ddadb55bf1e7993402fcc578a416e (diff)
test: common: skip tests with CI_SKIP environment variable
Added function to help checking if a test case need to be skipped in CI. Skipped test case names are listed in CI_SKIP environment variable. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'test/common/odp_cunit_common.c')
-rw-r--r--test/common/odp_cunit_common.c14
1 files changed, 14 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;
+}