Module Name:    src
Committed By:   rillig
Date:           Fri Nov 22 05:36:33 UTC 2024

Modified Files:
        src/usr.bin/make/unit-tests: Makefile

Log Message:
tests/make: speed up running the tests

Only 4 of the 389 tests need to postprocess their output, so spare the
extra 'cat' call in the majority of cases.


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/usr.bin/make/unit-tests/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.352 src/usr.bin/make/unit-tests/Makefile:1.353
--- src/usr.bin/make/unit-tests/Makefile:1.352	Thu Oct 31 09:12:13 2024
+++ src/usr.bin/make/unit-tests/Makefile	Fri Nov 22 05:36:33 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.352 2024/10/31 09:12:13 rillig Exp $
+# $NetBSD: Makefile,v 1.353 2024/11/22 05:36:33 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -757,11 +757,12 @@ _SED_CMDS+=	-e '/EGREP=/d'
 
 .rawout.out:
 	@${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} \
-	  < ${.IMPSRC} > ${.TARGET}.tmp1
-	@${POSTPROC.${.PREFIX:T}:Ucat} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2
-	@rm ${.TARGET}.tmp1
-	@echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp2
-	@mv ${.TARGET}.tmp2 ${.TARGET}
+	  < ${.IMPSRC} > ${.TARGET}.tmp
+	@${POSTPROC.${.PREFIX:T}:D \
+	    ${POSTPROC.${.PREFIX:T}} < ${.TARGET}.tmp > ${.TARGET}.post \
+	    && mv ${.TARGET}.post ${.TARGET}.tmp}
+	@echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp
+	@mv ${.TARGET}.tmp ${.TARGET}
 
 # Compare all output files
 test:	${OUTFILES} .PHONY

Reply via email to