tests: make is_run_on_travis_ci() static
This is a pretty specific hack, so let's just define it close to the one place where it is used.
This commit is contained in:
parent
5eecb1030f
commit
2025f0f602
|
@ -37,6 +37,11 @@ static int cld_dumped_to_killed(int code) {
|
||||||
return code == CLD_DUMPED ? CLD_KILLED : code;
|
return code == CLD_DUMPED ? CLD_KILLED : code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_unused_ static bool is_run_on_travis_ci(void) {
|
||||||
|
/* https://docs.travis-ci.com/user/environment-variables#default-environment-variables */
|
||||||
|
return streq_ptr(getenv("TRAVIS"), "true");
|
||||||
|
}
|
||||||
|
|
||||||
static void wait_for_service_finish(Manager *m, Unit *unit) {
|
static void wait_for_service_finish(Manager *m, Unit *unit) {
|
||||||
Service *service = NULL;
|
Service *service = NULL;
|
||||||
usec_t ts;
|
usec_t ts;
|
||||||
|
|
|
@ -28,8 +28,3 @@ int enter_cgroup_subroot(void) {
|
||||||
|
|
||||||
return cg_attach_everywhere(supported, cgroup_subroot, 0, NULL, NULL);
|
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");
|
|
||||||
}
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
Copyright © 2013 Holger Hans Peter Freyther
|
Copyright © 2013 Holger Hans Peter Freyther
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include "sd-daemon.h"
|
#include "sd-daemon.h"
|
||||||
|
|
||||||
#define TEST_REQ_RUNNING_SYSTEMD(x) \
|
#define TEST_REQ_RUNNING_SYSTEMD(x) \
|
||||||
|
@ -17,5 +15,3 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
int enter_cgroup_subroot(void);
|
int enter_cgroup_subroot(void);
|
||||||
|
|
||||||
bool is_run_on_travis_ci(void);
|
|
||||||
|
|
Loading…
Reference in a new issue