aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-17 17:50:47 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-17 17:50:47 +0000
commit81564b60c7a9eb25e248681d92c95834e8d8a50d (patch)
tree9d0421b250afc19767611e48595226e51779e1ef
parent75e3b717da8cfbfdabdf26feb4cb202723738d7c (diff)
downloadpaludis-81564b60c7a9eb25e248681d92c95834e8d8a50d.tar.gz
paludis-81564b60c7a9eb25e248681d92c95834e8d8a50d.tar.xz
Fix test script setup to work with distcheck
-rw-r--r--paludis/Makefile.am.m42
-rw-r--r--paludis/args/Makefile.am1
-rw-r--r--test/Makefile.am4
-rwxr-xr-xtest/run_test.sh13
4 files changed, 11 insertions, 9 deletions
diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4
index a41e388..1399573 100644
--- a/paludis/Makefile.am.m4
+++ b/paludis/Makefile.am.m4
@@ -37,7 +37,7 @@ libpaludis_a_SOURCES = filelist
TESTS = testlist
-TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/test/run_test.sh
+TESTS_ENVIRONMENT = env TEST_SCRIPT_DIR="$(srcdir)/" $(SHELL) $(top_srcdir)/test/run_test.sh
check_PROGRAMS = $(TESTS)
check_SCRIPTS = testscriptlist
noinst_LIBRARIES = libpaludis.a
diff --git a/paludis/args/Makefile.am b/paludis/args/Makefile.am
index 884a1a6..30bc7dd 100644
--- a/paludis/args/Makefile.am
+++ b/paludis/args/Makefile.am
@@ -17,6 +17,7 @@ libpaludisargs_a_SOURCES = \
args_visitor.hh args_visitor.cc \
bad_value.hh bad_value.cc
+TESTS_ENVIRONMENT = env TEST_SCRIPT_DIR="$(srcdir)/" $(SHELL) $(top_srcdir)/test/run_test.sh
noinst_LIBRARIES = libpaludisargs.a
check_PROGRAMS = $(TESTS)
diff --git a/test/Makefile.am b/test/Makefile.am
index c0717a4..5b890a9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -12,10 +12,10 @@ libtest_a_SOURCES = \
XFAIL_TESTS = test_fail_TEST
TESTS = test_pass_TEST $(XFAIL_TESTS)
+TESTS_ENVIRONMENT = env TEST_SCRIPT_DIR="$(srcdir)/" $(SHELL) $(top_srcdir)/test/run_test.sh
check_LIBRARIES = libtest.a
check_PROGRAMS = $(TESTS) $(XFAIL_TESTS)
-
-TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/test/run_test.sh
+check_SCRIPTS = run_test.sh
test_pass_TEST_SOURCES = test_pass_TEST.cc
test_pass_TEST_LDADD = libtest.a
diff --git a/test/run_test.sh b/test/run_test.sh
index 0fa50f2..4d0df3d 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -1,9 +1,9 @@
#!/bin/sh
# vim: set ft=sh sw=4 sts=4 et :
-if test -f "$1"_"setup.sh" ; then
+if test -f "$TEST_SCRIPT_DIR""$1"_"setup.sh" ; then
echo ">>> setup for test $1"
- if ! "$1"_"setup.sh" ; then
+ if ! "$TEST_SCRIPT_DIR""$1"_"setup.sh" ; then
echo ">>> exiting with error for test $1"
exit 255
fi
@@ -11,17 +11,17 @@ fi
echo ">>> test $1"
if ! $1 ; then
- if test -f "$1"_"cleanup.sh" ; then
+ if test -f "$TEST_SCRIPT_DIR""$1"_"cleanup.sh" ; then
echo ">>> cleanup for test $1"
- "$1"_"cleanup.sh"
+ "$TEST_SCRIPT_DIR""$1"_"cleanup.sh"
fi
echo ">>> exiting with error for test $1"
exit 255
fi
-if test -f "$1"_"cleanup.sh" ; then
+if test -f "$TEST_SCRIPT_DIR""$1"_"cleanup.sh" ; then
echo ">>> cleanup for test $1"
- if ! "$1"_"cleanup.sh" ; then
+ if ! "$TEST_SCRIPT_DIR""$1"_"cleanup.sh" ; then
echo ">>> exiting with error for test $1"
exit 255
fi
@@ -30,3 +30,4 @@ fi
echo ">>> exiting with success for test $1"
exit 0
+