am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / test-trs-basic.sh
old mode 100755 (executable)
new mode 100644 (file)
index 42456b4..a7f77d5
@@ -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
@@ -18,7 +18,7 @@
 #  - creation and removal of '.trs' auxiliary files
 #  - check some internals regarding the use of '.trs' files.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
@@ -68,11 +68,11 @@ for vpath in : false; do
   $srcdir/configure
 
   $MAKE tb
-  test x"`cat tb`" = x"foo bar sub/zardoz"
+  test x"$(cat tb)" = x"foo bar sub/zardoz"
   rm -f tb
   # Please don't change the order of the stuff in TESTS, below.
-  TESTS='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' $MAKE -e tb
-  test x"`cat tb`" = x"foo foo2 foo-log foolog a.log.b 0.exe"
+  run_make TESTS='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' tb
+  test x"$(cat tb)" = x"foo foo2 foo-log foolog a.log.b 0.exe"
   rm -f tb
 
   cd $srcdir
@@ -92,22 +92,22 @@ test -f foo.trs
 test -f bar.trs
 test -f sub/zardoz.trs
 $MAKE clean
-test ! -f foo.trs
-test ! -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e foo.trs
+test ! -e bar.trs
+test ! -e sub/zardoz.trs
 # Unrelated '.trs' files shouldn't be removed.
 test -f unrelated.trs
 test -f sub/foo.trs
 
 # The files should be properly created in case of testsuite failure too.
-FOO_STATUS=1 $MAKE check && Exit 1
+FOO_STATUS=1 $MAKE check && exit 1
 test -f foo.trs
 test -f bar.trs
 test -f sub/zardoz.trs
 $MAKE mostlyclean
-test ! -f foo.trs
-test ! -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e foo.trs
+test ! -e bar.trs
+test ! -e sub/zardoz.trs
 # Unrelated '.trs' files shouldn't be removed.
 test -f unrelated.trs
 test -f sub/foo.trs
@@ -116,20 +116,20 @@ test -f sub/foo.trs
 # Try with a subset of TESTS.
 #
 
-TESTS=foo.test $MAKE -e check
+run_make TESTS=foo.test check
 test -f foo.trs
-test ! -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e bar.trs
+test ! -e sub/zardoz.trs
 $MAKE clean
-test ! -f foo.trs
-TESTS='foo.test bar.sh' $MAKE -e check
+test ! -e foo.trs
+run_make TESTS='foo.test bar.sh' check
 test -f foo.trs
 test -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e sub/zardoz.trs
 # "make clean" shouldn't remove '.trs' files for tests not in $(TESTS).
-TESTS=bar.sh $MAKE -e clean
+run_make TESTS=bar.sh clean
 test -f foo.trs
-test ! -f bar.trs
+test ! -e bar.trs
 
 $MAKE clean
 
@@ -137,21 +137,21 @@ $MAKE clean
 # Try with a subset of TEST_LOGS.
 #
 
-TEST_LOGS=sub/zardoz.log $MAKE -e check
-test ! -f foo.trs
-test ! -f bar.trs
+run_make TEST_LOGS=sub/zardoz.log check
+test ! -e foo.trs
+test ! -e bar.trs
 test -f sub/zardoz.trs
 $MAKE clean
-test ! -f sub/zardoz.trs
-TEST_LOGS='foo.log bar.log' $MAKE -e check
+test ! -e sub/zardoz.trs
+run_make TEST_LOGS='foo.log bar.log' check
 test -f foo.trs
 test -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e sub/zardoz.trs
 # "make clean" shouldn't remove '.trs' files for tests whose log
 # is not in $(TEST_LOGS).
-TEST_LOGS=foo.log $MAKE -e clean
-test ! -f foo.trs
+run_make TEST_LOGS=foo.log clean
+test ! -e foo.trs
 test -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e sub/zardoz.trs
 
 :