am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / check5.sh
old mode 100755 (executable)
new mode 100644 (file)
index 31790f8..5351ff8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-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,8 +16,9 @@
 
 # Test TESTS = $(check_PROGRAMS)
 
+# For gen-testsuite-part: ==> try-with-serial-tests <==
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -31,9 +32,8 @@ check-local:
        test -f one$(EXEEXT)
        test -f two$(EXEEXT)
        touch ok
-.PHONY: print-tests
-print-tests:
-       echo BEG: $(TESTS) :END
+expect-tests:
+       is $(TESTS) == one$(EXEEXT) two$(EXEEXT)
 END
 
 $ACLOCAL
@@ -51,11 +51,10 @@ cp one.c two.c
 ./configure
 $MAKE check
 test -f ok
-EXEEXT=.bin $MAKE -e print-tests >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEG: one.bin two.bin :END' stdout
+run_make expect-tests
+run_make expect-tests EXEEXT=.bin
 # No am__EXEEXT_* variable is needed.
-grep '_EXEEXT_[1-9]' Makefile.in && Exit 1
+grep '_EXEEXT_[1-9]' Makefile.in && exit 1
 $FGREP 'TESTS = $(check_PROGRAMS)' Makefile.in
 
 :