summaryrefslogtreecommitdiffstats
path: root/tools/regression/usr.bin
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-31 14:13:07 +0000
committerharti <harti@FreeBSD.org>2005-05-31 14:13:07 +0000
commit316b5bf77691ab3a6e083b20d92a9cf0d6113cf3 (patch)
tree8fadeb40f8b4f59b7bf77d2e8290da809f57ffef /tools/regression/usr.bin
parentaf75a9a411c3b49fa93d7178cd9b3abdcb35770d (diff)
downloadFreeBSD-src-316b5bf77691ab3a6e083b20d92a9cf0d6113cf3.zip
FreeBSD-src-316b5bf77691ab3a6e083b20d92a9cf0d6113cf3.tar.gz
Change the test infrastructure so that tests are easier to maintain and
so that make(1) will run in an almost clean environment and enhance the description of the test infrastructure. Add the ability to have multiple tests carried out per test script. Give some tests more meaningful names. Fix the usage message from the test scripts. Make it possible to pass several commands to the test scripts like: 'sh test.t setup run compare clean'.
Diffstat (limited to 'tools/regression/usr.bin')
-rw-r--r--tools/regression/usr.bin/make/README194
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/Makefile (renamed from tools/regression/usr.bin/make/archives/t0/Makefile)30
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.1 (renamed from tools/regression/usr.bin/make/archives/t0/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.2 (renamed from tools/regression/usr.bin/make/archives/t1/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.3 (renamed from tools/regression/usr.bin/make/archives/t2/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.4 (renamed from tools/regression/usr.bin/make/basic/t1/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.5 (renamed from tools/regression/usr.bin/make/basic/t0/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.6 (renamed from tools/regression/usr.bin/make/basic/t3/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.7 (renamed from tools/regression/usr.bin/make/shell/builtin/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.1 (renamed from tools/regression/usr.bin/make/basic/t0/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.2 (renamed from tools/regression/usr.bin/make/basic/t1/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.3 (renamed from tools/regression/usr.bin/make/basic/t1/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.4 (renamed from tools/regression/usr.bin/make/basic/t2/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.51
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.6 (renamed from tools/regression/usr.bin/make/archives/t2/expected.stderr)1
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.71
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.1 (renamed from tools/regression/usr.bin/make/basic/t3/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.2 (renamed from tools/regression/usr.bin/make/shell/builtin/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.3 (renamed from tools/regression/usr.bin/make/shell/meta/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.4 (renamed from tools/regression/usr.bin/make/shell/path/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.5 (renamed from tools/regression/usr.bin/make/shell/path_select/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.6 (renamed from tools/regression/usr.bin/make/shell/replace/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.7 (renamed from tools/regression/usr.bin/make/shell/select/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/libtest.a (renamed from tools/regression/usr.bin/make/archives/t0/libtest.a)bin2104 -> 2104 bytes
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd/test.t17
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/Makefile (renamed from tools/regression/usr.bin/make/archives/t1/Makefile)30
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.1 (renamed from tools/regression/usr.bin/make/basic/t2/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.2 (renamed from tools/regression/usr.bin/make/shell/select/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.3 (renamed from tools/regression/usr.bin/make/suffixes/t0/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.4 (renamed from tools/regression/usr.bin/make/suffixes/t1/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.5 (renamed from tools/regression/usr.bin/make/shell/meta/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.6 (renamed from tools/regression/usr.bin/make/shell/path/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.7 (renamed from tools/regression/usr.bin/make/shell/path_select/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.1 (renamed from tools/regression/usr.bin/make/suffixes/t0/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.2 (renamed from tools/regression/usr.bin/make/suffixes/t1/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.3 (renamed from tools/regression/usr.bin/make/suffixes/t2/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.4 (renamed from tools/regression/usr.bin/make/variables/t0/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.51
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.61
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.71
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.1 (renamed from tools/regression/usr.bin/make/variables/t1/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.20
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.30
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.40
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.50
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.60
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.70
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/libtest.a (renamed from tools/regression/usr.bin/make/archives/t1/libtest.a)bin2104 -> 2104 bytes
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_44bsd_mod/test.t17
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/Makefile (renamed from tools/regression/usr.bin/make/archives/t2/Makefile)30
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.1 (renamed from tools/regression/usr.bin/make/suffixes/t2/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.2 (renamed from tools/regression/usr.bin/make/variables/t0/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.3 (renamed from tools/regression/usr.bin/make/variables/t1/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.41
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.51
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.6 (renamed from tools/regression/usr.bin/make/shell/replace/expected.status)0
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.71
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.20
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.30
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.40
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.50
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.61
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.71
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.10
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.20
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.30
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.40
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.50
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.60
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.70
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/libtest.a (renamed from tools/regression/usr.bin/make/archives/t2/libtest.a)bin2016 -> 2016 bytes
-rw-r--r--tools/regression/usr.bin/make/archives/fmt_oldbsd/test.t17
-rw-r--r--tools/regression/usr.bin/make/archives/t0/expected.stderr3
-rw-r--r--tools/regression/usr.bin/make/archives/t0/expected.stdout7
-rw-r--r--tools/regression/usr.bin/make/archives/t0/test.t18
-rw-r--r--tools/regression/usr.bin/make/archives/t1/expected.stderr3
-rw-r--r--tools/regression/usr.bin/make/archives/t1/expected.stdout7
-rw-r--r--tools/regression/usr.bin/make/archives/t1/test.t18
-rw-r--r--tools/regression/usr.bin/make/archives/t2/expected.stdout7
-rw-r--r--tools/regression/usr.bin/make/archives/t2/test.t18
-rw-r--r--tools/regression/usr.bin/make/basic/t0/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/basic/t0/expected.stderr.1 (renamed from tools/regression/usr.bin/make/basic/t0/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/basic/t0/expected.stdout.10
-rw-r--r--tools/regression/usr.bin/make/basic/t0/test.t18
-rw-r--r--tools/regression/usr.bin/make/basic/t1/Makefile5
-rw-r--r--tools/regression/usr.bin/make/basic/t1/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/basic/t1/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/basic/t1/expected.stdout.10
-rw-r--r--tools/regression/usr.bin/make/basic/t1/test.t17
-rw-r--r--tools/regression/usr.bin/make/basic/t2/Makefile6
-rw-r--r--tools/regression/usr.bin/make/basic/t2/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/basic/t2/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/basic/t2/expected.stdout.1 (renamed from tools/regression/usr.bin/make/basic/t2/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/basic/t2/test.t18
-rw-r--r--tools/regression/usr.bin/make/basic/t3/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/basic/t3/expected.stderr.1 (renamed from tools/regression/usr.bin/make/basic/t3/expected.stderr)0
-rw-r--r--tools/regression/usr.bin/make/basic/t3/expected.stdout.10
-rw-r--r--tools/regression/usr.bin/make/basic/t3/test.t15
-rw-r--r--tools/regression/usr.bin/make/common.sh493
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/Makefile14
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/expected.status.21
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/expected.stderr1
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/expected.stderr.20
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/expected.stdout.11
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/expected.stdout.21
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/sh (renamed from tools/regression/usr.bin/make/shell/builtin/sh.sh)0
-rw-r--r--tools/regression/usr.bin/make/shell/builtin/test.t16
-rw-r--r--tools/regression/usr.bin/make/shell/meta/Makefile12
-rw-r--r--tools/regression/usr.bin/make/shell/meta/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/shell/meta/expected.status.21
-rw-r--r--tools/regression/usr.bin/make/shell/meta/expected.stderr1
-rw-r--r--tools/regression/usr.bin/make/shell/meta/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/shell/meta/expected.stderr.20
-rw-r--r--tools/regression/usr.bin/make/shell/meta/expected.stdout.11
-rw-r--r--tools/regression/usr.bin/make/shell/meta/expected.stdout.21
-rw-r--r--tools/regression/usr.bin/make/shell/meta/sh (renamed from tools/regression/usr.bin/make/shell/meta/sh.sh)0
-rw-r--r--tools/regression/usr.bin/make/shell/meta/test.t16
-rw-r--r--tools/regression/usr.bin/make/shell/path/Makefile17
-rw-r--r--tools/regression/usr.bin/make/shell/path/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/shell/path/expected.status.21
-rw-r--r--tools/regression/usr.bin/make/shell/path/expected.stderr1
-rw-r--r--tools/regression/usr.bin/make/shell/path/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/shell/path/expected.stderr.20
-rw-r--r--tools/regression/usr.bin/make/shell/path/expected.stdout.11
-rw-r--r--tools/regression/usr.bin/make/shell/path/expected.stdout.21
-rw-r--r--tools/regression/usr.bin/make/shell/path/sh (renamed from tools/regression/usr.bin/make/shell/path/sh.sh)0
-rw-r--r--tools/regression/usr.bin/make/shell/path/test.t19
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/Makefile15
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/expected.status.21
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/expected.stderr1
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/expected.stderr.20
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/expected.stdout.11
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/expected.stdout.21
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/shell (renamed from tools/regression/usr.bin/make/shell/path_select/sh.sh)0
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/test.t18
-rw-r--r--tools/regression/usr.bin/make/shell/replace/Makefile14
-rw-r--r--tools/regression/usr.bin/make/shell/replace/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/shell/replace/expected.status.21
-rw-r--r--tools/regression/usr.bin/make/shell/replace/expected.stderr1
-rw-r--r--tools/regression/usr.bin/make/shell/replace/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/shell/replace/expected.stderr.20
-rw-r--r--tools/regression/usr.bin/make/shell/replace/expected.stdout.13
-rw-r--r--tools/regression/usr.bin/make/shell/replace/expected.stdout.26
-rw-r--r--tools/regression/usr.bin/make/shell/replace/shell (renamed from tools/regression/usr.bin/make/shell/replace/sh.sh)0
-rw-r--r--tools/regression/usr.bin/make/shell/replace/test.t16
-rw-r--r--tools/regression/usr.bin/make/shell/select/Makefile17
-rw-r--r--tools/regression/usr.bin/make/shell/select/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/shell/select/expected.status.21
-rw-r--r--tools/regression/usr.bin/make/shell/select/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/shell/select/expected.stderr.20
-rw-r--r--tools/regression/usr.bin/make/shell/select/expected.stdout.11
-rw-r--r--tools/regression/usr.bin/make/shell/select/expected.stdout.2 (renamed from tools/regression/usr.bin/make/shell/select/expected.stdout)1
-rw-r--r--tools/regression/usr.bin/make/shell/select/test.t15
-rw-r--r--tools/regression/usr.bin/make/suffixes/basic/Makefile (renamed from tools/regression/usr.bin/make/suffixes/t0/Makefile)4
-rw-r--r--tools/regression/usr.bin/make/suffixes/basic/TEST1.a (renamed from tools/regression/usr.bin/make/suffixes/t0/TEST1.a)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/basic/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/suffixes/basic/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/suffixes/basic/expected.stdout.1 (renamed from tools/regression/usr.bin/make/suffixes/t0/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/basic/test.t21
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild1/Makefile (renamed from tools/regression/usr.bin/make/suffixes/t1/Makefile)2
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild1/TEST1.a (renamed from tools/regression/usr.bin/make/suffixes/t1/TEST1.a)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild1/TEST2.a (renamed from tools/regression/usr.bin/make/suffixes/t1/TEST2.a)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild1/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild1/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild1/expected.stdout.1 (renamed from tools/regression/usr.bin/make/suffixes/t1/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild1/test.t21
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild2/Makefile (renamed from tools/regression/usr.bin/make/suffixes/t2/Makefile)5
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild2/TEST1.a (renamed from tools/regression/usr.bin/make/suffixes/t2/TEST1.a)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild2/TEST2.a (renamed from tools/regression/usr.bin/make/suffixes/t2/TEST2.a)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild2/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild2/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild2/expected.stdout.1 (renamed from tools/regression/usr.bin/make/suffixes/t2/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/suffixes/src_wild2/test.t21
-rw-r--r--tools/regression/usr.bin/make/suffixes/t0/test.t30
-rw-r--r--tools/regression/usr.bin/make/suffixes/t1/test.t30
-rw-r--r--tools/regression/usr.bin/make/suffixes/t2/test.t30
-rw-r--r--tools/regression/usr.bin/make/variables/modifier_M/Makefile (renamed from tools/regression/usr.bin/make/variables/t1/test.t)23
-rw-r--r--tools/regression/usr.bin/make/variables/modifier_M/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/variables/modifier_M/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1 (renamed from tools/regression/usr.bin/make/variables/t1/expected.stdout)0
-rw-r--r--tools/regression/usr.bin/make/variables/modifier_M/test.t11
-rw-r--r--tools/regression/usr.bin/make/variables/t0/Makefile23
-rw-r--r--tools/regression/usr.bin/make/variables/t0/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/variables/t0/expected.stderr.10
-rw-r--r--tools/regression/usr.bin/make/variables/t0/expected.stdout31
-rw-r--r--tools/regression/usr.bin/make/variables/t0/expected.stdout.115
-rw-r--r--tools/regression/usr.bin/make/variables/t0/test.t33
192 files changed, 910 insertions, 623 deletions
diff --git a/tools/regression/usr.bin/make/README b/tools/regression/usr.bin/make/README
index 351d541..624434a 100644
--- a/tools/regression/usr.bin/make/README
+++ b/tools/regression/usr.bin/make/README
@@ -2,28 +2,68 @@ $FreeBSD$
This directory contains regression tests for make(1).
-The tests are invoked via the test.sh script or prove(1) from p5-Test-Harness
+To invoke the tests install prove(1) from ports/devel/p5-Test-Harness and
+run 'prove -r'. Alternatively one can use 'sh ./all.sh test' and scan the
+output for '^not ok'.
- % test.sh [-v] [-m path_to_make_binary] command
+----------------------------------------------------------------------------
- clean - Remove the results and the other temp files that
- are produced by running the test. This brings the
- test into its initial state.
+The rest of this file is intented for developers.
- compare - Check if results of the test match the expected
- output from stdout, stderr, and the status.
+The tests are invoked via the test.sh script or prove(1) from p5-Test-Harness.
+Tests are normally executed in a special test directory that is built under
+/tmp. The reason for this is, that make tests are generally influenced by
+all file in a directory, by files in one of make's obscure object directories
+as well as in other directories make happens to look into. Therefor the
+test scripts build a clean environment in the temp directory and the
+tests are executed by cd-ing into that directory and invoking make. The
+output of the make run (standard output, standard error and the exit status)
+are written into files that are created in another directory. So the layout
+for the shell/builtin test looks like:
- desc - print description of test
+ ./shell/builtin/ - directory with test stuff
+ /tmp/make.${USER}/shell/builtin - actual test directory
+ /tmp/make.${USER}/shell/builtin.OUTPUT - output files
- diff - Output the diffs from the tests and the expected
- stdout, stderr, and the status files.
+So a full test consists of the following steps:
- run - Invoke test, compare, and clean in sequence.
+ setup - Set up the test environment by creating the test directory
+ and populating it with the needed files. If the test
+ directory already exists an error is printed.
- test - Invoke the test code
+ run - Run the test and produce the output into the output
+ directory.
- update - Copy the output of the last test run as the expected
- output from stdout, stderr, and the status.
+ show - Show the result files on the screen.
+
+ compare - Compare the results in the output directory with those
+ in the test source directory. This just prints whether
+ the test was ok or not in the format used by prove(1).
+
+ diff - Diff the output files and the expected output files.
+
+ reset - Reset the test to its initial state.
+
+ clean - Remove both the test directory and the output directory.
+
+Each of these steps can independently be invoked with the test script
+contained in each directory. These test scripts are called test.t.
+Additionally the scripts understand the following commands:
+
+ test - Run setup, run and compare.
+
+ prove - Run setup, run, compare and clean. This is identically
+ to invoking the script without an argument.
+
+ desc - Print a short test description.
+
+ update - Update the expected results from the actual results.
+
+The test script has the following syntax:
+
+ % test.t [-v] [-m path_to_make_binary] command
+
+To invoke it via prove(1) use:
% [MAKE_PROG=path_to_make_binary] prove [options] [files/directories]
@@ -31,30 +71,102 @@ Example:
% sh test.t -m `pwd`/../obj/make run
% MAKE_PROG=/usr/obj/usr/src/usr.bin/make/make prove -r
-Variables
----------
-WORK_BASE - base directory for working files
-SRC_BASE - test source base directory
-SUBDIR - subdirectory below WORK_BASE and SRC_BASE for current test
-WORK_DIR - ${WORK_BASE}/${SUBDIR}
-SRC_DIR - ${SRC_BASE}/${SUBDIR}
-MAKE_PROG - path to the make program to test
-
-WORK_BASE and MAKE_PROG are intented to be set by the user. All other
-variables are set by the script and can be used in scripts.
-
-Directory layout
-----------------
-common.sh - common code
-all.sh - recursively call test scripts
-
-basic/
- t0/test.t - regression test
- t1/test.t - regression test
- t2/test.t - regression test
-variables/
- t0/test.t - regression test
- t1/test.t - regression test
-
-Each test directory should contain at least a test.t script
-and the expected output files.
+The test scripts use the following environment variables that can be set
+by the user in the test script's environment:
+
+ WORK_BASE
+ - Base directory for working files. If not set
+ /tmp/make.${USER} is used.
+
+ MAKE_PROG
+ - Path to the make program to test. If not set
+ /usr/bin/make is used.
+
+The following variables are available to test scripts:
+
+ SRC_BASE
+ - test source base directory. This is determined by
+ repeatedly doing cd .. and checking for common.sh.
+ Therefor this can fail if a test source directory is
+ actually a symbolic link and is physically not located
+ below the directory containing common.sh.
+
+ SUBDIR
+ - subdirectory below WORK_BASE and SRC_BASE for current test
+
+ WORK_DIR
+ - ${WORK_BASE}/${SUBDIR}
+
+ SRC_DIR
+ - ${SRC_BASE}/${SUBDIR}
+
+The following variables and functions may be defined by the test script.
+This also lists special filenames.
+
+ DESC
+ A one-line description of the test.
+
+ TEST_MAKE_DIRS
+ A list of pairs of directory names and modes. These
+ directories are created during setup and reset. When
+ the directory already exists (during reset) only the
+ mode change is applied.
+
+ TEST_MAKE_DIRS="subdir 775 subdir/sub 555"
+
+ TEST_COPY_FILES
+ A list of pairs of file names and modes. These files
+ are copied from the source to the working directory
+ during setup and reset. When the file already exists
+ (during reset) only the mode change is applied. Files
+ may be copied from/to sub-directories. The sub-directory
+ in the working directory must already exists (see
+ TEST_MAKE_DIRS).
+
+ TEST_COPY_FILES="libtest.a 444 subdir/libfoo.a 444"
+
+ TEST_TOUCH
+ List of pairs of file names and arguments to touch(1).
+ During setup and reset for each list element touch(1)
+ is executed.
+
+ TEST_TOUCH="file1 '-t 200501011257'"
+
+ TEST_LINK
+ List of pairs of filenames. Each pair is passed to ln(1).
+ All names are prefixed with the working directory.
+
+ Makefile
+ If a file with this name exists in the source directory
+ it is automatically copied to the working directory.
+
+ setup_test()
+ If this function exists it is executed at the end of the
+ setup.
+
+ reset_test()
+ If this function exists it is executed at the end of the
+ reset.
+
+ TEST_CLEAN_FILES
+ A list of file to be deleted when resetting.
+
+ TEST_N
+ Number of tests in this script. If not set this is assumed
+ to be 1.
+
+ TEST_<number>
+ Arguments to make for test number <number>. If not set
+ the default argument of test<number> is used. To run a test
+ without argument to make, set TEST_<number> to the empty string.
+
+ TEST_<number>_SKIP
+ To skip a test (for whatever reason) this should be set
+ to a string explaining the reason for skipping the test.
+
+ run_test()
+ Function to run a test. This function gets a single argument
+ which is the number of the test to executed. The default
+ function evaluates the variable TEST_<number> and calls
+ make with the arguments in this variable.
+
diff --git a/tools/regression/usr.bin/make/archives/t0/Makefile b/tools/regression/usr.bin/make/archives/fmt_44bsd/Makefile
index ecb991a..5a8b065 100644
--- a/tools/regression/usr.bin/make/archives/t0/Makefile
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/Makefile
@@ -2,18 +2,10 @@
# This test checks the code reading archive files. The archive file
# is a BSD4.4 file with __.SYMTAB and #1/N long file names.
-all:
- -@make test_ok1 && echo "1 ok"
- -@make test_ok2 && echo "2 ok"
- -@make test_ok3 && echo "3 ok"
- -@make test_ok4 && echo "4 ok"
- -@make test_fail5 || echo "5 ok"
- -@make test_fail6 || echo "6 ok"
- -@make test_fail7 || echo "7 ok"
-
#############################################################################
-test_ok1: libtest.a(short.o)
+# should be ok
+test1: libtest.a(short.o)
@:
libtest.a(short.o): ood
@@ -21,7 +13,8 @@ libtest.a(short.o): ood
#############################################################################
-test_ok2: libtest.a(exactly15char.o)
+# should be ok
+test2: libtest.a(exactly15char.o)
@:
libtest.a(exactly15char.o): ood
@@ -29,7 +22,8 @@ libtest.a(exactly15char.o): ood
#############################################################################
-test_ok3: libtest.a(exactly16chars.o)
+# should be ok
+test3: libtest.a(exactly16chars.o)
@:
libtest.a(exactly16chars.o): ood
@@ -37,7 +31,8 @@ libtest.a(exactly16chars.o): ood
#############################################################################
-test_ok4: libtest.a(verylongobjectname.o)
+# should be ok
+test4: libtest.a(verylongobjectname.o)
@:
libtest.a(verylongobjectname.o): ood
@@ -46,18 +41,21 @@ libtest.a(verylongobjectname.o): ood
#############################################################################
# Truncated to 16 characters
-test_fail5: libtest.a(verylongobjectna)
+# should fail
+test5: libtest.a(verylongobjectna)
@:
#############################################################################
# Truncated to 15 characters
-test_fail6: libtest.a(verylongobjectn)
+# should fail
+test6: libtest.a(verylongobjectn)
@:
#############################################################################
-test_fail7: libtest.a(\#1/20)
+# should fail
+test7: libtest.a(\#1/20)
@:
ood:
diff --git a/tools/regression/usr.bin/make/archives/t0/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.1
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/archives/t0/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.1
diff --git a/tools/regression/usr.bin/make/archives/t1/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.2
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/archives/t1/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.2
diff --git a/tools/regression/usr.bin/make/archives/t2/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.3
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/archives/t2/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.3
diff --git a/tools/regression/usr.bin/make/basic/t1/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.4
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/basic/t1/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.4
diff --git a/tools/regression/usr.bin/make/basic/t0/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.5
index 0cfbf08..0cfbf08 100644
--- a/tools/regression/usr.bin/make/basic/t0/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.5
diff --git a/tools/regression/usr.bin/make/basic/t3/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.6
index 0cfbf08..0cfbf08 100644
--- a/tools/regression/usr.bin/make/basic/t3/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.6
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.7
index 0cfbf08..0cfbf08 100644
--- a/tools/regression/usr.bin/make/shell/builtin/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.status.7
diff --git a/tools/regression/usr.bin/make/basic/t0/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.1
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/basic/t0/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/basic/t1/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.2
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/basic/t1/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/basic/t1/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.3
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/basic/t1/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.3
diff --git a/tools/regression/usr.bin/make/basic/t2/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.4
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/basic/t2/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.4
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.5 b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.5
new file mode 100644
index 0000000..7b91643
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.5
@@ -0,0 +1 @@
+make: don't know how to make verylongobjectna. Stop
diff --git a/tools/regression/usr.bin/make/archives/t2/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.6
index b0d6c00..fd15190 100644
--- a/tools/regression/usr.bin/make/archives/t2/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.6
@@ -1,2 +1 @@
make: don't know how to make verylongobjectn. Stop
-make: don't know how to make #1/20. Stop
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.7 b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.7
new file mode 100644
index 0000000..cb572e1
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stderr.7
@@ -0,0 +1 @@
+make: don't know how to make #1/20. Stop
diff --git a/tools/regression/usr.bin/make/basic/t3/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.1
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/basic/t3/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.2
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/shell/builtin/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.2
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.3
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/shell/meta/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.3
diff --git a/tools/regression/usr.bin/make/shell/path/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.4
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/shell/path/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.4
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.5
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/shell/path_select/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.5
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.stdout b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.6
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/shell/replace/expected.stdout
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.6
diff --git a/tools/regression/usr.bin/make/shell/select/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.7
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/shell/select/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/expected.stdout.7
diff --git a/tools/regression/usr.bin/make/archives/t0/libtest.a b/tools/regression/usr.bin/make/archives/fmt_44bsd/libtest.a
index 891ce6e..891ce6e 100644
--- a/tools/regression/usr.bin/make/archives/t0/libtest.a
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/libtest.a
Binary files differ
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd/test.t b/tools/regression/usr.bin/make/archives/fmt_44bsd/test.t
new file mode 100644
index 0000000..eba6aed
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd/test.t
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Archive parsing (BSD4.4 format)."
+
+# Setup
+TEST_COPY_FILES="libtest.a 644"
+
+# Run
+TEST_N=7
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/archives/t1/Makefile b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/Makefile
index c8c3d58..cd999da 100644
--- a/tools/regression/usr.bin/make/archives/t1/Makefile
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/Makefile
@@ -5,18 +5,10 @@
# The modification of the archive consists in slashes appended to short names.
#
-all:
- -@make test_ok1 && echo "1 ok"
- -@make test_ok2 && echo "2 ok"
- -@make test_ok3 && echo "3 ok"
- -@make test_ok4 && echo "4 ok"
- -@make test_fail5 || echo "5 ok"
- -@make test_fail6 || echo "6 ok"
- -@make test_fail7 || echo "7 ok"
-
#############################################################################
-test_ok1: libtest.a(short.o)
+# must be ok
+test1: libtest.a(short.o)
@:
libtest.a(short.o): ood
@@ -24,7 +16,8 @@ libtest.a(short.o): ood
#############################################################################
-test_ok2: libtest.a(exactly15char.o)
+# must be ok
+test2: libtest.a(exactly15char.o)
@:
libtest.a(exactly15char.o): ood
@@ -32,7 +25,8 @@ libtest.a(exactly15char.o): ood
#############################################################################
-test_ok3: libtest.a(exactly16chars.o)
+# must be ok
+test3: libtest.a(exactly16chars.o)
@:
libtest.a(exactly16chars.o): ood
@@ -40,7 +34,8 @@ libtest.a(exactly16chars.o): ood
#############################################################################
-test_ok4: libtest.a(verylongobjectname.o)
+# must be ok
+test4: libtest.a(verylongobjectname.o)
@:
libtest.a(verylongobjectname.o): ood
@@ -49,18 +44,21 @@ libtest.a(verylongobjectname.o): ood
#############################################################################
# Truncated to 16 characters
-test_fail5: libtest.a(verylongobjectna)
+# must fail
+test5: libtest.a(verylongobjectna)
@:
#############################################################################
# Truncated to 15 characters
-test_fail6: libtest.a(verylongobjectn)
+# must fail
+test6: libtest.a(verylongobjectn)
@:
#############################################################################
-test_fail7: libtest.a(\#1/20)
+# must fail
+test7: libtest.a(\#1/20)
@:
ood:
diff --git a/tools/regression/usr.bin/make/basic/t2/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.1
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/basic/t2/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.1
diff --git a/tools/regression/usr.bin/make/shell/select/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.2
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/shell/select/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.2
diff --git a/tools/regression/usr.bin/make/suffixes/t0/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.3
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/suffixes/t0/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.3
diff --git a/tools/regression/usr.bin/make/suffixes/t1/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.4
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/suffixes/t1/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.4
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.5
index 0cfbf08..0cfbf08 100644
--- a/tools/regression/usr.bin/make/shell/meta/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.5
diff --git a/tools/regression/usr.bin/make/shell/path/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.6
index 0cfbf08..0cfbf08 100644
--- a/tools/regression/usr.bin/make/shell/path/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.6
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.status b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.7
index 0cfbf08..0cfbf08 100644
--- a/tools/regression/usr.bin/make/shell/path_select/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.status.7
diff --git a/tools/regression/usr.bin/make/suffixes/t0/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.1
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/suffixes/t0/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/suffixes/t1/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.2
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/suffixes/t1/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/suffixes/t2/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.3
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/suffixes/t2/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.3
diff --git a/tools/regression/usr.bin/make/variables/t0/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.4
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/variables/t0/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.4
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.5 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.5
new file mode 100644
index 0000000..7b91643
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.5
@@ -0,0 +1 @@
+make: don't know how to make verylongobjectna. Stop
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.6 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.6
new file mode 100644
index 0000000..fd15190
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.6
@@ -0,0 +1 @@
+make: don't know how to make verylongobjectn. Stop
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.7 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.7
new file mode 100644
index 0000000..cb572e1
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stderr.7
@@ -0,0 +1 @@
+make: don't know how to make #1/20. Stop
diff --git a/tools/regression/usr.bin/make/variables/t1/expected.stderr b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.1
index e69de29..e69de29 100644
--- a/tools/regression/usr.bin/make/variables/t1/expected.stderr
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.2 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.2
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.3 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.3
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.4 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.4
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.5 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.5
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.5
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.6 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.6
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.6
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.7 b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.7
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/expected.stdout.7
diff --git a/tools/regression/usr.bin/make/archives/t1/libtest.a b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/libtest.a
index 57bc407..57bc407 100644
--- a/tools/regression/usr.bin/make/archives/t1/libtest.a
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/libtest.a
Binary files differ
diff --git a/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/test.t b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/test.t
new file mode 100644
index 0000000..aa65a3e
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_44bsd_mod/test.t
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Archive parsing (modified BSD4.4 format)."
+
+# Setup
+TEST_COPY_FILES="libtest.a 644"
+
+# Run
+TEST_N=7
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/archives/t2/Makefile b/tools/regression/usr.bin/make/archives/fmt_oldbsd/Makefile
index be58a91..b8f5116 100644
--- a/tools/regression/usr.bin/make/archives/t2/Makefile
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/Makefile
@@ -3,18 +3,10 @@
# is an old BSD file with __.SYMTAB and no long file names. Filenames
# are truncated to 16 characters.
-all:
- -@make test_ok1 && echo "1 ok"
- -@make test_ok2 && echo "2 ok"
- -@make test_ok3 && echo "3 ok"
- -@make test_ok4 && echo "4 ok"
- -@make test_fail5 && echo "5 ok"
- -@make test_fail6 || echo "6 ok"
- -@make test_fail7 || echo "7 ok"
-
#############################################################################
-test_ok1: libtest.a(short.o)
+# must be ok
+test1: libtest.a(short.o)
@:
libtest.a(short.o): ood
@@ -22,7 +14,8 @@ libtest.a(short.o): ood
#############################################################################
-test_ok2: libtest.a(exactly15char.o)
+# must be ok
+test2: libtest.a(exactly15char.o)
@:
libtest.a(exactly15char.o): ood
@@ -30,7 +23,8 @@ libtest.a(exactly15char.o): ood
#############################################################################
-test_ok3: libtest.a(exactly16chars.o)
+# must be ok
+test3: libtest.a(exactly16chars.o)
@:
libtest.a(exactly16chars.o): ood
@@ -38,7 +32,8 @@ libtest.a(exactly16chars.o): ood
#############################################################################
-test_ok4: libtest.a(verylongobjectname.o)
+# must be ok
+test4: libtest.a(verylongobjectname.o)
@:
libtest.a(verylongobjectname.o): ood
@@ -47,18 +42,21 @@ libtest.a(verylongobjectname.o): ood
#############################################################################
# Truncated to 16 characters
-test_fail5: libtest.a(verylongobjectna)
+# must be ok
+test5: libtest.a(verylongobjectna)
@:
#############################################################################
# Truncated to 15 characters
-test_fail6: libtest.a(verylongobjectn)
+# must fail
+test6: libtest.a(verylongobjectn)
@:
#############################################################################
-test_fail7: libtest.a(\#1/20)
+# must fail
+test7: libtest.a(\#1/20)
@:
ood:
diff --git a/tools/regression/usr.bin/make/suffixes/t2/expected.status b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.1
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/suffixes/t2/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.1
diff --git a/tools/regression/usr.bin/make/variables/t0/expected.status b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.2
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/variables/t0/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.2
diff --git a/tools/regression/usr.bin/make/variables/t1/expected.status b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.3
index 573541a..573541a 100644
--- a/tools/regression/usr.bin/make/variables/t1/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.3
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.4 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.4
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.4
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.5 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.5
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.5
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.status b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.6
index 0cfbf08..0cfbf08 100644
--- a/tools/regression/usr.bin/make/shell/replace/expected.status
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.6
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.7 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.7
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.status.7
@@ -0,0 +1 @@
+2
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.1 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.2 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.3 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.3
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.4 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.4
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.5 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.5
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.5
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.6 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.6
new file mode 100644
index 0000000..fd15190
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.6
@@ -0,0 +1 @@
+make: don't know how to make verylongobjectn. Stop
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.7 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.7
new file mode 100644
index 0000000..cb572e1
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stderr.7
@@ -0,0 +1 @@
+make: don't know how to make #1/20. Stop
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.1 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.2 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.2
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.3 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.3
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.4 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.4
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.5 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.5
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.5
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.6 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.6
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.6
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.7 b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.7
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/expected.stdout.7
diff --git a/tools/regression/usr.bin/make/archives/t2/libtest.a b/tools/regression/usr.bin/make/archives/fmt_oldbsd/libtest.a
index 3434c53..3434c53 100644
--- a/tools/regression/usr.bin/make/archives/t2/libtest.a
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/libtest.a
Binary files differ
diff --git a/tools/regression/usr.bin/make/archives/fmt_oldbsd/test.t b/tools/regression/usr.bin/make/archives/fmt_oldbsd/test.t
new file mode 100644
index 0000000..03f7800
--- /dev/null
+++ b/tools/regression/usr.bin/make/archives/fmt_oldbsd/test.t
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Archive parsing (old BSD format)."
+
+# Setup
+TEST_COPY_FILES="libtest.a 644"
+
+# Run
+TEST_N=7
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/archives/t0/expected.stderr b/tools/regression/usr.bin/make/archives/t0/expected.stderr
deleted file mode 100644
index 8dedeaf..0000000
--- a/tools/regression/usr.bin/make/archives/t0/expected.stderr
+++ /dev/null
@@ -1,3 +0,0 @@
-make: don't know how to make verylongobjectna. Stop
-make: don't know how to make verylongobjectn. Stop
-make: don't know how to make #1/20. Stop
diff --git a/tools/regression/usr.bin/make/archives/t0/expected.stdout b/tools/regression/usr.bin/make/archives/t0/expected.stdout
deleted file mode 100644
index 7cd22e1..0000000
--- a/tools/regression/usr.bin/make/archives/t0/expected.stdout
+++ /dev/null
@@ -1,7 +0,0 @@
-1 ok
-2 ok
-3 ok
-4 ok
-5 ok
-6 ok
-7 ok
diff --git a/tools/regression/usr.bin/make/archives/t0/test.t b/tools/regression/usr.bin/make/archives/t0/test.t
deleted file mode 100644
index 6c58fbe..0000000
--- a/tools/regression/usr.bin/make/archives/t0/test.t
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-cd `dirname $0`
-. ../../common.sh
-
-setup_test()
-{
- cp libtest.a ${WORK_DIR}
-}
-
-desc_test()
-{
- echo "Archive parsing (BSD4.4 format)."
-}
-
-eval_cmd $1
diff --git a/tools/regression/usr.bin/make/archives/t1/expected.stderr b/tools/regression/usr.bin/make/archives/t1/expected.stderr
deleted file mode 100644
index 8dedeaf..0000000
--- a/tools/regression/usr.bin/make/archives/t1/expected.stderr
+++ /dev/null
@@ -1,3 +0,0 @@
-make: don't know how to make verylongobjectna. Stop
-make: don't know how to make verylongobjectn. Stop
-make: don't know how to make #1/20. Stop
diff --git a/tools/regression/usr.bin/make/archives/t1/expected.stdout b/tools/regression/usr.bin/make/archives/t1/expected.stdout
deleted file mode 100644
index 7cd22e1..0000000
--- a/tools/regression/usr.bin/make/archives/t1/expected.stdout
+++ /dev/null
@@ -1,7 +0,0 @@
-1 ok
-2 ok
-3 ok
-4 ok
-5 ok
-6 ok
-7 ok
diff --git a/tools/regression/usr.bin/make/archives/t1/test.t b/tools/regression/usr.bin/make/archives/t1/test.t
deleted file mode 100644
index 23e9d0c..0000000
--- a/tools/regression/usr.bin/make/archives/t1/test.t
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-cd `dirname $0`
-. ../../common.sh
-
-setup_test()
-{
- cp libtest.a ${WORK_DIR}
-}
-
-desc_test()
-{
- echo "Archive parsing (modified BSD4.4 format)."
-}
-
-eval_cmd $1
diff --git a/tools/regression/usr.bin/make/archives/t2/expected.stdout b/tools/regression/usr.bin/make/archives/t2/expected.stdout
deleted file mode 100644
index 7cd22e1..0000000
--- a/tools/regression/usr.bin/make/archives/t2/expected.stdout
+++ /dev/null
@@ -1,7 +0,0 @@
-1 ok
-2 ok
-3 ok
-4 ok
-5 ok
-6 ok
-7 ok
diff --git a/tools/regression/usr.bin/make/archives/t2/test.t b/tools/regression/usr.bin/make/archives/t2/test.t
deleted file mode 100644
index f83be0b..0000000
--- a/tools/regression/usr.bin/make/archives/t2/test.t
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-cd `dirname $0`
-. ../../common.sh
-
-setup_test()
-{
- cp libtest.a ${WORK_DIR}
-}
-
-desc_test()
-{
- echo "Archive parsing (old BSD format)."
-}
-
-eval_cmd $1
diff --git a/tools/regression/usr.bin/make/basic/t0/expected.status.1 b/tools/regression/usr.bin/make/basic/t0/expected.status.1
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t0/expected.status.1
@@ -0,0 +1 @@
+2
diff --git a/tools/regression/usr.bin/make/basic/t0/expected.stderr b/tools/regression/usr.bin/make/basic/t0/expected.stderr.1
index 90280c8..90280c8 100644
--- a/tools/regression/usr.bin/make/basic/t0/expected.stderr
+++ b/tools/regression/usr.bin/make/basic/t0/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/basic/t0/expected.stdout.1 b/tools/regression/usr.bin/make/basic/t0/expected.stdout.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t0/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/basic/t0/test.t b/tools/regression/usr.bin/make/basic/t0/test.t
index 768e269..d71a39a 100644
--- a/tools/regression/usr.bin/make/basic/t0/test.t
+++ b/tools/regression/usr.bin/make/basic/t0/test.t
@@ -5,14 +5,14 @@
cd `dirname $0`
. ../../common.sh
-setup_test()
-{
- cp /dev/null ${WORK_DIR}/Makefile
-}
+# Description
+DESC="An empty Makefile file and no target given."
-desc_test()
-{
- echo "An empty Makefile file."
-}
+# Setup
+TEST_TOUCH="Makefile ''"
-eval_cmd $1
+# Run
+TEST_N=1
+TEST_1=
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/basic/t1/Makefile b/tools/regression/usr.bin/make/basic/t1/Makefile
new file mode 100644
index 0000000..d120087
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t1/Makefile
@@ -0,0 +1,5 @@
+# $FreeBSD$
+#
+# Just a target and nothing else. No target on command line.
+#
+all:
diff --git a/tools/regression/usr.bin/make/basic/t1/expected.status.1 b/tools/regression/usr.bin/make/basic/t1/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t1/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/basic/t1/expected.stderr.1 b/tools/regression/usr.bin/make/basic/t1/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t1/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/basic/t1/expected.stdout.1 b/tools/regression/usr.bin/make/basic/t1/expected.stdout.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t1/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/basic/t1/test.t b/tools/regression/usr.bin/make/basic/t1/test.t
index ea5b62f..4131f5d 100644
--- a/tools/regression/usr.bin/make/basic/t1/test.t
+++ b/tools/regression/usr.bin/make/basic/t1/test.t
@@ -5,16 +5,11 @@
cd `dirname $0`
. ../../common.sh
-setup_test()
-{
- cat > ${WORK_DIR}/Makefile << _EOF_
-all:
-_EOF_
-}
+# Description
+DESC="A Makefile file with only a 'all:' file dependency specification."
-desc_test()
-{
- echo "A Makefile file with only a 'all:' file dependency specification."
-}
+# Run
+TEST_N=1
+TEST_1=
-eval_cmd $1
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/basic/t2/Makefile b/tools/regression/usr.bin/make/basic/t2/Makefile
new file mode 100644
index 0000000..ab8fe49
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t2/Makefile
@@ -0,0 +1,6 @@
+# $FreeBSD$
+#
+# Just a target and a command. No command line targets.
+#
+all:
+ echo hello
diff --git a/tools/regression/usr.bin/make/basic/t2/expected.status.1 b/tools/regression/usr.bin/make/basic/t2/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t2/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/basic/t2/expected.stderr.1 b/tools/regression/usr.bin/make/basic/t2/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t2/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/basic/t2/expected.stdout b/tools/regression/usr.bin/make/basic/t2/expected.stdout.1
index e618540..e618540 100644
--- a/tools/regression/usr.bin/make/basic/t2/expected.stdout
+++ b/tools/regression/usr.bin/make/basic/t2/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/basic/t2/test.t b/tools/regression/usr.bin/make/basic/t2/test.t
index 861305b..f5866bb 100644
--- a/tools/regression/usr.bin/make/basic/t2/test.t
+++ b/tools/regression/usr.bin/make/basic/t2/test.t
@@ -5,17 +5,11 @@
cd `dirname $0`
. ../../common.sh
-setup_test()
-{
- cat > ${WORK_DIR}/Makefile << _EOF_
-all:
- echo hello
-_EOF_
-}
+# Description
+DESC="A Makefile file with only a 'all:' file dependency specification, and shell command."
-desc_test()
-{
- echo "A Makefile file with only a 'all:' file dependency specification, and shell command."
-}
+# Run
+TEST_N=1
+TEST_1=
-eval_cmd $1
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/basic/t3/expected.status.1 b/tools/regression/usr.bin/make/basic/t3/expected.status.1
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t3/expected.status.1
@@ -0,0 +1 @@
+2
diff --git a/tools/regression/usr.bin/make/basic/t3/expected.stderr b/tools/regression/usr.bin/make/basic/t3/expected.stderr.1
index 90280c8..90280c8 100644
--- a/tools/regression/usr.bin/make/basic/t3/expected.stderr
+++ b/tools/regression/usr.bin/make/basic/t3/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/basic/t3/expected.stdout.1 b/tools/regression/usr.bin/make/basic/t3/expected.stdout.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/basic/t3/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/basic/t3/test.t b/tools/regression/usr.bin/make/basic/t3/test.t
index fb6cc41..782d27c 100644
--- a/tools/regression/usr.bin/make/basic/t3/test.t
+++ b/tools/regression/usr.bin/make/basic/t3/test.t
@@ -5,14 +5,11 @@
cd `dirname $0`
. ../../common.sh
-setup_test()
-{
- rm -f ${WORK_DIR}/Makefile
-}
+# Description
+DESC="No Makefile file, no command line target."
-desc_test()
-{
- echo "No Makefile file."
-}
+# Run
+TEST_N=1
+TEST_1=
-eval_cmd $1
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/common.sh b/tools/regression/usr.bin/make/common.sh
index 4bd9f7f..3f7f1e1 100644
--- a/tools/regression/usr.bin/make/common.sh
+++ b/tools/regression/usr.bin/make/common.sh
@@ -5,102 +5,286 @@
# $FreeBSD$
#
-# Output usage messsage.
+# Output a message and exit with an error.
#
-print_usage()
+fatal()
{
- echo "Usage: $0 command"
- echo " clean - remove temp files (get initial state)"
- echo " compare - compare result of test to expected"
- echo " desc - print description of test"
- echo " diff - print diffs between results and expected"
- echo " harness - produce output suiteable for Test::Harness"
- echo " run - run the {test, compare, clean}"
- echo " test - run test case"
- echo " update - update the expected with current results"
+ echo "fatal: $*" >/dev/stderr
+ exit 1
}
#
-# Check if the test result is the same as the expected result.
+# Check whether the working directory exists - it must.
#
-# $1 Input file
+ensure_workdir()
+{
+ if [ ! -d ${WORK_DIR} ] ; then
+ fatal "working directory ${WORK_DIR} does not exist."
+ fi
+}
+
+#
+# Make sure all tests have been run
#
-hack_cmp()
+ensure_run()
{
- local EXPECTED RESULT
- EXPECTED="expected.$1"
- RESULT=${WORK_DIR}/$1
+ if [ -z "${TEST_N}" ] ; then
+ TEST_N=1
+ fi
- if [ -f $EXPECTED ]; then
- diff -q $EXPECTED $RESULT 1> /dev/null 2> /dev/null
- return $?
- else
- return 1 # FAIL
+ FAIL=
+ N=1
+ while [ ${N} -le ${TEST_N} ] ; do
+ eval skip=\${TEST_${N}_SKIP}
+ if [ -z "${skip}" ] ; then
+ if [ ! -f ${OUTPUT_DIR}/status.${N} -o \
+ ! -f ${OUTPUT_DIR}/stdout.${N} -o \
+ ! -f ${OUTPUT_DIR}/stderr.${N} ] ; then
+ echo "Test ${SUBDIR}/${N} no yet run"
+ FAIL=yes
+ fi
+ fi
+ N=$((N + 1))
+ done
+
+ if [ ! -z "${FAIL}" ] ; then
+ exit 1
fi
}
#
-# Check if the test result is the same as the expected result.
-#
-# $1 Input file
+# Output usage messsage.
#
-hack_diff()
+print_usage()
{
- local EXPECTED RESULT
- EXPECTED="expected.$1"
- RESULT=${WORK_DIR}/$1
+ echo "Usage: sh -v -m <path> -w <dir> $0 command(s)"
+ echo " setup - setup working directory"
+ echo " run - run the tests"
+ echo " show - show test results"
+ echo " compare - compare actual and expected results"
+ echo " diff - diff actual and expected results"
+ echo " reset - reset the test to its initial state"
+ echo " clean - delete working and output directory"
+ echo " test - setup + run + compare"
+ echo " prove - setup + run + compare + clean"
+ echo " desc - print short description"
+ echo " update - update the expected results with the current results"
+ echo " help - show this information"
+}
- echo diff -u $EXPECTED $RESULT
- if [ -f $EXPECTED ]; then
- diff -u $EXPECTED $RESULT
- return $?
- else
- return 1 # FAIL
+#
+# Common function for setup and reset.
+#
+common_setup()
+{
+ #
+ # If a Makefile exists in the source directory - copy it over
+ #
+ if [ -e Makefile -a ! -e ${WORK_DIR}/Makefile ] ; then
+ cp Makefile ${WORK_DIR}/Makefile
fi
+
+ #
+ # If the TEST_MAKE_DIRS variable is set, create those directories
+ #
+ set -- ${TEST_MAKE_DIRS}
+ while [ $# -ne 0 ] ; do
+ if [ ! -d ${WORK_DIR}/${1} ] ; then
+ mkdir -p -m ${2} ${WORK_DIR}/${1}
+ else
+ chmod ${2} ${WORK_DIR}/${1}
+ fi
+ shift ; shift
+ done
+
+ #
+ # If the TEST_COPY_FILES variable is set, copy those files over to
+ # the working directory. The value is assumed to be pairs of
+ # filenames and modes.
+ #
+ set -- ${TEST_COPY_FILES}
+ while [ $# -ne 0 ] ; do
+ if [ ! -e ${WORK_DIR}/${1} ] ; then
+ cp ${1} ${WORK_DIR}/${1}
+ fi
+ chmod ${2} ${WORK_DIR}/${1}
+ shift ; shift
+ done
+
+ #
+ # If the TEST_TOUCH variable is set, it is taken to be a list
+ # of pairs of filenames and arguments to touch(1). The arguments
+ # to touch must be surrounded by single quotes if there are more
+ # than one argument.
+ #
+ eval set -- ${TEST_TOUCH}
+ while [ $# -ne 0 ] ; do
+ eval touch ${2} ${WORK_DIR}/${1}
+ shift ; shift
+ done
+
+ #
+ # Now create links
+ #
+ eval set -- ${TEST_LINKS}
+ while [ $# -ne 0 ] ; do
+ eval ln ${WORK_DIR}/${1} ${WORK_DIR}/${2}
+ shift ; shift
+ done
}
#
-# Default setup_test() function.
+# Setup the test. This creates the working and output directories and
+# populates it with files. If there is a setup_test() function - call it.
#
-# The default function just does nothing.
+eval_setup()
+{
+ #
+ # Check whether the working directory exists. If it does exit
+ # fatally so that we don't clobber a test the user is working on.
+ #
+ if [ -d ${WORK_DIR} ] ; then
+ fatal "working directory ${WORK_DIR} already exists."
+ fi
+
+ #
+ # Now create it and the output directory
+ #
+ mkdir -p ${WORK_DIR}
+ rm -rf ${OUTPUT_DIR}
+ mkdir -p ${OUTPUT_DIR}
+
+ #
+ # Common stuff
+ #
+ common_setup
+
+ #
+ # Now after all execute the user's setup function if it exists.
+ #
+ setup_test
+}
+
#
-# Both the variables SRC_BASE WORK_BASE are available.
+# Default setup_test function does nothing. This may be overriden by
+# the test.
#
setup_test()
{
}
#
-# Default run_test() function. It can be replace by the
-# user specified regression test.
+# Reset the test. Here we need to rely on information from the test.
+# We executed the same steps as in the setup, by try not to clobber existing
+# files.
+# All files and directories that are listed on the TEST_CLEAN_FILES
+# variable are removed. Then the TEST_TOUCH list is executed and finally
+# the reset_test() function called if it exists.
#
-# Both the variables SRC_BASE WORK_BASE are available.
+eval_reset()
+{
+ ensure_workdir
+
+ #
+ # Clean the output directory
+ #
+ rm -rf ${OUTPUT_DIR}/*
+
+ #
+ # Common stuff
+ #
+ common_setup
+
+ #
+ # Remove files.
+ #
+ for f in ${TEST_CLEAN_FILES} ; do
+ rm -rf ${WORK_DIR}/${f}
+ done
+
+ #
+ # Execute test's function
+ #
+ reset_test
+}
+
#
-# Note: this function executes from a subshell.
+# Default reset_test function does nothing. This may be overriden by
+# the test.
#
-run_test()
+reset_test()
{
- cd ${WORK_DIR}
- $MAKE_PROG 1> stdout 2> stderr
- echo $? > status
}
#
-# Default clean routine
+# Clean the test. This simply removes the working and output directories.
#
-clean_test()
+eval_clean()
{
+ rm -rf ${WORK_DIR}
+ rm -rf ${OUTPUT_DIR}
}
#
-# Clean working directory
+# Run the test.
#
-eval_clean()
+eval_run()
+{
+ ensure_workdir
+
+ if [ -z "${TEST_N}" ] ; then
+ TEST_N=1
+ fi
+
+ N=1
+ while [ ${N} -le ${TEST_N} ] ; do
+ eval skip=\${TEST_${N}_SKIP}
+ if [ -z "${skip}" ] ; then
+ ( cd ${WORK_DIR} ;
+ exec 1>${OUTPUT_DIR}/stdout.${N} 2>${OUTPUT_DIR}/stderr.${N}
+ run_test ${N}
+ echo $? >${OUTPUT_DIR}/status.${N}
+ )
+ fi
+ N=$((N + 1))
+ done
+}
+
+#
+# Default run_test() function. It can be replaced by the
+# user specified regression test. The argument to this function is
+# the test number.
+#
+run_test()
{
- rm -f ${WORK_DIR}/stdout
- rm -f ${WORK_DIR}/stderr
- rm -f ${WORK_DIR}/status
- clean_test
+ eval args=\${TEST_${1}-test${1}}
+ ${MAKE_PROG} $args
+}
+
+#
+# Show test results.
+#
+eval_show()
+{
+ ensure_workdir
+
+ if [ -z "${TEST_N}" ] ; then
+ TEST_N=1
+ fi
+
+ N=1
+ while [ ${N} -le ${TEST_N} ] ; do
+ eval skip=\${TEST_${N}_SKIP}
+ if [ -z "${skip}" ] ; then
+ echo "=== Test ${N} Status =================="
+ cat ${OUTPUT_DIR}/status.${N}
+ echo ".......... Stdout .................."
+ cat ${OUTPUT_DIR}/stdout.${N}
+ echo ".......... Stderr .................."
+ cat ${OUTPUT_DIR}/stderr.${N}
+ fi
+ N=$((N + 1))
+ done
}
#
@@ -108,122 +292,183 @@ eval_clean()
#
eval_compare()
{
- hack_cmp stdout || FAIL="stdout $FAIL"
- hack_cmp stderr || FAIL="stderr $FAIL"
- hack_cmp status || FAIL="status $FAIL"
+ ensure_workdir
+ ensure_run
- if [ ! -z "$FAIL" ]; then
- FAIL=`echo $FAIL`
- echo "$SUBDIR: Test failed {$FAIL}"
+ if [ -z "${TEST_N}" ] ; then
+ TEST_N=1
fi
+
+ echo "1..${TEST_N}"
+ N=1
+ while [ ${N} -le ${TEST_N} ] ; do
+ eval skip=\${TEST_${N}_SKIP}
+ if [ -z "${skip}" ] ; then
+ FAIL=
+ do_compare stdout ${N} || FAIL="${FAIL}stdout "
+ do_compare stderr ${N} || FAIL="${FAIL}stderr "
+ do_compare status ${N} || FAIL="${FAIL}status "
+ if [ ! -z "$FAIL" ]; then
+ echo "not ok ${N} ${SUBDIR}/${N} # reason: ${FAIL}"
+ else
+ echo "ok ${N} ${SUBDIR}/${N}"
+ fi
+ else
+ echo "ok ${N} ${SUBDIR}/${N} # skip: ${skip}"
+ fi
+ N=$((N + 1))
+ done
}
#
-# Compare results with expected results for prove(1)
+# Check if the test result is the same as the expected result.
#
-eval_hcompare()
+# $1 Input file
+# $2 Test number
+#
+do_compare()
{
- FAIL=
- hack_cmp stdout || FAIL="stdout $FAIL"
- hack_cmp stderr || FAIL="stderr $FAIL"
- hack_cmp status || FAIL="status $FAIL"
+ local EXPECTED RESULT
+ EXPECTED="expected.$1.$2"
+ RESULT="${OUTPUT_DIR}/$1.$2"
- if [ ! -z "$FAIL" ]; then
- FAIL=`echo $FAIL`
- echo "not ok 1 $SUBDIR # reason: {$FAIL}"
+ if [ -f $EXPECTED ]; then
+ diff -q $EXPECTED $RESULT 1>/dev/null 2>/dev/null
+ return $?
else
- echo "ok 1 $SUBDIR"
+ return 1 # FAIL
fi
}
#
-# Print description
+# Diff current and expected results
#
-eval_desc()
+eval_diff()
{
- echo -n "$SUBDIR: "
- desc_test
+ ensure_workdir
+ ensure_run
+
+ if [ -z "${TEST_N}" ] ; then
+ TEST_N=1
+ fi
+
+ N=1
+ while [ ${N} -le ${TEST_N} ] ; do
+ eval skip=\${TEST_${N}_SKIP}
+ if [ -z "${skip}" ] ; then
+ FAIL=
+ do_diff stdout ${N}
+ do_diff stderr ${N}
+ do_diff status ${N}
+ fi
+ N=$((N + 1))
+ done
}
#
-# Prepare and run the test
+# Check if the test result is the same as the expected result.
#
-eval_test()
+# $1 Input file
+# $2 Test number
+#
+do_diff()
{
- [ -d ${WORK_DIR} ] || mkdir -p ${WORK_DIR}
- if [ -f Makefile ] ; then
- cp Makefile ${WORK_DIR}
+ local EXPECTED RESULT
+ EXPECTED="expected.$1.$2"
+ RESULT="${OUTPUT_DIR}/$1.$2"
+
+ echo diff -u $EXPECTED $RESULT
+ if [ -f $EXPECTED ]; then
+ diff -u $EXPECTED $RESULT
+ else
+ echo "${EXPECTED} does not exist"
fi
- setup_test
- ( run_test )
}
#
-# Diff current and expected results
+# Update expected results
#
-eval_diff()
+eval_update()
{
- eval_test
- echo "------------------------"
- echo "- $SUBDIR"
- echo "------------------------"
- hack_diff stdout
- hack_diff stderr
- hack_diff status
+ ensure_workdir
+ ensure_run
+
+ if [ -z "${TEST_N}" ] ; then
+ TEST_N=1
+ fi
+
+ FAIL=
+ N=1
+ while [ ${N} -le ${TEST_N} ] ; do
+ eval skip=\${TEST_${N}_SKIP}
+ if [ -z "${skip}" ] ; then
+ cp ${OUTPUT_DIR}/stdout.${N} expected.stdout.${N}
+ cp ${OUTPUT_DIR}/stderr.${N} expected.stderr.${N}
+ cp ${OUTPUT_DIR}/status.${N} expected.status.${N}
+ fi
+ N=$((N + 1))
+ done
}
#
-# Run the test for prove(1)
+# Print description
#
-eval_harness()
+eval_desc()
{
- echo 1..1
- eval_test
- eval_hcompare
- eval_clean
+ echo "${SUBDIR}: ${DESC}"
}
#
# Run the test
#
-eval_run()
+eval_test()
{
- eval_test
+ eval_setup
+ eval_run
eval_compare
- eval_clean
}
#
-# Update expected results
+# Run the test for prove(1)
#
-eval_update()
+eval_prove()
{
- eval_test
- cat ${WORK_DIR}/stdout > expected.stdout
- cat ${WORK_DIR}/stderr > expected.stderr
- cat ${WORK_DIR}/status > expected.status
+ eval_setup
+ eval_run
+ eval_compare
+ eval_clean
}
#
-# Note: Uses global variable $DIR which might be assigned by
-# the script which sourced this file.
+# Main function. Execute the command(s) on the command line.
#
eval_cmd()
{
if [ $# -eq 0 ] ; then
- set -- harness
+ # if no arguments given default to 'prove'
+ set -- prove
fi
- case $1 in
- clean|compare|hcompare|desc|diff|harness|run|test|update)
- eval eval_$1
- ;;
- *)
- print_usage
- ;;
- esac
+ for i
+ do
+ case $i in
+
+ setup | run | compare | diff | clean | reset | show | \
+ test | prove | desc | update)
+ eval eval_$i
+ ;;
+ * | help)
+ print_usage
+ ;;
+ esac
+ done
}
+##############################################################################
+#
+# Main code
+#
+
#
# Parse command line arguments.
#
@@ -263,14 +508,14 @@ SRC_DIR=`pwd`
SRC_BASE=`while [ ! -f common.sh ] ; do cd .. ; done ; pwd`
SUBDIR=`echo ${SRC_DIR} | sed "s@${SRC_BASE}/@@"`
+#
+# Construct working directory
+#
WORK_BASE=${WORK_BASE:-"/tmp/$USER.make.test"}
WORK_DIR=${WORK_BASE}/${SUBDIR}
-MAKE_PROG=${MAKE_PROG:-/usr/bin/make}
+OUTPUT_DIR=${WORK_DIR}.OUTPUT
-export MAKE_PROG
-export VERBOSE
-export SRC_BASE
-export WORK_BASE
-export SUBDIR
-export SRC_DIR
-export WORK_DIR
+#
+# Make to use
+#
+MAKE_PROG=${MAKE_PROG:-/usr/bin/make}
diff --git a/tools/regression/usr.bin/make/shell/builtin/Makefile b/tools/regression/usr.bin/make/shell/builtin/Makefile
index 6fe42ab..0376478 100644
--- a/tools/regression/usr.bin/make/shell/builtin/Makefile
+++ b/tools/regression/usr.bin/make/shell/builtin/Makefile
@@ -7,17 +7,7 @@
#
# $FreeBSD$
-all: sh
- @MAKEFLAGS= ${MAKE} -B no-builtin
- @MAKEFLAGS= ${MAKE} -B builtin
-
-sh: sh.sh
- @cp ${.CURDIR}/sh.sh ${.OBJDIR}/sh
- @chmod +x ${.OBJDIR}/sh
-
-.ifmake builtin || no-builtin
-
-.SHELL: path="${.OBJDIR}/sh"
+.SHELL: path="${.CURDIR}/sh"
.PHONY: builtin no-builtin
@@ -26,5 +16,3 @@ builtin:
no-builtin:
@ls -d .
-
-.endif
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.status.1 b/tools/regression/usr.bin/make/shell/builtin/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/builtin/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.status.2 b/tools/regression/usr.bin/make/shell/builtin/expected.status.2
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/builtin/expected.status.2
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.stderr b/tools/regression/usr.bin/make/shell/builtin/expected.stderr
deleted file mode 100644
index 628ea8f..0000000
--- a/tools/regression/usr.bin/make/shell/builtin/expected.stderr
+++ /dev/null
@@ -1 +0,0 @@
-make: don't know how to make sh.sh. Stop
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.stderr.1 b/tools/regression/usr.bin/make/shell/builtin/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/builtin/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.stderr.2 b/tools/regression/usr.bin/make/shell/builtin/expected.stderr.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/builtin/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.stdout.1 b/tools/regression/usr.bin/make/shell/builtin/expected.stdout.1
new file mode 100644
index 0000000..9c558e3
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/builtin/expected.stdout.1
@@ -0,0 +1 @@
+.
diff --git a/tools/regression/usr.bin/make/shell/builtin/expected.stdout.2 b/tools/regression/usr.bin/make/shell/builtin/expected.stdout.2
new file mode 100644
index 0000000..e350eaf
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/builtin/expected.stdout.2
@@ -0,0 +1 @@
+-ec exec ls -d .
diff --git a/tools/regression/usr.bin/make/shell/builtin/sh.sh b/tools/regression/usr.bin/make/shell/builtin/sh
index 3a507b87..3a507b87 100644
--- a/tools/regression/usr.bin/make/shell/builtin/sh.sh
+++ b/tools/regression/usr.bin/make/shell/builtin/sh
diff --git a/tools/regression/usr.bin/make/shell/builtin/test.t b/tools/regression/usr.bin/make/shell/builtin/test.t
index a20fb2a..1798afc 100644
--- a/tools/regression/usr.bin/make/shell/builtin/test.t
+++ b/tools/regression/usr.bin/make/shell/builtin/test.t
@@ -5,9 +5,15 @@
cd `dirname $0`
. ../../common.sh
-desc_test()
-{
- echo "Check that a command line with a builtin is passed to the shell."
-}
+# Description
+DESC="Check that a command line with a builtin is passed to the shell."
-eval_cmd $1
+# Setup
+TEST_COPY_FILES="sh 755"
+
+# Run
+TEST_N=2
+TEST_1="-B no-builtin"
+TEST_2="-B builtin"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/shell/meta/Makefile b/tools/regression/usr.bin/make/shell/meta/Makefile
index 28a50d6..bcf19d0 100644
--- a/tools/regression/usr.bin/make/shell/meta/Makefile
+++ b/tools/regression/usr.bin/make/shell/meta/Makefile
@@ -7,16 +7,6 @@
#
# $FreeBSD$
-all: sh
- @MAKEFLAGS= ${MAKE} -B no-meta
- @MAKEFLAGS= ${MAKE} -B meta
-
-sh: sh.sh
- @cp ${.CURDIR}/sh.sh ${.OBJDIR}/sh
- @chmod +x ${.OBJDIR}/sh
-
-.ifmake meta || no-meta
-
.SHELL: path="${.OBJDIR}/sh"
.PHONY: meta no-meta
@@ -26,5 +16,3 @@ meta:
no-meta:
@ls -d .
-
-.endif
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.status.1 b/tools/regression/usr.bin/make/shell/meta/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/meta/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.status.2 b/tools/regression/usr.bin/make/shell/meta/expected.status.2
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/meta/expected.status.2
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.stderr b/tools/regression/usr.bin/make/shell/meta/expected.stderr
deleted file mode 100644
index 628ea8f..0000000
--- a/tools/regression/usr.bin/make/shell/meta/expected.stderr
+++ /dev/null
@@ -1 +0,0 @@
-make: don't know how to make sh.sh. Stop
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.stderr.1 b/tools/regression/usr.bin/make/shell/meta/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/meta/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.stderr.2 b/tools/regression/usr.bin/make/shell/meta/expected.stderr.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/meta/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.stdout.1 b/tools/regression/usr.bin/make/shell/meta/expected.stdout.1
new file mode 100644
index 0000000..9c558e3
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/meta/expected.stdout.1
@@ -0,0 +1 @@
+.
diff --git a/tools/regression/usr.bin/make/shell/meta/expected.stdout.2 b/tools/regression/usr.bin/make/shell/meta/expected.stdout.2
new file mode 100644
index 0000000..6ac6f19
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/meta/expected.stdout.2
@@ -0,0 +1 @@
+-ec ls *
diff --git a/tools/regression/usr.bin/make/shell/meta/sh.sh b/tools/regression/usr.bin/make/shell/meta/sh
index 3a507b87..3a507b87 100644
--- a/tools/regression/usr.bin/make/shell/meta/sh.sh
+++ b/tools/regression/usr.bin/make/shell/meta/sh
diff --git a/tools/regression/usr.bin/make/shell/meta/test.t b/tools/regression/usr.bin/make/shell/meta/test.t
index f67a5c6..588b73c 100644
--- a/tools/regression/usr.bin/make/shell/meta/test.t
+++ b/tools/regression/usr.bin/make/shell/meta/test.t
@@ -5,9 +5,15 @@
cd `dirname $0`
. ../../common.sh
-desc_test()
-{
- echo "Check that a command line with meta characters is passed to the shell."
-}
+# Description
+DESC="Check that a command line with meta characters is passed to the shell."
-eval_cmd $1
+# Setup
+TEST_COPY_FILES="sh 755"
+
+# Run
+TEST_N=2
+TEST_1="-B no-meta"
+TEST_2="-B meta"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/shell/path/Makefile b/tools/regression/usr.bin/make/shell/path/Makefile
index 8b1ce1b..fe40b64 100644
--- a/tools/regression/usr.bin/make/shell/path/Makefile
+++ b/tools/regression/usr.bin/make/shell/path/Makefile
@@ -10,23 +10,6 @@
# $FreeBSD$
#
-all: sh csh ksh
- @${MAKE} sh_test
- @${MAKE} csh_test
- @if [ -x /bin/ksh ] ; then ${MAKE} ksh_test ; fi
-
-sh: sh.sh
- @cp ${.CURDIR}/sh.sh ${.OBJDIR}/sh
- @chmod +x ${.OBJDIR}/sh
-
-csh: sh.sh
- @cp ${.CURDIR}/sh.sh ${.OBJDIR}/csh
- @chmod +x ${.OBJDIR}/csh
-
-ksh: sh.sh
- @cp ${.CURDIR}/sh.sh ${.OBJDIR}/ksh
- @chmod +x ${.OBJDIR}/ksh
-
.ifmake sh_test
.SHELL: path=${.OBJDIR}/sh
diff --git a/tools/regression/usr.bin/make/shell/path/expected.status.1 b/tools/regression/usr.bin/make/shell/path/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/path/expected.status.2 b/tools/regression/usr.bin/make/shell/path/expected.status.2
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path/expected.status.2
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/path/expected.stderr b/tools/regression/usr.bin/make/shell/path/expected.stderr
deleted file mode 100644
index 628ea8f..0000000
--- a/tools/regression/usr.bin/make/shell/path/expected.stderr
+++ /dev/null
@@ -1 +0,0 @@
-make: don't know how to make sh.sh. Stop
diff --git a/tools/regression/usr.bin/make/shell/path/expected.stderr.1 b/tools/regression/usr.bin/make/shell/path/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/shell/path/expected.stderr.2 b/tools/regression/usr.bin/make/shell/path/expected.stderr.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/shell/path/expected.stdout.1 b/tools/regression/usr.bin/make/shell/path/expected.stdout.1
new file mode 100644
index 0000000..d881364
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path/expected.stdout.1
@@ -0,0 +1 @@
+-ec : This is the shell.
diff --git a/tools/regression/usr.bin/make/shell/path/expected.stdout.2 b/tools/regression/usr.bin/make/shell/path/expected.stdout.2
new file mode 100644
index 0000000..de3fc89
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path/expected.stdout.2
@@ -0,0 +1 @@
+-ec : This is the C-shell.
diff --git a/tools/regression/usr.bin/make/shell/path/sh.sh b/tools/regression/usr.bin/make/shell/path/sh
index 46169eb..46169eb 100644
--- a/tools/regression/usr.bin/make/shell/path/sh.sh
+++ b/tools/regression/usr.bin/make/shell/path/sh
diff --git a/tools/regression/usr.bin/make/shell/path/test.t b/tools/regression/usr.bin/make/shell/path/test.t
index 890fb45..72ff252 100644
--- a/tools/regression/usr.bin/make/shell/path/test.t
+++ b/tools/regression/usr.bin/make/shell/path/test.t
@@ -5,9 +5,18 @@
cd `dirname $0`
. ../../common.sh
-desc_test()
-{
- echo "New path for builtin shells."
-}
+# Description
+DESC="New path for builtin shells."
-eval_cmd $1
+# Setup
+TEST_COPY_FILES="sh 755"
+TEST_LINKS="sh csh sh ksh"
+
+# Run
+TEST_N=3
+TEST_1="sh_test"
+TEST_2="csh_test"
+TEST_3="ksh_test"
+TEST_3_SKIP="no ksh on FreeBSD"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/shell/path_select/Makefile b/tools/regression/usr.bin/make/shell/path_select/Makefile
index 6b74a41..05cfb27 100644
--- a/tools/regression/usr.bin/make/shell/path_select/Makefile
+++ b/tools/regression/usr.bin/make/shell/path_select/Makefile
@@ -10,30 +10,21 @@
# $FreeBSD$
#
-all: shell
- @${MAKE} sh_test
- @${MAKE} csh_test
- @if [ -x /bin/ksh ] ; then ${MAKE} ksh_test ; fi
-
-shell: sh.sh
- @cp ${.CURDIR}/sh.sh ${.OBJDIR}/shell
- @chmod +x ${.OBJDIR}/shell
-
.ifmake sh_test
-.SHELL: name=sh path=${.OBJDIR}/shell
+.SHELL: name=sh path=${.CURDIR}/shell
sh_test:
@: This is the shell.
.elifmake csh_test
-.SHELL: name=csh path=${.OBJDIR}/shell
+.SHELL: name=csh path=${.CURDIR}/shell
csh_test:
@: This is the C-shell.
.elifmake ksh_test
-.SHELL: name=ksh path=${.OBJDIR}/shell
+.SHELL: name=ksh path=${.CURDIR}/shell
ksh_test:
@: This is the Korn-shell.
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.status.1 b/tools/regression/usr.bin/make/shell/path_select/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path_select/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.status.2 b/tools/regression/usr.bin/make/shell/path_select/expected.status.2
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path_select/expected.status.2
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.stderr b/tools/regression/usr.bin/make/shell/path_select/expected.stderr
deleted file mode 100644
index 628ea8f..0000000
--- a/tools/regression/usr.bin/make/shell/path_select/expected.stderr
+++ /dev/null
@@ -1 +0,0 @@
-make: don't know how to make sh.sh. Stop
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.stderr.1 b/tools/regression/usr.bin/make/shell/path_select/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path_select/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.stderr.2 b/tools/regression/usr.bin/make/shell/path_select/expected.stderr.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path_select/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.stdout.1 b/tools/regression/usr.bin/make/shell/path_select/expected.stdout.1
new file mode 100644
index 0000000..d881364
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path_select/expected.stdout.1
@@ -0,0 +1 @@
+-ec : This is the shell.
diff --git a/tools/regression/usr.bin/make/shell/path_select/expected.stdout.2 b/tools/regression/usr.bin/make/shell/path_select/expected.stdout.2
new file mode 100644
index 0000000..de3fc89
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path_select/expected.stdout.2
@@ -0,0 +1 @@
+-ec : This is the C-shell.
diff --git a/tools/regression/usr.bin/make/shell/path_select/sh.sh b/tools/regression/usr.bin/make/shell/path_select/shell
index 46169eb..46169eb 100644
--- a/tools/regression/usr.bin/make/shell/path_select/sh.sh
+++ b/tools/regression/usr.bin/make/shell/path_select/shell
diff --git a/tools/regression/usr.bin/make/shell/path_select/test.t b/tools/regression/usr.bin/make/shell/path_select/test.t
index fef0eb9..5bac631 100644
--- a/tools/regression/usr.bin/make/shell/path_select/test.t
+++ b/tools/regression/usr.bin/make/shell/path_select/test.t
@@ -5,9 +5,17 @@
cd `dirname $0`
. ../../common.sh
-desc_test()
-{
- echo "New path for builtin shells (2)."
-}
+# Description
+DESC="New path for builtin shells (2)."
-eval_cmd $1
+# Setup
+TEST_COPY_FILES="shell 755"
+
+# Run
+TEST_N=3
+TEST_1="sh_test"
+TEST_2="csh_test"
+TEST_3="ksh_test"
+TEST_3_SKIP="no ksh on FreeBSD"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/shell/replace/Makefile b/tools/regression/usr.bin/make/shell/replace/Makefile
index f903f37..2160dbf 100644
--- a/tools/regression/usr.bin/make/shell/replace/Makefile
+++ b/tools/regression/usr.bin/make/shell/replace/Makefile
@@ -10,17 +10,7 @@
#
# $FreeBSD$
-all: shell
- ${MAKE} test1
- ${MAKE} -j1 test1
-
-shell: sh.sh
- @cp ${.CURDIR}/sh.sh ${.OBJDIR}/shell
- @chmod +x ${.OBJDIR}/shell
-
-.ifmake test1
-
-.SHELL: name="shell" path="${.OBJDIR}/shell" \
+.SHELL: name="shell" path="${.CURDIR}/shell" \
quiet="be quiet" echo="be verbose" filter="be verbose" \
echoFlag="x" errFlag="y" \
hasErrCtl=y check="check errors" ignore="ignore errors"
@@ -29,5 +19,3 @@ shell: sh.sh
test1:
-@funny $$
funnier $$
-
-.endif
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.status.1 b/tools/regression/usr.bin/make/shell/replace/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/replace/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.status.2 b/tools/regression/usr.bin/make/shell/replace/expected.status.2
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/replace/expected.status.2
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.stderr b/tools/regression/usr.bin/make/shell/replace/expected.stderr
deleted file mode 100644
index 628ea8f..0000000
--- a/tools/regression/usr.bin/make/shell/replace/expected.stderr
+++ /dev/null
@@ -1 +0,0 @@
-make: don't know how to make sh.sh. Stop
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.stderr.1 b/tools/regression/usr.bin/make/shell/replace/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/replace/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.stderr.2 b/tools/regression/usr.bin/make/shell/replace/expected.stderr.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/replace/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.stdout.1 b/tools/regression/usr.bin/make/shell/replace/expected.stdout.1
new file mode 100644
index 0000000..eff99ea
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/replace/expected.stdout.1
@@ -0,0 +1,3 @@
+-c funny $
+funnier $
+-ec funnier $
diff --git a/tools/regression/usr.bin/make/shell/replace/expected.stdout.2 b/tools/regression/usr.bin/make/shell/replace/expected.stdout.2
new file mode 100644
index 0000000..c79a09a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/replace/expected.stdout.2
@@ -0,0 +1,6 @@
+-yx
+be quiet
+ignore errors
+funny $
+check errors
+funnier $
diff --git a/tools/regression/usr.bin/make/shell/replace/sh.sh b/tools/regression/usr.bin/make/shell/replace/shell
index 46169eb..46169eb 100644
--- a/tools/regression/usr.bin/make/shell/replace/sh.sh
+++ b/tools/regression/usr.bin/make/shell/replace/shell
diff --git a/tools/regression/usr.bin/make/shell/replace/test.t b/tools/regression/usr.bin/make/shell/replace/test.t
index 838a605..5c91cf9 100644
--- a/tools/regression/usr.bin/make/shell/replace/test.t
+++ b/tools/regression/usr.bin/make/shell/replace/test.t
@@ -5,9 +5,15 @@
cd `dirname $0`
. ../../common.sh
-desc_test()
-{
- echo "Check that the shell can be replaced."
-}
+# Description
+DESC="Check that the shell can be replaced."
-eval_cmd $1
+# Setup
+TEST_COPY_FILES="shell 755"
+
+# Run
+TEST_N=2
+TEST_1=
+TEST_2=-j2
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/shell/select/Makefile b/tools/regression/usr.bin/make/shell/select/Makefile
index 127dca2..e1ff023 100644
--- a/tools/regression/usr.bin/make/shell/select/Makefile
+++ b/tools/regression/usr.bin/make/shell/select/Makefile
@@ -7,25 +7,20 @@
# $FreeBSD$
#
-all:
- @${MAKE} sh
- @${MAKE} csh
- @if [ -x /bin/ksh ] ; then ${MAKE} ksh ; fi
-
-.ifmake sh
+.ifmake sh_test
.SHELL: name=sh
-sh: print_path
+sh_test: print_path
-.elifmake csh
+.elifmake csh_test
.SHELL: name=csh
-csh: print_path
+csh_test: print_path
-.elifmake ksh
+.elifmake ksh_test
.SHELL: name=ksh
-ksh: print_path
+ksh_test: print_path
.endif
diff --git a/tools/regression/usr.bin/make/shell/select/expected.status.1 b/tools/regression/usr.bin/make/shell/select/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/select/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/select/expected.status.2 b/tools/regression/usr.bin/make/shell/select/expected.status.2
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/select/expected.status.2
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/shell/select/expected.stderr.1 b/tools/regression/usr.bin/make/shell/select/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/select/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/shell/select/expected.stderr.2 b/tools/regression/usr.bin/make/shell/select/expected.stderr.2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/select/expected.stderr.2
diff --git a/tools/regression/usr.bin/make/shell/select/expected.stdout.1 b/tools/regression/usr.bin/make/shell/select/expected.stdout.1
new file mode 100644
index 0000000..c2cdaa0
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/select/expected.stdout.1
@@ -0,0 +1 @@
+/bin/sh
diff --git a/tools/regression/usr.bin/make/shell/select/expected.stdout b/tools/regression/usr.bin/make/shell/select/expected.stdout.2
index 4e4093b..5a831e8 100644
--- a/tools/regression/usr.bin/make/shell/select/expected.stdout
+++ b/tools/regression/usr.bin/make/shell/select/expected.stdout.2
@@ -1,2 +1 @@
-/bin/sh
/bin/csh
diff --git a/tools/regression/usr.bin/make/shell/select/test.t b/tools/regression/usr.bin/make/shell/select/test.t
index 0a129c0..7f73f9b 100644
--- a/tools/regression/usr.bin/make/shell/select/test.t
+++ b/tools/regression/usr.bin/make/shell/select/test.t
@@ -5,9 +5,14 @@
cd `dirname $0`
. ../../common.sh
-desc_test()
-{
- echo "Select the builtin sh shell."
-}
+# Description
+DESC="Select the builtin sh shell."
-eval_cmd $1
+# Run
+TEST_N=3
+TEST_1="sh_test"
+TEST_2="csh_test"
+TEST_3="ksh_test"
+TEST_3_SKIP="no ksh on FreeBSD"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/suffixes/t0/Makefile b/tools/regression/usr.bin/make/suffixes/basic/Makefile
index 1f9753a..45d9130 100644
--- a/tools/regression/usr.bin/make/suffixes/t0/Makefile
+++ b/tools/regression/usr.bin/make/suffixes/basic/Makefile
@@ -1,6 +1,8 @@
# $FreeBSD$
+#
+# Check that a simple suffix rule is correctly processed.
-all: TEST1.b
+test1: TEST1.b
diff -u TEST1.a TEST1.b
.SUFFIXES:
diff --git a/tools/regression/usr.bin/make/suffixes/t0/TEST1.a b/tools/regression/usr.bin/make/suffixes/basic/TEST1.a
index da5569b..da5569b 100644
--- a/tools/regression/usr.bin/make/suffixes/t0/TEST1.a
+++ b/tools/regression/usr.bin/make/suffixes/basic/TEST1.a
diff --git a/tools/regression/usr.bin/make/suffixes/basic/expected.status.1 b/tools/regression/usr.bin/make/suffixes/basic/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/basic/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/suffixes/basic/expected.stderr.1 b/tools/regression/usr.bin/make/suffixes/basic/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/basic/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/suffixes/t0/expected.stdout b/tools/regression/usr.bin/make/suffixes/basic/expected.stdout.1
index 582927e..582927e 100644
--- a/tools/regression/usr.bin/make/suffixes/t0/expected.stdout
+++ b/tools/regression/usr.bin/make/suffixes/basic/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/suffixes/basic/test.t b/tools/regression/usr.bin/make/suffixes/basic/test.t
new file mode 100644
index 0000000..0b387c8
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/basic/test.t
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Basic suffix operation."
+
+# Setup
+TEST_COPY_FILES="TEST1.a 644"
+
+# Reset
+TEST_CLEAN="Test1.b"
+
+# Run
+TEST_N=1
+TEST_1="-r test1"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/suffixes/t1/Makefile b/tools/regression/usr.bin/make/suffixes/src_wild1/Makefile
index 38a4573..d0258ad 100644
--- a/tools/regression/usr.bin/make/suffixes/t1/Makefile
+++ b/tools/regression/usr.bin/make/suffixes/src_wild1/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-all: TEST1.b
+test1: TEST1.b
cat TEST1.a TEST2.a | diff -u - TEST1.b
TEST1.b: *.a
diff --git a/tools/regression/usr.bin/make/suffixes/t1/TEST1.a b/tools/regression/usr.bin/make/suffixes/src_wild1/TEST1.a
index da5569b..da5569b 100644
--- a/tools/regression/usr.bin/make/suffixes/t1/TEST1.a
+++ b/tools/regression/usr.bin/make/suffixes/src_wild1/TEST1.a
diff --git a/tools/regression/usr.bin/make/suffixes/t1/TEST2.a b/tools/regression/usr.bin/make/suffixes/src_wild1/TEST2.a
index 34f8508..34f8508 100644
--- a/tools/regression/usr.bin/make/suffixes/t1/TEST2.a
+++ b/tools/regression/usr.bin/make/suffixes/src_wild1/TEST2.a
diff --git a/tools/regression/usr.bin/make/suffixes/src_wild1/expected.status.1 b/tools/regression/usr.bin/make/suffixes/src_wild1/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/src_wild1/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/suffixes/src_wild1/expected.stderr.1 b/tools/regression/usr.bin/make/suffixes/src_wild1/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/src_wild1/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/suffixes/t1/expected.stdout b/tools/regression/usr.bin/make/suffixes/src_wild1/expected.stdout.1
index 3cd2129..3cd2129 100644
--- a/tools/regression/usr.bin/make/suffixes/t1/expected.stdout
+++ b/tools/regression/usr.bin/make/suffixes/src_wild1/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/suffixes/src_wild1/test.t b/tools/regression/usr.bin/make/suffixes/src_wild1/test.t
new file mode 100644
index 0000000..6b31118
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/src_wild1/test.t
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Source wildcard expansion."
+
+# Setup
+TEST_COPY_FILES="TEST1.a 644 TEST2.a 644"
+
+# Reset
+TEST_CLEAN="TEST1.b"
+
+# Run
+TEST_N=1
+TEST_1="-r test1"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/suffixes/t2/Makefile b/tools/regression/usr.bin/make/suffixes/src_wild2/Makefile
index 42e26fb..1dea7ea 100644
--- a/tools/regression/usr.bin/make/suffixes/t2/Makefile
+++ b/tools/regression/usr.bin/make/suffixes/src_wild2/Makefile
@@ -1,8 +1,11 @@
# $FreeBSD$
+#
+# Source expansion with the source in a macro
+#
SRC=*.a
-all: TEST1.b
+test1: TEST1.b
cat TEST1.a TEST2.a | diff -u - TEST1.b
TEST1.b: ${SRC}
diff --git a/tools/regression/usr.bin/make/suffixes/t2/TEST1.a b/tools/regression/usr.bin/make/suffixes/src_wild2/TEST1.a
index da5569b..da5569b 100644
--- a/tools/regression/usr.bin/make/suffixes/t2/TEST1.a
+++ b/tools/regression/usr.bin/make/suffixes/src_wild2/TEST1.a
diff --git a/tools/regression/usr.bin/make/suffixes/t2/TEST2.a b/tools/regression/usr.bin/make/suffixes/src_wild2/TEST2.a
index 34f8508..34f8508 100644
--- a/tools/regression/usr.bin/make/suffixes/t2/TEST2.a
+++ b/tools/regression/usr.bin/make/suffixes/src_wild2/TEST2.a
diff --git a/tools/regression/usr.bin/make/suffixes/src_wild2/expected.status.1 b/tools/regression/usr.bin/make/suffixes/src_wild2/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/src_wild2/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/suffixes/src_wild2/expected.stderr.1 b/tools/regression/usr.bin/make/suffixes/src_wild2/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/src_wild2/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/suffixes/t2/expected.stdout b/tools/regression/usr.bin/make/suffixes/src_wild2/expected.stdout.1
index 3cd2129..3cd2129 100644
--- a/tools/regression/usr.bin/make/suffixes/t2/expected.stdout
+++ b/tools/regression/usr.bin/make/suffixes/src_wild2/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/suffixes/src_wild2/test.t b/tools/regression/usr.bin/make/suffixes/src_wild2/test.t
new file mode 100644
index 0000000..0d40e3d
--- /dev/null
+++ b/tools/regression/usr.bin/make/suffixes/src_wild2/test.t
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Source wildcard expansion (2)."
+
+# Setup
+TEST_COPY_FILES="TEST1.a 644 TEST2.a 644"
+
+# Reset
+TEST_CLEAN="TEST1.b"
+
+# Run
+TEST_N=1
+TEST_1="-r test1"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/suffixes/t0/test.t b/tools/regression/usr.bin/make/suffixes/t0/test.t
deleted file mode 100644
index 3715377..0000000
--- a/tools/regression/usr.bin/make/suffixes/t0/test.t
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-cd `dirname $0`
-. ../../common.sh
-
-setup_test()
-{
- cp TEST1.a $WORK_DIR
-}
-
-run_test()
-{
- cd $WORK_DIR
- $MAKE_PROG -r 1>stdout 2>stderr
- echo $? >status
-}
-
-clean_test()
-{
- rm -f TEST1.b
-}
-
-desc_test()
-{
- echo "Basic suffix operation."
-}
-
-eval_cmd $1
diff --git a/tools/regression/usr.bin/make/suffixes/t1/test.t b/tools/regression/usr.bin/make/suffixes/t1/test.t
deleted file mode 100644
index 844b8a0..0000000
--- a/tools/regression/usr.bin/make/suffixes/t1/test.t
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-cd `dirname $0`
-. ../../common.sh
-
-setup_test()
-{
- cp TEST[12].a ${WORK_DIR}
-}
-
-run_test()
-{
- cd ${WORK_DIR}
- ${MAKE_PROG} -r 1>stdout 2>stderr
- echo $? >status
-}
-
-clean_test()
-{
- rm -f TEST1.b
-}
-
-desc_test()
-{
- echo "Source wildcard expansion."
-}
-
-eval_cmd $1
diff --git a/tools/regression/usr.bin/make/suffixes/t2/test.t b/tools/regression/usr.bin/make/suffixes/t2/test.t
deleted file mode 100644
index 844b8a0..0000000
--- a/tools/regression/usr.bin/make/suffixes/t2/test.t
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-cd `dirname $0`
-. ../../common.sh
-
-setup_test()
-{
- cp TEST[12].a ${WORK_DIR}
-}
-
-run_test()
-{
- cd ${WORK_DIR}
- ${MAKE_PROG} -r 1>stdout 2>stderr
- echo $? >status
-}
-
-clean_test()
-{
- rm -f TEST1.b
-}
-
-desc_test()
-{
- echo "Source wildcard expansion."
-}
-
-eval_cmd $1
diff --git a/tools/regression/usr.bin/make/variables/t1/test.t b/tools/regression/usr.bin/make/variables/modifier_M/Makefile
index 05014d9..f8f6d3f 100644
--- a/tools/regression/usr.bin/make/variables/t1/test.t
+++ b/tools/regression/usr.bin/make/variables/modifier_M/Makefile
@@ -1,20 +1,14 @@
-#!/bin/sh
-
# $FreeBSD$
-
-cd `dirname $0`
-. ../../common.sh
-
-setup_test()
-{
- cat > ${WORK_DIR}/Makefile << "_EOF_"
+#
+# Test the M modifier.
+#
FILES = \
main.c globals.h \
util.c util.h \
map.c map.h \
parser.y lexer.l \
cmdman.1 format.5
-all:
+test1:
@echo "all files: ${FILES}"
@echo "cfiles: ${FILES:M*.c}"
@echo "hfiles: ${FILES:M*.h}"
@@ -22,12 +16,3 @@ all:
@echo "man page: ${FILES:M*.[1-9]}"
@echo "utility files: ${FILES:Mutil.?}"
@echo "m files: ${FILES:Mm*}"
-_EOF_
-}
-
-desc_test()
-{
- echo "Variable expansion with M modifier"
-}
-
-eval_cmd $1
diff --git a/tools/regression/usr.bin/make/variables/modifier_M/expected.status.1 b/tools/regression/usr.bin/make/variables/modifier_M/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/variables/modifier_M/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/variables/modifier_M/expected.stderr.1 b/tools/regression/usr.bin/make/variables/modifier_M/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/variables/modifier_M/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/variables/t1/expected.stdout b/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1
index e00d5a7..e00d5a7 100644
--- a/tools/regression/usr.bin/make/variables/t1/expected.stdout
+++ b/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1
diff --git a/tools/regression/usr.bin/make/variables/modifier_M/test.t b/tools/regression/usr.bin/make/variables/modifier_M/test.t
new file mode 100644
index 0000000..979778f
--- /dev/null
+++ b/tools/regression/usr.bin/make/variables/modifier_M/test.t
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Variable expansion with M modifier"
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/variables/t0/Makefile b/tools/regression/usr.bin/make/variables/t0/Makefile
new file mode 100644
index 0000000..1cc58ee
--- /dev/null
+++ b/tools/regression/usr.bin/make/variables/t0/Makefile
@@ -0,0 +1,23 @@
+# $FreeBSD$
+#
+# A unsorted set of macro expansions. This should be sorted out.
+#
+A = 0
+AV = 1
+test1:
+ @echo $A
+ @echo ${AV}
+ @echo ${A}
+ @# The following are soo broken why no syntax error?
+ @echo $(
+ @echo $)
+ @echo ${
+ @echo ${A
+ @echo ${A)
+ @echo ${A){
+ @echo ${AV
+ @echo ${AV)
+ @echo ${AV){
+ @echo ${AV{
+ @echo ${A{
+ @echo $}
diff --git a/tools/regression/usr.bin/make/variables/t0/expected.status.1 b/tools/regression/usr.bin/make/variables/t0/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/variables/t0/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/variables/t0/expected.stderr.1 b/tools/regression/usr.bin/make/variables/t0/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/regression/usr.bin/make/variables/t0/expected.stderr.1
diff --git a/tools/regression/usr.bin/make/variables/t0/expected.stdout b/tools/regression/usr.bin/make/variables/t0/expected.stdout
deleted file mode 100644
index dfe03b8..0000000
--- a/tools/regression/usr.bin/make/variables/t0/expected.stdout
+++ /dev/null
@@ -1,31 +0,0 @@
-echo 0
-0
-echo 1
-1
-echo 0
-0
-# The following are soo broken why no syntax error?
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
-echo
-
diff --git a/tools/regression/usr.bin/make/variables/t0/expected.stdout.1 b/tools/regression/usr.bin/make/variables/t0/expected.stdout.1
new file mode 100644
index 0000000..e2c70de
--- /dev/null
+++ b/tools/regression/usr.bin/make/variables/t0/expected.stdout.1
@@ -0,0 +1,15 @@
+0
+1
+0
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/regression/usr.bin/make/variables/t0/test.t b/tools/regression/usr.bin/make/variables/t0/test.t
index 7cbc35c..7e4f427 100644
--- a/tools/regression/usr.bin/make/variables/t0/test.t
+++ b/tools/regression/usr.bin/make/variables/t0/test.t
@@ -5,34 +5,7 @@
cd `dirname $0`
. ../../common.sh
-setup_test()
-{
- cat > ${WORK_DIR}/Makefile << "_EOF_"
-A = 0
-AV = 1
-all:
- echo $A
- echo ${AV}
- echo ${A}
- # The following are soo broken why no syntax error?
- echo $(
- echo $)
- echo ${
- echo ${A
- echo ${A)
- echo ${A){
- echo ${AV
- echo ${AV)
- echo ${AV){
- echo ${AV{
- echo ${A{
- echo $}
-_EOF_
-}
+# Description
+DESC="Variable expansion."
-desc_test()
-{
- echo "Variable expansion."
-}
-
-eval_cmd $1
+eval_cmd $*
OpenPOWER on IntegriCloud