Sat Jul 4 21:04:25 2020 UTC ()
make(1): improve documentation about adding new tests


(rillig)
diff -r1.59 -r1.60 src/usr.bin/make/unit-tests/Makefile

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

--- src/usr.bin/make/unit-tests/Makefile 2020/06/28 09:42:40 1.59
+++ src/usr.bin/make/unit-tests/Makefile 2020/07/04 21:04:25 1.60
@@ -1,27 +1,37 @@ @@ -1,27 +1,37 @@
1# $NetBSD: Makefile,v 1.59 2020/06/28 09:42:40 rillig Exp $ 1# $NetBSD: Makefile,v 1.60 2020/07/04 21:04:25 rillig Exp $
2# 2#
3# Unit tests for make(1) 3# Unit tests for make(1)
 4#
4# The main targets are: 5# The main targets are:
5#  
6# all: run all the tests 
7# test: run 'all', and compare to expected results 
8# accept: move generated output to expected results 
9# 6#
10# Adding a test case.  7# all:
 8# run all the tests
 9# test:
 10# run 'all', and compare to expected results
 11# accept:
 12# move generated output to expected results
 13#
 14#
 15# Adding a test case
 16#
11# Each feature should get its own set of tests in its own suitably 17# Each feature should get its own set of tests in its own suitably
12# named makefile (*.mk), with its own set of expected results (*.exp), 18# named makefile (*.mk), with its own set of expected results (*.exp),
13# and it should be added to the TESTNAMES list. 19# and it should be added to the TESTNAMES list.
14#  20#
 21# Any added files must also be added to src/distrib/sets/lists/tests/mi.
 22# Makefiles that are not added to TESTNAMES must be ignored in
 23# src/tests/usr.bin/make/t_make.sh (example: include-sub).
 24#
15 25
16.MAIN: all 26.MAIN: all
17 27
18UNIT_TESTS:= ${.PARSEDIR} 28UNIT_TESTS:= ${.PARSEDIR}
19.PATH: ${UNIT_TESTS} 29.PATH: ${UNIT_TESTS}
20 30
21# Each test is in a sub-makefile. 31# Each test is in a sub-makefile.
22# Keep the list sorted. 32# Keep the list sorted.
23TESTNAMES= \ 33TESTNAMES= \
24 comment \ 34 comment \
25 cond-late \ 35 cond-late \
26 cond-short \ 36 cond-short \
27 cond1 \ 37 cond1 \