summaryrefslogtreecommitdiff
path: root/meson.build
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 /meson.build
parente2d413707fc68ed033a83e10a055ca638a1e1e18 (diff)
downloadsystemd-49cdae63d168b2fe0e19f9f090b90d79de3c39bb.tar.gz
systemd-49cdae63d168b2fe0e19f9f090b90d79de3c39bb.tar.bz2
systemd-49cdae63d168b2fe0e19f9f090b90d79de3c39bb.zip
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 'meson.build')
-rw-r--r--meson.build4
1 files changed, 2 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index ed91d1a4db..a97c5fcffc 100644
--- a/meson.build
+++ b/meson.build
@@ -207,6 +207,7 @@ conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir)
conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', join_paths(pkgdatadir, 'kbd-model-map'))
conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', join_paths(pkgdatadir, 'language-fallback-map'))
conf.set_quoted('SYSTEMD_TEST_DATA', join_paths(testsdir, 'testdata'))
+conf.set_quoted('SYSTEMD_CATALOG_DIR', catalogdir)
conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
conf.set_quoted('POLKIT_AGENT_BINARY_PATH', join_paths(bindir, 'pkttyagent'))
conf.set_quoted('LIBDIR', libdir)
@@ -222,8 +223,6 @@ conf.set_quoted('DOCUMENT_ROOT', join_paths(pkgdata
conf.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'true' : 'false')
conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO', memory_accounting_default ? 'yes' : 'no')
-conf.set_quoted('ABS_BUILD_DIR', meson.build_root())
-
substs.set('prefix', prefixdir)
substs.set('exec_prefix', prefixdir)
substs.set('libdir', libdir)
@@ -2612,6 +2611,7 @@ custom_target(
output : 'systemd-runtest.env',
command : ['sh', '-c', '{ ' +
'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(meson.current_source_dir(), 'test')) +
+ 'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(meson.current_build_dir(), 'catalog')) +
'} >@OUTPUT@'],
build_by_default : true)