diff options
| author | apb <apb@NetBSD.org> | 2014-08-21 13:44:51 +0000 |
|---|---|---|
| committer | apb <apb@NetBSD.org> | 2014-08-21 13:44:51 +0000 |
| commit | e0e29fb9b1efba6df79dd53a6089feb13bd02da7 (patch) | |
| tree | 94572ccf65b7976abf4579f055e0e9bc9643dd1d /usr.bin/make/unit-tests/forloop | |
| parent | b6020910a92470d3ef334170d1605556bc498286 (diff) | |
Give each group of tests its own output file.
* Rename each sub-makefile to *.mk;
* Add a *.exp file of expected output for each sub-makefile;
* Remove test.exp, which is replaced by all the other *.exp files.
* Use suffix rules to generate *.rawout and *.out files for
each test case.
* Rewrite the test and accept targets to adapt to the new way.
The old (now removed) test.exp file is almost identical to the
concatenation (in the correct order) of all the new *.exp files. There
are expected differences in makefile names embedded in the output, and
the new "exit status" lines. Some old "*** Error code 1 (ignored)"
lines are also removed (replaced by new "exit status 1" lines).
Diffstat (limited to 'usr.bin/make/unit-tests/forloop')
| -rw-r--r-- | usr.bin/make/unit-tests/forloop | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/usr.bin/make/unit-tests/forloop b/usr.bin/make/unit-tests/forloop deleted file mode 100644 index 76e98f893a1..00000000000 --- a/usr.bin/make/unit-tests/forloop +++ /dev/null @@ -1,45 +0,0 @@ -# $Id: forloop,v 1.1 2012/06/19 23:25:53 sjg Exp $ - -all: for-loop - -LIST = one "two and three" four "five" - -.if make(for-fail) -for-fail: - -XTRA_LIST = xtra -.else - -.for x in ${LIST} -X!= echo 'x=$x' >&2; echo -.endfor - -CFL = -I/this -I"This or that" -Ithat "-DTHIS=\"this and that\"" -cfl= -.for x in ${CFL} -X!= echo 'x=$x' >&2; echo -.if empty(cfl) -cfl= $x -.else -cfl+= $x -.endif -.endfor -X!= echo 'cfl=${cfl}' >&2; echo - -.if ${cfl} != ${CFL} -.error ${.newline}'${cfl}' != ${.newline}'${CFL}' -.endif - -.for a b in ${EMPTY} -X!= echo 'a=$a b=$b' >&2; echo -.endfor -.endif - -.for a b in ${LIST} ${LIST:tu} ${XTRA_LIST} -X!= echo 'a=$a b=$b' >&2; echo -.endfor - -for-loop: - @echo We expect an error next: - @(cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} for-fail) && \ - { echo "Oops that should have failed!"; exit 1; } || echo OK |
