mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Merge pull request #144 from greg-king5/regression-makes
Regression-tests makefiles
This commit is contained in:
commit
d11232214e
@ -1,41 +1,41 @@
|
||||
|
||||
# toplevel makefile for the regression tests
|
||||
# top-level makefile for the regression tests
|
||||
|
||||
MAKE := make --no-print-dir
|
||||
# You can comment this special target when you debug the regression tests.
|
||||
# Then, make will give you more progress reports.
|
||||
.SILENT:
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
CMD_EXE := 1
|
||||
endif
|
||||
|
||||
ifdef CMD_EXE
|
||||
RM := del /f
|
||||
EXE := .exe
|
||||
MKDIR = mkdir
|
||||
RMDIR = rmdir
|
||||
MKDIR := mkdir
|
||||
RMDIR := rmdir
|
||||
else
|
||||
RM := rm -f
|
||||
EXE :=
|
||||
MKDIR = mkdir -p
|
||||
RMDIR = rmdir
|
||||
MKDIR := mkdir -p
|
||||
RMDIR := rmdir
|
||||
endif
|
||||
|
||||
WORKDIR := ../testwrk
|
||||
|
||||
.PHONY: dotests clean
|
||||
.PHONY: all dotests continue mostly-clean clean
|
||||
|
||||
all: dotests
|
||||
|
||||
$(WORKDIR):
|
||||
@$(MKDIR) $(WORKDIR)
|
||||
$(MKDIR) $(WORKDIR)
|
||||
|
||||
$(WORKDIR)/bdiff$(EXE): $(WORKDIR)
|
||||
@$(CC) -o $(WORKDIR)/bdiff$(EXE) bdiff.c
|
||||
$(WORKDIR)/bdiff$(EXE): bdiff.c | $(WORKDIR)
|
||||
$(CC) -O2 -o $@ $<
|
||||
|
||||
dotests: $(WORKDIR)/bdiff$(EXE)
|
||||
@$(MAKE) -C val clean all
|
||||
@$(MAKE) -C ref clean all
|
||||
@$(MAKE) -C err clean all
|
||||
@$(MAKE) -C misc clean all
|
||||
.NOTPARALLEL:
|
||||
|
||||
dotests: mostly-clean continue
|
||||
|
||||
continue: $(WORKDIR)/bdiff$(EXE)
|
||||
@$(MAKE) -C val all
|
||||
@ -43,10 +43,12 @@ continue: $(WORKDIR)/bdiff$(EXE)
|
||||
@$(MAKE) -C err all
|
||||
@$(MAKE) -C misc all
|
||||
|
||||
clean:
|
||||
mostly-clean:
|
||||
@$(MAKE) -C val clean
|
||||
@$(MAKE) -C ref clean
|
||||
@$(MAKE) -C err clean
|
||||
@$(MAKE) -C misc clean
|
||||
@$(RM) $(WORKDIR)/bdiff$(EXE)
|
||||
@$(RMDIR) $(WORKDIR)
|
||||
|
||||
clean: mostly-clean
|
||||
$(RM) $(WORKDIR)/bdiff$(EXE)
|
||||
$(RMDIR) $(WORKDIR)
|
||||
|
@ -2,10 +2,10 @@
|
||||
# makefile for the tests that MUST NOT compile
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
CMD_EXE := 1
|
||||
endif
|
||||
|
||||
CC65FLAGS = -t sim6502
|
||||
CC65FLAGS := -t sim6502
|
||||
|
||||
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
|
||||
|
||||
@ -15,19 +15,12 @@ else
|
||||
RM := rm -f
|
||||
endif
|
||||
|
||||
WORKDIR := ./../../testwrk
|
||||
WORKDIR := ../../testwrk
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
SOURCES := $(wildcard *.c)
|
||||
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
|
||||
TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=$(WORKDIR)/%$(option)prg))
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
@ -47,6 +40,7 @@ $(WORKDIR)/%.oir.prg: %.c
|
||||
! $(CL65) -Oir $(CC65FLAGS) $< -o $@
|
||||
$(WORKDIR)/%.or.prg: %.c
|
||||
! $(CL65) -Or $(CC65FLAGS) $< -o $@
|
||||
|
||||
clean:
|
||||
@$(RM) $(TESTS)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)
|
||||
@$(RM) $(SOURCES:.c=.o)
|
||||
|
@ -2,11 +2,11 @@
|
||||
# makefile for the remaining tests that need special care in one way or another
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
CMD_EXE := 1
|
||||
endif
|
||||
|
||||
CC65FLAGS = -t sim6502
|
||||
SIM65FLAGS = -x 200000000
|
||||
CC65FLAGS := -t sim6502
|
||||
SIM65FLAGS := -x 200000000
|
||||
|
||||
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
|
||||
SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
|
||||
@ -17,51 +17,40 @@ else
|
||||
RM := rm -f
|
||||
endif
|
||||
|
||||
WORKDIR := ./../../testwrk
|
||||
WORKDIR := ../../testwrk
|
||||
|
||||
DIFF := $(WORKDIR)/bdiff
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
SOURCES := $(wildcard *.c)
|
||||
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
|
||||
|
||||
# FIXME: actually use/build differently optimized programs here
|
||||
TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=$(WORKDIR)/%$(option)prg))
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
# should compile, but then hangs in an endless loop
|
||||
$(WORKDIR)/endless%prg: endless.c
|
||||
$(CL65) $(CC65FLAGS) $< -o $@
|
||||
$(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
|
||||
! $(SIM65) $(SIM65FLAGS) $@
|
||||
|
||||
# these need reference data that cant be generated by a host compiled program
|
||||
# these need reference data that can't be generated by a host-compiled program,
|
||||
# in a useful way
|
||||
$(WORKDIR)/limits%prg: limits.c
|
||||
$(CL65) $(CC65FLAGS) $< -o $@
|
||||
$(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
|
||||
$(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/limits.out
|
||||
$(DIFF) $(WORKDIR)/limits.out limits.ref
|
||||
|
||||
# the rest are tests that fail currently for one reason or another
|
||||
$(WORKDIR)/fields%prg: fields.c
|
||||
@echo "FIXME: " $@ "will currently fail"
|
||||
$(CL65) $(CC65FLAGS) $< -o $@
|
||||
@echo "FIXME: " $@ "currently will fail."
|
||||
$(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
|
||||
-$(SIM65) $(SIM65FLAGS) $@
|
||||
$(WORKDIR)/sitest%prg: sitest.c
|
||||
@echo "FIXME: " $@ "will currently fail"
|
||||
-$(CL65) $(CC65FLAGS) $< -o $@
|
||||
-$(SIM65) $(SIM65FLAGS) $@
|
||||
@echo "FIXME: " $@ "currently will fail."
|
||||
-$(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
|
||||
# -$(SIM65) $(SIM65FLAGS) $@
|
||||
|
||||
clean:
|
||||
@$(RM) $(TESTS)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)
|
||||
@$(RM) $(SOURCES:.c=.o)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.out)
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
# compared with reference output
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
CMD_EXE := 1
|
||||
endif
|
||||
|
||||
CC65FLAGS = -t sim6502
|
||||
SIM65FLAGS = -x 200000000
|
||||
CC65FLAGS := -t sim6502
|
||||
SIM65FLAGS := -x 200000000
|
||||
|
||||
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
|
||||
SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
|
||||
@ -18,7 +18,7 @@ else
|
||||
RM := rm -f
|
||||
endif
|
||||
|
||||
WORKDIR := ./../../testwrk
|
||||
WORKDIR := ../../testwrk
|
||||
|
||||
DIFF := $(WORKDIR)/bdiff
|
||||
|
||||
@ -26,17 +26,9 @@ CFLAGS := -O2 -Wall -W -Wextra -fwrapv -fno-strict-overflow
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
REFS := $(patsubst %.c,$(WORKDIR)/%.ref,$(wildcard *.c))
|
||||
|
||||
SOURCES := $(wildcard *.c)
|
||||
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
|
||||
REFS := $(SOURCES:%.c=$(WORKDIR)/%.ref)
|
||||
TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=$(WORKDIR)/%$(option)prg))
|
||||
|
||||
all: $(REFS) $(TESTS)
|
||||
|
||||
@ -86,7 +78,7 @@ $(WORKDIR)/%.or.prg: %.c $(WORKDIR)/%.ref
|
||||
|
||||
clean:
|
||||
@$(RM) $(TESTS)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)
|
||||
@$(RM) $(SOURCES:.c=.o)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.out)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.ref)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.host)
|
||||
|
@ -2,11 +2,11 @@
|
||||
# makefile for the regression tests that return an error code on failure
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
CMD_EXE := 1
|
||||
endif
|
||||
|
||||
CC65FLAGS = -t sim6502
|
||||
SIM65FLAGS = -x 200000000
|
||||
CC65FLAGS := -t sim6502
|
||||
SIM65FLAGS := -x 200000000
|
||||
|
||||
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
|
||||
SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
|
||||
@ -17,19 +17,12 @@ else
|
||||
RM := rm -f
|
||||
endif
|
||||
|
||||
WORKDIR := ./../../testwrk
|
||||
WORKDIR := ../../testwrk
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
SOURCES := $(wildcard *.c)
|
||||
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
|
||||
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
|
||||
TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=$(WORKDIR)/%$(option)prg))
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
@ -67,4 +60,4 @@ $(WORKDIR)/%.or.prg: %.c
|
||||
|
||||
clean:
|
||||
@$(RM) $(TESTS)
|
||||
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)
|
||||
@$(RM) $(SOURCES:.c=.o)
|
||||
|
Loading…
x
Reference in New Issue
Block a user