Rename $TEST_DIR to $SYSTEMD_TEST_DATA, document it

TEST_DIR is rather generic, and we prefix all variables used by installed
executables with "SYSTEMD_".
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-02-16 21:36:31 +01:00
committed by Martin Pitt
parent 3e29e810ae
commit 94fa1497ba
4 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ const char* get_exe_relative_testdata_dir(void) {
assert_se(readlink_and_make_absolute("/proc/self/exe", &exedir) >= 0);
assert_se(snprintf(testdir, sizeof(testdir), "%s/testdata", dirname(exedir)) > 0);
if (access(testdir, F_OK) < 0) {
fprintf(stderr, "Test data directory '%s' does not exist, set $TEST_DIR\n", testdir);
fprintf(stderr, "Test data directory '%s' does not exist, set $SYSTEMD_TEST_DATA\n", testdir);
exit(1);
}
return testdir;
+1 -1
View File
@@ -43,4 +43,4 @@
)
#define TEST_DATA_DIR(subdir) \
strjoina(getenv("TEST_DIR") ?: get_exe_relative_testdata_dir(), subdir)
strjoina(getenv("SYSTEMD_TEST_DATA") ?: get_exe_relative_testdata_dir(), subdir)