Mon Jul 27 18:51:56 2020 UTC ()
make(1): add very basic test for archive handling

The whole code in arch.c had been uncovered by tests before.

The code coverage shows that neither the archive name nor the member
contain any $, even though archive.mk looks like it.  It could be
necessary to place the variable assignments below the dependency line,
to force late evaluation.


(rillig)
diff -r1.66 -r1.67 src/usr.bin/make/unit-tests/Makefile

cvs diff -r1.66 -r1.67 src/usr.bin/make/unit-tests/Makefile (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/Makefile 2020/07/26 22:15:36 1.66
+++ src/usr.bin/make/unit-tests/Makefile 2020/07/27 18:51:56 1.67
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.66 2020/07/26 22:15:36 rillig Exp $ 1# $NetBSD: Makefile,v 1.67 2020/07/27 18:51:56 rillig Exp $
2# 2#
3# Unit tests for make(1) 3# Unit tests for make(1)
4# 4#
5# The main targets are: 5# The main targets are:
6# 6#
7# all: 7# all:
8# run all the tests 8# run all the tests
9# test: 9# test:
10# run 'all', and compare to expected results 10# run 'all', and compare to expected results
11# accept: 11# accept:
12# move generated output to expected results 12# move generated output to expected results
13# 13#
14# Settable variables 14# Settable variables
@@ -20,26 +20,27 @@ @@ -20,26 +20,27 @@
20# Adding a test case 20# Adding a test case
21# 21#
22# Each feature should get its own set of tests in its own suitably 22# Each feature should get its own set of tests in its own suitably
23# named makefile (*.mk), with its own set of expected results (*.exp), 23# named makefile (*.mk), with its own set of expected results (*.exp),
24# and it should be added to the TESTS list. 24# and it should be added to the TESTS list.
25# 25#
26# Any added files must also be added to src/distrib/sets/lists/tests/mi. 26# Any added files must also be added to src/distrib/sets/lists/tests/mi.
27# Makefiles that are not added to TESTS must be ignored in 27# Makefiles that are not added to TESTS must be ignored in
28# src/tests/usr.bin/make/t_make.sh (example: include-sub). 28# src/tests/usr.bin/make/t_make.sh (example: include-sub).
29# 29#
30 30
31# Each test is in a sub-makefile. 31# Each test is in a sub-makefile.
32# Keep the list sorted. 32# Keep the list sorted.
 33TESTS+= archive
33TESTS+= comment 34TESTS+= comment
34TESTS+= cond-late 35TESTS+= cond-late
35TESTS+= cond-short 36TESTS+= cond-short
36TESTS+= cond1 37TESTS+= cond1
37TESTS+= cond2 38TESTS+= cond2
38TESTS+= dollar 39TESTS+= dollar
39TESTS+= doterror 40TESTS+= doterror
40TESTS+= dotwait 41TESTS+= dotwait
41TESTS+= envfirst 42TESTS+= envfirst
42TESTS+= error 43TESTS+= error
43TESTS+= # escape # broken by reverting POSIX changes 44TESTS+= # escape # broken by reverting POSIX changes
44TESTS+= export 45TESTS+= export
45TESTS+= export-all 46TESTS+= export-all