summaryrefslogtreecommitdiff
path: root/libparted/tests/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-04-09 22:20:08 +0200
committerJim Meyering <meyering@redhat.com>2011-04-14 11:34:38 +0200
commit785bdf1cad7c2a8b242f9bc514f670f13e214378 (patch)
tree3607fd982f362daf34d57e5d42a900b853e0d2c4 /libparted/tests/Makefile.am
parentbbe50a93b9fdffe35a1ee5bcb2320d746156914a (diff)
downloadparted-785bdf1cad7c2a8b242f9bc514f670f13e214378.tar.gz
tests: make the tests in libparted/tests work properly once again
Since switching to init.sh, the root-only tests did not clean up. * libparted/tests/Makefile.am (prereq): Always create a symlink to tests/init.sh. * tests/init.cfg: Source $abs_top_srcdir/tests-relative names, not $srcdir-relative names. This way, it works also when run from libparted/tests/. * tests/t-local.sh: Likewise.
Diffstat (limited to 'libparted/tests/Makefile.am')
-rw-r--r--libparted/tests/Makefile.am7
1 files changed, 7 insertions, 0 deletions
diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am
index f83264c..c967ef8 100644
--- a/libparted/tests/Makefile.am
+++ b/libparted/tests/Makefile.am
@@ -34,6 +34,13 @@ old-init.sh: Makefile.in
chmod a-w $@-t
mv $@-t $@
+# Arrange to symlink to tests/init.sh.
+CLEANFILES = init.sh
+.PHONY: prereq
+prereq:
+ $(AM_V_GEN)ln -sf $(abs_top_srcdir)/tests/init.sh .
+$(TEST_LOGS): prereq
+
TESTS_ENVIRONMENT = \
top_srcdir='$(top_srcdir)' \
abs_top_srcdir='$(abs_top_srcdir)' \