am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / self-check-me.tap
old mode 100755 (executable)
new mode 100644 (file)
index e89e150..b2b24f9
@@ -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
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Make sure that $me gets automatically defined by './defs'.
+# Make sure that $me gets automatically defined by 'test-init.sh'.
 
 am_create_testdir=no
-. ./defs || exit 1
+. test-init.sh
 
 plan_ 12
 
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-
 # This test becomes cumbersome if we keep the 'errexit' shell flag set.
 # And removing it is no big deal, as this test is a TAP-based one, so
 # that false positives remain very unlikely.
@@ -33,7 +31,7 @@ do_check ()
 {
   $AM_TEST_RUNNER_SHELL -c '
     am_create_testdir=no # Do not pollute the top-level directory.
-    . ./defs
+   . test-init.sh
     echo me=$me
   ' "$1" | grep "^me=$2$"
   command_ok_ "me=$1" test $? -eq 0
@@ -54,10 +52,10 @@ do_check abc. 'abc\.'
 s=$(me=bad $AM_TEST_RUNNER_SHELL -c '
   # Do not pollute the top-level directory.
   am_create_testdir=no
-  . ./defs
+ . test-init.sh
   echo me=$me
 ' foo.sh)
-command_ok_ "override of \$me before ./defs causes no error" \
+command_ok_ "override of \$me before test-init.sh causes no error" \
             test $? -eq 0
 
 r='ok'