test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / conff.sh
old mode 100755 (executable)
new mode 100644 (file)
index b6f9081..bebed77
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 # Make sure rebuild rules work even when AC_CONFIG_FILES uses colons.
 # Report from Alexander Turbov.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
@@ -47,11 +47,9 @@ $AUTOMAKE
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot rule' stdout
 cd ..
 
@@ -64,11 +62,9 @@ END
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot rule' stdout
 cd ..
 
@@ -81,11 +77,9 @@ END
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot2 rule' stdout
 cd ..