summaryrefslogtreecommitdiff
path: root/src/shared/tests.h
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2018-09-12 00:23:40 -0700
committerFilipe Brandenburger <filbranden@google.com>2018-09-12 09:49:03 -0700
commit49cdae63d168b2fe0e19f9f090b90d79de3c39bb (patch)
tree9a5225262ab5e987d64fd81417fca50f17f47661 /src/shared/tests.h
parente2d413707fc68ed033a83e10a055ca638a1e1e18 (diff)
downloadsystemd-49cdae63d168b2fe0e19f9f090b90d79de3c39bb.tar.gz
test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR
This makes it so that tests no longer need to know the absolute paths to the source and build dirs, instead using the systemd-runtest.env file to get these paths when running from the build tree. Confirmed that test-catalog works on `ninja test`, when called standalone and also when the environment file is not present, in which case it will use the installed location under /usr/lib/systemd/catalog. The location can now also be overridden for this test by setting the $SYSTEMD_CATALOG_DIR environment variable.
Diffstat (limited to 'src/shared/tests.h')
-rw-r--r--src/shared/tests.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/tests.h b/src/shared/tests.h
index da4155ee17..0d5e6a8386 100644
--- a/src/shared/tests.h
+++ b/src/shared/tests.h
@@ -2,5 +2,5 @@
#pragma once
char* setup_fake_runtime_dir(void);
-bool test_is_running_from_builddir(char **exedir);
const char* get_testdata_dir(void);
+const char* get_catalog_dir(void);