am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / test-driver-custom.sh
old mode 100755 (executable)
new mode 100644 (file)
index ce4a7fc..0c9baf0
@@ -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
@@ -16,7 +16,7 @@
 
 # Custom test drivers: per-extension test drivers.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -41,7 +41,7 @@ LOG_DRIVER_FLAGS = _
 END
 
 mkdir sub bin
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
 
 cat > wrapper.skel <<'END'
 #! /bin/sh
@@ -124,8 +124,8 @@ $MAKE
 VERBOSE=yes $MAKE check
 ls -l . sub
 
-test ! -r BAD.log
-test ! -r BAD.trs
+test ! -e BAD.log
+test ! -e BAD.trs
 
 echo 'chk-wrapper 1.chk --am-chk --chk' > 1.exp
 echo 'test-wrapper 2.test -am-test -test' > 2.exp
@@ -140,4 +140,4 @@ for x in 1 2 3 4.c 5.suf sub/test; do
   diff $x.exp $x.log || st=1
 done
 
-Exit $st
+exit $st