From 7a85575158ffc4e4325335a92cd3ae9192747b92 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Thu, 26 Jun 2025 19:48:16 +0200 Subject: [PATCH] fix handling of QUIET in the "test" directory --- test/asm/cpudetect/Makefile | 10 +++++--- test/asm/err/Makefile | 2 ++ test/asm/listing/Makefile | 47 ++++++++++++++++++++++--------------- test/asm/misc/Makefile | 1 + test/asm/opcodes/Makefile | 3 +++ test/asm/val/Makefile | 4 ++-- test/dasm/Makefile | 5 ++++ test/err/Makefile | 5 +++- test/misc/Makefile | 39 +++++++++++++++--------------- test/ref/Makefile | 2 ++ test/standard/Makefile | 1 + test/standard_err/Makefile | 5 +++- test/todo/Makefile | 2 ++ test/val/Makefile | 9 +++---- 14 files changed, 86 insertions(+), 49 deletions(-) diff --git a/test/asm/cpudetect/Makefile b/test/asm/cpudetect/Makefile index fde19b17b..a77e5b576 100644 --- a/test/asm/cpudetect/Makefile +++ b/test/asm/cpudetect/Makefile @@ -20,8 +20,12 @@ else RMDIR = $(RM) -r $1 endif + ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65) @@ -52,8 +56,8 @@ define CPUDETECT_template $(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL) $(if $(QUIET),echo asm/$1-cpudetect.bin) - $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< - $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib + $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< $(CATERR) + $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib $(CATERR) $(ISEQUAL) $1-cpudetect.ref $$@ endef # CPUDETECT_template @@ -61,7 +65,7 @@ endef # CPUDETECT_template $(foreach cpu,$(CPUDETECT_CPUS),$(eval $(call CPUDETECT_template,$(cpu)))) $(WORKDIR)/%.o: %.s | $(WORKDIR) - $(CA65) -l $(@:.o=.lst) -o $@ $< + $(CA65) -l $(@:.o=.lst) -o $@ $< $(NULLOUT) $(CATERR) clean: @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/err/Makefile b/test/asm/err/Makefile index c1a8285e4..5c329138b 100644 --- a/test/asm/err/Makefile +++ b/test/asm/err/Makefile @@ -26,7 +26,9 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65) diff --git a/test/asm/listing/Makefile b/test/asm/listing/Makefile index 9dc871dad..9d815985d 100644 --- a/test/asm/listing/Makefile +++ b/test/asm/listing/Makefile @@ -17,6 +17,7 @@ ifdef CMD_EXE RMDIR = -rmdir /q /s $(subst /,\,$1) TRUE = exit 0 CAT = type $(subst /,\,$1) + NULLDEV = nul: else S = / EXE = @@ -24,10 +25,14 @@ else RMDIR = $(RM) -r $1 TRUE = true CAT = cat $1 + NULLDEV = /dev/null endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65) @@ -82,48 +87,52 @@ endif endif ifneq ($(wildcard ref/$1.err-ref),) - $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err) + $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.err) + $(ISEQUAL) --empty $$(@:.bin=.err) $(NULLERR) endif ifneq ($(wildcard ref/$1.err2-ref),) - $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2) + $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.err2) + $(ISEQUAL) --empty $$(@:.bin=.err2) $(NULLERR) endif ifneq ($(wildcard ref/$1.bin-ref),) - $(ISEQUAL) --binary ref/$1.bin-ref $$@ + $(ISEQUAL) --binary ref/$1.bin-ref $$@ $(NULLERR) endif # rem $(indfo $(CAT) $(subst /,$$S,$$$(@:.bin=.ld65-err))) ifneq ($(wildcard ref/$1.ld65err-ref),) +ifndef QUIET @echo $(CAT) $$(@:.bin=.ld65-err) # FIXME: somehow this refuses to work in cmd.exe ifndef CMD_EXE $(call CAT,$$(@:.bin=.ld65-err)) -diff -u ref/$1.ld65err-ref $$(@:.bin=.ld65-err) endif - $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err) +endif + $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),) - $(ISEQUAL) --empty $$(@:.bin=.ld65-err) + $(ISEQUAL) --empty $$(@:.bin=.ld65-err) $(NULLERR) endif endif ifneq ($(wildcard ref/$1.ld65err2-ref),) +ifndef QUIET @echo $(CAT) $$(@:.bin=.ld65-err2) # FIXME: somehow this refuses to work in cmd.exe ifndef CMD_EXE $(call CAT,$$(@:.bin=.ld65-err2)) -diff -u ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) endif - $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) +endif + $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.ld65-err2),) - $(ISEQUAL) --empty $$(@:.bin=.ld65-err2) + $(ISEQUAL) --empty $$(@:.bin=.ld65-err2) $(NULLERR) endif endif @@ -149,37 +158,37 @@ endif endif ifneq ($(wildcard ref/$1.err-ref),) - $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err) + $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.list-err) + $(ISEQUAL) --empty $$(@:.bin=.list-err) $(NULLERR) endif ifneq ($(wildcard ref/$1.ld65err-ref),) - $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err) + $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err),) - $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err) + $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err) $(NULLERR) endif endif ifneq ($(wildcard ref/$1.err2-ref),) - $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2) + $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.list-err2) + $(ISEQUAL) --empty $$(@:.bin=.list-err2) $(NULLERR) endif ifneq ($(wildcard ref/$1.ld65err2-ref),) - $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2) + $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err2),) - $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2) + $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2) $(NULLERR) endif endif # check if the result bin is the same as without listing file ifeq ($(wildcard control/$1.err),) ifeq ($(wildcard control/$1.err2),) - $(ISEQUAL) $$@ $$(@:.bin=.list-bin) + $(ISEQUAL) $$@ $$(@:.bin=.list-bin) $(NULLERR) endif endif @@ -187,7 +196,7 @@ ifneq ($(wildcard ref/$1.list-ref),) # we have a reference file, compare that, too # remove first line which contains a version number - $(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst) + $(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst) $(NULLERR) endif endef # LISTING_template diff --git a/test/asm/misc/Makefile b/test/asm/misc/Makefile index 1b2305cda..4f24aa041 100644 --- a/test/asm/misc/Makefile +++ b/test/asm/misc/Makefile @@ -30,6 +30,7 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif SIM65FLAGS = -x 200000000 diff --git a/test/asm/opcodes/Makefile b/test/asm/opcodes/Makefile index 70dd41c06..c0918499c 100644 --- a/test/asm/opcodes/Makefile +++ b/test/asm/opcodes/Makefile @@ -22,6 +22,9 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65) diff --git a/test/asm/val/Makefile b/test/asm/val/Makefile index 08c000f95..fe27f97d1 100644 --- a/test/asm/val/Makefile +++ b/test/asm/val/Makefile @@ -51,8 +51,8 @@ define PRG_template $(WORKDIR)/%.$1.prg: %.s | $(WORKDIR) $(if $(QUIET),echo asm/val/$$*.$1.prg) - $(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR) - $(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR) + $(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLOUT) $(NULLERR) + $(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLOUT) $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) endef # PRG_template diff --git a/test/dasm/Makefile b/test/dasm/Makefile index 29e97b9c1..9c19f575c 100644 --- a/test/dasm/Makefile +++ b/test/dasm/Makefile @@ -14,14 +14,19 @@ ifdef CMD_EXE EXE = .exe MKDIR = mkdir $(subst /,\,$1) RMDIR = -rmdir /q /s $(subst /,\,$1) + NULLDEV = nul: else EXE = MKDIR = mkdir -p $1 RMDIR = $(RM) -r $1 + NULLDEV = /dev/null endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) diff --git a/test/err/Makefile b/test/err/Makefile index a0cdc22ae..72b11cd1f 100644 --- a/test/err/Makefile +++ b/test/err/Makefile @@ -26,9 +26,12 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif + CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65) WORKDIR = ../../testwrk/err @@ -45,7 +48,7 @@ $(WORKDIR): $(WORKDIR)/%.s: %.c | $(WORKDIR) $(if $(QUIET),echo err/$*.s) - $(NOT) $(CC65) -o $@ $< $(NULLERR) + $(NOT) $(CC65) -o $@ $< $(NULLOUT) $(CATERR) clean: @$(call RMDIR,$(WORKDIR)) diff --git a/test/misc/Makefile b/test/misc/Makefile index 989e8f83a..fb3730f5c 100644 --- a/test/misc/Makefile +++ b/test/misc/Makefile @@ -30,6 +30,7 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif SIM65FLAGS = -x 200000000 @@ -68,7 +69,7 @@ define PRG_template $(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1209-ind-goto-rev.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) @@ -76,7 +77,7 @@ $(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR) $(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1209-ind-goto-rev-2.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) @@ -84,7 +85,7 @@ $(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDI $(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1209-ind-goto-rev-3.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) @@ -92,40 +93,40 @@ $(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDI $(WORKDIR)/pptest2.$1.$2.prg: pptest2.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/pptest2.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # should compile, but compiler exits with internal error $(WORKDIR)/bug1211-ice-move-refs-2.$1.$2.prg: bug1211-ice-move-refs-2.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1211-ice-move-refs-2.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # this one requires --std=c89, it fails with --std=c99 $(WORKDIR)/bug1265.$1.$2.prg: bug1265.c | $(WORKDIR) $(if $(QUIET),echo misc/bug1265.$1.$2.prg) - $(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR) # should not compile, but gives different diagnostics in C99 mode than in others -$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c | $(WORKDIR) +$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/bug2515.$1.$2.prg) - $(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out + $(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.c99.ref - $(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out + $(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.ref # should not issue any warnings in C99 mode -$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c | $(WORKDIR) +$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/bug2637.$1.$2.prg) - $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2637.$1.$2.out + $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2637.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2637.$1.$2.out bug2637.ref # this one requires -Werror $(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR) $(if $(QUIET),echo misc/bug1768.$1.$2.prg) - $(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR) @@ -133,7 +134,7 @@ $(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR) # should compile, but then hangs in an endless loop $(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR) $(if $(QUIET),echo misc/endless.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(NOT) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR) @@ -142,12 +143,12 @@ $(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR) # in a useful way $(WORKDIR)/bug2655.$1.$2.prg: bug2655.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/bug2655.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/bug2655.$1.$2.out + $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/bug2655.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2655.$1.$2.out bug2655.ref $(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/limits.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/limits.$1.$2.out @@ -155,24 +156,24 @@ $(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR) $(WORKDIR)/goto.$1.$2.prg: goto.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/goto.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/goto.$1.$2.out + $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/goto.$1.$2.out $(ISEQUAL) $(WORKDIR)/goto.$1.$2.out goto.ref # this one requires failure with --std=c89, it fails with --std=cc65 due to # stricter checks $(WORKDIR)/bug2304-implicit-func.$1.$2.prg: bug2304-implicit-func.c | $(WORKDIR) $(if $(QUIET),echo misc/bug2304-implicit-func.$1.$2.prg) - $(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # should not compile until 3-byte struct by value tests are re-enabled $(WORKDIR)/struct-by-value.$1.$2.prg: struct-by-value.c | $(WORKDIR) $(if $(QUIET),echo misc/struct-by-value.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # the rest are tests that fail currently for one reason or another $(WORKDIR)/sitest.$1.$2.prg: sitest.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) endef # PRG_template diff --git a/test/ref/Makefile b/test/ref/Makefile index 2dadf5bcc..4ac8f02a4 100644 --- a/test/ref/Makefile +++ b/test/ref/Makefile @@ -29,7 +29,9 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif SIM65FLAGS = -x 200000000 diff --git a/test/standard/Makefile b/test/standard/Makefile index e359fa975..c58fdc070 100644 --- a/test/standard/Makefile +++ b/test/standard/Makefile @@ -26,6 +26,7 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif SIM65FLAGS = -x 4000000000 -c diff --git a/test/standard_err/Makefile b/test/standard_err/Makefile index f554d33eb..53d4efafd 100644 --- a/test/standard_err/Makefile +++ b/test/standard_err/Makefile @@ -26,9 +26,12 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif + CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65) WORKDIR = ../../testwrk/standard_err @@ -49,7 +52,7 @@ define PRG_template $(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR) $(if $(QUIET),echo standard_err/$$*.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) endef # PRG_template diff --git a/test/todo/Makefile b/test/todo/Makefile index ec14cf8d4..338ffb978 100644 --- a/test/todo/Makefile +++ b/test/todo/Makefile @@ -28,8 +28,10 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif + SIM65FLAGS = -x 200000000 CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65) diff --git a/test/val/Makefile b/test/val/Makefile index 68882971d..58c08d4f8 100644 --- a/test/val/Makefile +++ b/test/val/Makefile @@ -28,6 +28,7 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif SIM65FLAGS = -x 4000000000 -c @@ -56,10 +57,10 @@ define PRG_template $(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR) $(if $(QUIET),echo val/$$*.$1.$2.prg) - $(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLERR) - $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) - $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) - $(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/$$@.out $(CATRES) + $(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) + $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLOUT) $(CATERR) + $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLOUT) $(CATERR) + $(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/$$@.out 2> $(WORKDIR)/$$@.out $(CATRES) endef # PRG_template