From 2025f0f602b2ce7f90cdaaef6b219d1dbd1515b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 8 Nov 2019 16:40:11 +0100 Subject: [PATCH] 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. --- src/test/test-execute.c | 5 +++++ src/test/test-helper.c | 5 ----- src/test/test-helper.h | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 57a4b1c282..957cc2e384 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -37,6 +37,11 @@ static int cld_dumped_to_killed(int 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) { Service *service = NULL; usec_t ts; diff --git a/src/test/test-helper.c b/src/test/test-helper.c index dc8c80a14b..9e9de0132f 100644 --- a/src/test/test-helper.c +++ b/src/test/test-helper.c @@ -28,8 +28,3 @@ 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"); -} diff --git a/src/test/test-helper.h b/src/test/test-helper.h index 81e19ee207..6e886ae3de 100644 --- a/src/test/test-helper.h +++ b/src/test/test-helper.h @@ -5,8 +5,6 @@ Copyright © 2013 Holger Hans Peter Freyther ***/ -#include - #include "sd-daemon.h" #define TEST_REQ_RUNNING_SYSTEMD(x) \ @@ -17,5 +15,3 @@ } int enter_cgroup_subroot(void); - -bool is_run_on_travis_ci(void);