diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-13 21:36:02 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-13 21:36:02 +0300 |
commit | 5e64dbec81504aaacac1e733edd5230f59670466 (patch) | |
tree | 904038fae0b1ceb43f3f9b9de9f843f5d059d068 /tests/makefile | |
parent | 26fcfcf333e852b256af8ed4ca7f9e497958f6d8 (diff) | |
download | ejit-5e64dbec81504aaacac1e733edd5230f59670466.tar.gz ejit-5e64dbec81504aaacac1e733edd5230f59670466.zip |
make tests only compile once
+ Select between jit/bytecode with a runtime parameter
Diffstat (limited to 'tests/makefile')
-rw-r--r-- | tests/makefile | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/makefile b/tests/makefile index 21f68dd..4a0afc9 100644 --- a/tests/makefile +++ b/tests/makefile @@ -1,32 +1,31 @@ include ./tests.mk LLVM ?= 0 -CROSS_COMPILE := +CROSS_COMPILE := COMPILER != [ "$(LLVM)" != "0" ] \ && echo clang --target="$(CROSS_COMPILE)" \ || echo $(CROSS_COMPILE)gcc CFLAGS := -Wall -Wextra -O0 -g INCLUDE_FLAGS := -I include -COMPILE_JIT_TEST := $(COMPILER) $(CFLAGS) $(INCLUDE_FLAGS) -COMPILE_BCODE_TEST := $(COMPILER) $(CFLAGS) $(INCLUDE_FLAGS) -DFORCE_BCODE=1 +COMPILE_TEST := $(COMPILER) $(CFLAGS) $(INCLUDE_FLAGS) .PHONY: check -check: check-bcode check-jit +check: $(TESTS) check-bcode check-jit echo "Success!" .PHONY: check-bcode -check-bcode: $(BCODE_TESTS) +check-bcode: $(TESTS) @echo "Running bytecode tests..." - @set -e; for test in $(BCODE_TESTS); do \ + @set -e; for test in $(TESTS); do \ echo "Testing: $$test"; \ ./$$test; \ done .PHONY: check-jit -check-jit: $(JIT_TESTS) +check-jit: $(TESTS) @echo "Running jit tests..." - @set -e; for test in $(JIT_TESTS); do \ + @set -e; for test in $(TESTS); do \ echo "Testing: $$test"; \ - ./$$test; \ + ./$$test 1; \ done |