Skip to content

Commit 0fc0cc0

Browse files
committed
Run JUnit tests from make check
1 parent 3ce80f1 commit 0fc0cc0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/target/
33
**/*.rs.bk
44
Cargo.lock
5+
check_Builtin/

Makefile

+18
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,21 @@ LIB_to += $(BUILTIN_java:.java=.to)
6060
$(TAS) -o $@ $<
6161

6262
test/Native.texe: test/Native_support.to
63+
64+
JUNIT_JAR_URL = https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.11.0/junit-platform-console-standalone-1.11.0.jar
65+
JUNIT_JAR = test-lib/$(notdir $(JUNIT_JAR_URL))
66+
67+
$(JUNIT_JAR):
68+
mkdir -p $(@D)
69+
wget -O $@ $(JUNIT_JAR_URL)
70+
71+
.PHONY: check
72+
check: check_java
73+
74+
.PHONY: check_java
75+
check_java: check_Builtin
76+
77+
.PHONY: check_Builtin
78+
check_Builtin: check_%: %.java %Test.java $(JUNIT_JAR)
79+
javac -d $@ --class-path $(JUNIT_JAR) $(filter %.java,$^)
80+
java -jar $(JUNIT_JAR) execute --class-path $@ --select-class tyrga.$*Test

0 commit comments

Comments
 (0)