test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / remake-subdir-long-time.sh
old mode 100755 (executable)
new mode 100644 (file)
index 8f31740..cf03335
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
@@ -21,7 +21,7 @@
 # an explicit delay in the build process.
 # Suggestion by Ralf Wildenhues.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -38,7 +38,7 @@ mkdir sub
 # Both aclocal and automake are expected to run one and just one time.
 # Create and use wrappers that will verify that.
 
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
 mkdir bin
 
@@ -93,14 +93,14 @@ rm -f automake-has-run aclocal-has-run
 
 ./configure
 # Sanity check: Makefile doesn't get updated uselessly.
-ACLOCAL=false AUTOMAKE=false AUTOCONF=false $MAKE -e
+run_make ACLOCAL=false AUTOMAKE=false AUTOCONF=false
 
 $sleep
 sed "s|magic|magic2|" configure.ac > t
 mv -f t configure.ac
 
 cd sub
-AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL" $MAKE -e Makefile
+run_make Makefile AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL"
 cd ..
 
 # For debugging.