summaryrefslogtreecommitdiff
path: root/src/shared/tests.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-10-21 11:29:00 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-10-22 13:16:26 +0200
commit4eb0c875f8825199a829ddc597874915fbee0a84 (patch)
treee3a828fd5066c6b542e21026ce141105b33df760 /src/shared/tests.h
parentb8ee3493a54794ca1bbd84d62b4d9f7041fcfddc (diff)
downloadsystemd-4eb0c875f8825199a829ddc597874915fbee0a84.tar.gz
tests: add helper function to autodetect CI environments
Sadly there is no standarized way to check if we're running in some CI environment. So let's try to gather the heuristics in one helper function.
Diffstat (limited to 'src/shared/tests.h')
-rw-r--r--src/shared/tests.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/tests.h b/src/shared/tests.h
index 505ca39775..552e0f2c22 100644
--- a/src/shared/tests.h
+++ b/src/shared/tests.h
@@ -40,3 +40,6 @@ bool can_memlock(void);
} else { \
printf("systemd not booted skipping '%s'\n", #x); \
}
+
+/* Provide a convenient way to check if we're running in CI. */
+const char *ci_environment(void);