NichtHaskell2.0/src/test/Makefile
Lucas eb313464f0
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Tests (structure) refactored
2024-06-26 11:25:24 +02:00

43 lines
1.4 KiB
Makefile

# Makefile
### IntelliJs play buttons do not work. Run in "src/test" folder with "make" command to run all
### Or run only parts with "make compile-javac", "make clean" etc.
all: compile-javac compile-raupenpiler
compile-javac:
javac -d .\resources\output\javac .\resources\input\CompilerInput.java
compile-raupenpiler:
cd ../.. ; mvn -DskipTests install
cd ../.. ; mvn exec:java -Dexec.mainClass="main.Main" -Dexec.args="'src/main/resources/input/CompilerInput.java' 'src/main/resources/output' "
cp ../main/resources/output/CompilerInput.class .java/resources/output/raupenpiler
test: compile-javac compile-raupenpiler test-javac test-raupenpiler
test-javac:
# gleich wie bei raupenpiler, kann ich ohne funktionierenden Compiler nicht testen
test-raupenpiler:
# move the compiled class to the test/main folder
mv ../main/resources/output/CompilerInput.class .java/main/
# compile the test class
javac .java/main.EndToEndTester.java
# run the test class
java .java/main.EndToEndTester
clean:
# clean output folders
rm -f ../main/resources/output/*.class
rm -f ./resources/output/javac/*.class
rm -f ./resources/output/raupenpiler/*.class
# clean logs
rm -f ../main/resources/logs/*.log
# clean test/main folders from .class files for End-to-End tests
rm -f ./java/main/*.class
# clean javac output from featureTests
rm -f ./resources/input/featureTests/*.class