Parcourir la source

[trac606] make sure distclean works for a separate builddir,
even if systest itself cannot be run for such build environment.
also added an explicit check about the assumption in conf.sh with
an error message explaining what's wrong.

JINMEI Tatuya il y a 14 ans
Parent
commit
f3bd834c8e
3 fichiers modifiés avec 10 ajouts et 3 suppressions
  1. 1 1
      Makefile.am
  2. 2 2
      tests/system/Makefile.am
  3. 7 0
      tests/system/conf.sh.in

+ 1 - 1
Makefile.am

@@ -80,7 +80,7 @@ cppcheck:
 # system tests
 systest:
 	cd tests/system; \
-	sh runall.sh
+	sh $(abs_srcdir)/tests/system/runall.sh
 
 #### include external sources in the distributed tarball:
 EXTRA_DIST = ext/asio/README

+ 2 - 2
tests/system/Makefile.am

@@ -1,5 +1,5 @@
 systest:
-	sh runall.sh
+	sh $(srcdir)/runall.sh
 
 distclean-local:
-	sh cleanall.sh
+	sh $(srcdir)/cleanall.sh

+ 7 - 0
tests/system/conf.sh.in

@@ -20,6 +20,13 @@
 # other shell scripts.
 #
 
+# Prerequisite check
+if [ @srcdir@ != @builddir@ ]; then
+	echo "Currently systest doesn't work for a separate build tree."
+	echo "Rebuild BIND 10 on the source tree and run the tests."
+	exit 1
+fi
+
 # Find the top of the source tree.
 TOP=@abs_top_srcdir@