diff options
Diffstat (limited to 'src/test/test-helper.c')
-rw-r--r-- | src/test/test-helper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-helper.c b/src/test/test-helper.c index 9cf9972380..5b79d12f07 100644 --- a/src/test/test-helper.c +++ b/src/test/test-helper.c @@ -4,6 +4,7 @@ #include "random-util.h" #include "alloc-util.h" #include "cgroup-util.h" +#include "string-util.h" int enter_cgroup_subroot(void) { _cleanup_free_ char *cgroup_root = NULL, *cgroup_subroot = NULL; @@ -27,3 +28,8 @@ int enter_cgroup_subroot(void) { return cg_attach_everywhere(supported, cgroup_subroot, 0, NULL, NULL); } + +/* https://docs.travis-ci.com/user/environment-variables#default-environment-variables */ +bool is_run_on_travis_ci(void) { + return streq_ptr(getenv("TRAVIS"), "true"); +} |