Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): handle errors when sync-mi ...



details:   https://anonhg.NetBSD.org/src/rev/c2d86e4cb409
branches:  trunk
changeset: 945633:c2d86e4cb409
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Nov 02 20:19:33 2020 +0000

description:
make(1): handle errors when sync-mi fails because of a syntax error

diffstat:

 usr.bin/make/unit-tests/Makefile |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r 6956ca05c311 -r c2d86e4cb409 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Mon Nov 02 20:16:26 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Mon Nov 02 20:19:33 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.181 2020/11/01 19:02:22 rillig Exp $
+# $NetBSD: Makefile,v 1.182 2020/11/02 20:19:33 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -544,8 +544,11 @@
        cvs update "$$mi";                                              \
        testsdir="usr.bin/make/unit-tests";                             \
        fmt="./usr/tests/$$testsdir/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \
-       (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi"; \
-       distrib/sets/fmt-list "$$mi";                                   \
+       cat "$$mi" > "$$mi.tmp";                                        \
+       (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi.tmp"; \
+       distrib/sets/fmt-list "$$mi.tmp";                               \
+       echo $$?; \
+       mv "$$mi.tmp" "$$mi";                                           \
        cvs diff "$$mi" || true
 
 .if exists(${TEST_MAKE})



Home | Main Index | Thread Index | Old Index