mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 23:50:42 +00:00
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.
This commit is contained in:
@@ -33,6 +33,12 @@ static inline bool streq_ptr(const char *a, const char *b) {
|
||||
return strcmp_ptr(a, b) == 0;
|
||||
}
|
||||
|
||||
static inline char* strstr_ptr(const char *haystack, const char *needle) {
|
||||
if (!haystack || !needle)
|
||||
return NULL;
|
||||
return strstr(haystack, needle);
|
||||
}
|
||||
|
||||
static inline const char* strempty(const char *s) {
|
||||
return s ?: "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user