From 396c61f54e54a2be846c98a0a3489c107cbd8bbb Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sat, 17 Jun 2023 16:49:57 -0700 Subject: [PATCH] Restore MCPPBS unit-testing flow --- Makefile.in | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Makefile.in b/Makefile.in index c922e849..69f0405d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -256,7 +256,7 @@ $(2)_test_objs := $$(patsubst %.cc, %.o, $$($(2)_test_srcs)) $(2)_test_deps := $$(patsubst %.o, %.d, $$($(2)_test_objs)) $(2)_test_exes := $$(patsubst %.t.cc, %-utst, $$($(2)_test_srcs)) $(2)_test_outs := $$(patsubst %, %.out, $$($(2)_test_exes)) -$(2)_test_libs := $(1) $$($(2)_reverse_deps) utst +$(2)_test_libs := $(1) $$($(2)_reverse_deps) $(2)_test_libnames := $$(patsubst %, lib%.a, $$($(2)_test_libs)) $(2)_test_libarg := $$(patsubst %, -l%, $$($(2)_test_libs)) @@ -274,7 +274,8 @@ $(2)_junk += \ # Run unit tests $$($(2)_test_outs) : %.out : % - $(RUN) $(RUNFLAGS) ./$$< default | tee $$@ + ./$$< default + touch $$@ $(2)_junk += $$($(2)_test_outs) @@ -359,20 +360,8 @@ deps : $(deps) # Check #------------------------------------------------------------------------- -bintest_outs = $(bintests:=.out) -junk += $(bintest_outs) -%.out: % all - ./$* < /dev/null 2>&1 | tee $@ - -check-cpp : $(test_outs) - @echo - ! grep -h -e'Unit Tests' -e'FAILED' -e'Segmentation' $^ < /dev/null - @echo - -check-bin : $(bintest_outs) - ! tail -n 1 $^ < /dev/null 2>&1 | grep FAILED - -check : check-cpp check-bin +check : $(test_outs) + echo; grep -h -e'Unit Tests' -e'FAILED' -e'Segementation' $^ < /dev/null; echo .PHONY : check