Skip to content

Commit 89ee0c5

Browse files
committed
Convert pass_compile tests to CTest
1 parent 3044a12 commit 89ee0c5

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

CMakeLists.txt

+12
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ foreach(case ${fail_compile_INPUTS})
174174

175175
endforeach()
176176

177+
file(GLOB pass_compile_INPUTS test/pass_compile/*.tas)
178+
foreach(case ${pass_compile_INPUTS})
179+
180+
get_filename_component(basename ${case} NAME_WE)
181+
check_success(
182+
NAME "pass_compile_${basename}"
183+
COMMAND tas
184+
ARGS ${case}
185+
)
186+
187+
endforeach()
188+
177189
check_failure(
178190
NAME "early end of file"
179191
EXPECT "End of file unexpectedly reached"

mk/misc.mk

-3
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,6 @@ check_sim_op check_sim_run: export run=$(tsim) $(tsim_FLAGS) -p tsim.dump_end_st
280280
check_hw_icarus_op check_hw_icarus_run: export run=$(MAKE) -s --no-print-directory -C $(TOP)/hw/icarus run_$* VPATH=$(TOP)/test/op:$(TOP)/test/run BUILDDIR=$(abspath $(BUILDDIR)) PLUSARGS_EXTRA=+DUMPENDSTATE | grep -v -e ^WARNING: -e ^ERROR: -e ^VCD | grep -o 'B.[[:xdigit:]]\{8\}' | tail -n1 | grep -q 'f\{8\}'
281281

282282
check_compile: $(build_tas) $(build_tld)
283-
@$(MAKESTEP) "Building tests from test/ ..."
284-
$(MAKE) $S -C $(TOP)/test
285-
@$(MAKESTEP) "Done building in test/."
286283
@$(MAKESTEP) -n "Building examples from ex/ ... "
287284
$(MAKE) $S MAKESTEP=true --always-make -C $(TOP)/ex && $(MAKESTEP) ok
288285

test/Makefile

+1-8
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ CPPFLAGS += -I$(TOP)/lib
66

77
vpath %.tas $(TOP)/lib
88

9-
vpath %.tas pass_compile/
10-
11-
get_obj_name = $(notdir $(patsubst %.tas,%.to,$1))
12-
13-
PASS_ASSEMBLE := $(call get_obj_name,$(wildcard pass_compile/*))
14-
159
clean_FILES += *.to *.texe
1610
clean_FILES += ops/*.texe
1711

18-
all: positive
19-
positive: $(PASS_ASSEMBLE)
12+
all: ;
2013

0 commit comments

Comments
 (0)