mirror of
https://github.com/cc65/cc65.git
synced 2024-06-09 22:29:35 +00:00
Merge pull request #1916 from spiro-trikaliotis/split-asm-listing-test-stdout-stderr
Split stdout and stderr in test/asm/
This commit is contained in:
commit
1ce044c2b4
|
@ -9,7 +9,6 @@ ifdef CMD_EXE
|
||||||
EXE = .exe
|
EXE = .exe
|
||||||
MKDIR = mkdir $(subst /,\,$1)
|
MKDIR = mkdir $(subst /,\,$1)
|
||||||
RMDIR = -rmdir /q /s $(subst /,\,$1)
|
RMDIR = -rmdir /q /s $(subst /,\,$1)
|
||||||
ERRDIR = 2>&1
|
|
||||||
TRUE = exit 0
|
TRUE = exit 0
|
||||||
CAT = type $(subst /,\,$1)
|
CAT = type $(subst /,\,$1)
|
||||||
else
|
else
|
||||||
|
@ -17,7 +16,6 @@ else
|
||||||
EXE =
|
EXE =
|
||||||
MKDIR = mkdir -p $1
|
MKDIR = mkdir -p $1
|
||||||
RMDIR = $(RM) -r $1
|
RMDIR = $(RM) -r $1
|
||||||
ERRDIR = 2>&1
|
|
||||||
TRUE = true
|
TRUE = true
|
||||||
CAT = cat $1
|
CAT = cat $1
|
||||||
endif
|
endif
|
||||||
|
@ -58,14 +56,14 @@ $(WORKDIR)/$1.bin: $1.s $(ISEQUAL)
|
||||||
|
|
||||||
# compile without generating listing
|
# compile without generating listing
|
||||||
ifeq ($(wildcard control/$1.err),)
|
ifeq ($(wildcard control/$1.err),)
|
||||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) $(ERRDIR)
|
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2> $$(@:.bin=.err2)
|
||||||
ifeq ($(wildcard control/$1.no-ld65),)
|
ifeq ($(wildcard control/$1.no-ld65),)
|
||||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) $(ERRDIR)
|
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) $(ERRDIR) || $(TRUE)
|
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2> $$(@:.bin=.err2) || $(TRUE)
|
||||||
ifeq ($(wildcard control/$1.no-ld65),)
|
ifeq ($(wildcard control/$1.no-ld65),)
|
||||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) $(ERRDIR) || $(TRUE)
|
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2) || $(TRUE)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -75,6 +73,12 @@ else
|
||||||
$(ISEQUAL) --empty $$(@:.bin=.err)
|
$(ISEQUAL) --empty $$(@:.bin=.err)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard ref/$1.err2-ref),)
|
||||||
|
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2)
|
||||||
|
else
|
||||||
|
$(ISEQUAL) --empty $$(@:.bin=.err2)
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard ref/$1.bin-ref),)
|
ifneq ($(wildcard ref/$1.bin-ref),)
|
||||||
$(ISEQUAL) --binary ref/$1.bin-ref $$@
|
$(ISEQUAL) --binary ref/$1.bin-ref $$@
|
||||||
endif
|
endif
|
||||||
|
@ -95,16 +99,30 @@ ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard ref/$1.ld65err2-ref),)
|
||||||
|
@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)
|
||||||
|
else
|
||||||
|
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err2),)
|
||||||
|
$(ISEQUAL) --empty $$(@:.bin=.ld65-err2)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# compile with listing file
|
# compile with listing file
|
||||||
ifeq ($(wildcard control/$1.err),)
|
ifeq ($(wildcard control/$1.err),)
|
||||||
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) $(ERRDIR)
|
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2> $$(@:.bin=.list-err2)
|
||||||
ifeq ($(wildcard control/$1.no-ld65),)
|
ifeq ($(wildcard control/$1.no-ld65),)
|
||||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) $(ERRDIR)
|
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) $(ERRDIR) || $(TRUE)
|
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2> $$(@:.bin=.list-err2) || $(TRUE)
|
||||||
ifeq ($(wildcard control/$1.no-ld65),)
|
ifeq ($(wildcard control/$1.no-ld65),)
|
||||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) $(ERRDIR) || $(TRUE)
|
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2) || $(TRUE)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -122,10 +140,26 @@ ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err),)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard ref/$1.err2-ref),)
|
||||||
|
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2)
|
||||||
|
else
|
||||||
|
$(ISEQUAL) --empty $$(@:.bin=.list-err2)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard ref/$1.ld65err2-ref),)
|
||||||
|
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2)
|
||||||
|
else
|
||||||
|
ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err2),)
|
||||||
|
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# check if the result bin is the same as without listing file
|
# check if the result bin is the same as without listing file
|
||||||
ifeq ($(wildcard control/$1.err),)
|
ifeq ($(wildcard control/$1.err),)
|
||||||
|
ifeq ($(wildcard control/$1.err2),)
|
||||||
$(ISEQUAL) $$@ $$(@:.bin=.list-bin)
|
$(ISEQUAL) $$@ $$(@:.bin=.list-bin)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard ref/$1.list-ref),)
|
ifneq ($(wildcard ref/$1.list-ref),)
|
||||||
# we have a reference file, compare that, too
|
# we have a reference file, compare that, too
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
.paramcount = 3
|
.paramcount = 3
|
||||||
.paramcount = 5
|
.paramcount = 5
|
||||||
010-paramcount.s:18: Warning: User warning: r1 is blank!
|
|
||||||
010-paramcount.s:14: Note: Macro was defined here
|
|
||||||
010-paramcount.s:8: Note: Macro was defined here
|
|
||||||
.paramcount = 3
|
.paramcount = 3
|
||||||
.paramcount = 5
|
.paramcount = 5
|
||||||
010-paramcount.s:19: Warning: User warning: r1 is blank!
|
|
||||||
010-paramcount.s:14: Note: Macro was defined here
|
|
||||||
010-paramcount.s:8: Note: Macro was defined here
|
|
||||||
.paramcount = 1
|
.paramcount = 1
|
||||||
.paramcount = 5
|
.paramcount = 5
|
||||||
010-paramcount.s:20: Warning: User warning: r1 is blank!
|
|
||||||
010-paramcount.s:14: Note: Macro was defined here
|
|
||||||
010-paramcount.s:8: Note: Macro was defined here
|
|
||||||
|
|
9
test/asm/listing/ref/010-paramcount.err2-ref
Normal file
9
test/asm/listing/ref/010-paramcount.err2-ref
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
010-paramcount.s:18: Warning: User warning: r1 is blank!
|
||||||
|
010-paramcount.s:14: Note: Macro was defined here
|
||||||
|
010-paramcount.s:8: Note: Macro was defined here
|
||||||
|
010-paramcount.s:19: Warning: User warning: r1 is blank!
|
||||||
|
010-paramcount.s:14: Note: Macro was defined here
|
||||||
|
010-paramcount.s:8: Note: Macro was defined here
|
||||||
|
010-paramcount.s:20: Warning: User warning: r1 is blank!
|
||||||
|
010-paramcount.s:14: Note: Macro was defined here
|
||||||
|
010-paramcount.s:8: Note: Macro was defined here
|
Loading…
Reference in New Issue
Block a user