Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- folder=<cartella_studente> #student folder
- #Sets up the classPath. If something breaks, probably the problem it's there
- classPath="${folder}/src:../org.apiguardian_1.1.0.v20190826-0900.jar:../org.junit.platform.commons_1.5.1.v20190826-0900.jar:../org.opentest4j_1.2.0.v20190826-0900.jar:../org.hamcrest.core_1.3.0.v20180420-1519.jar:../org.junit.platform.engine_1.5.1.v20190826-0900.jar:../org.junit.jupiter.api_5.5.1.v20190826-0900.jar:../org.junit.platform.launcher_1.5.1.v20190826-0900.jar:../org.junit.jupiter.engine_5.5.1.v20190826-0900.jar:../org.junit.platform.runner_1.5.1.v20190826-0900.jar:../org.junit.jupiter.migrationsupport_5.5.1.v20190826-0900.jar:../org.junit.platform.suite.api_1.5.1.v20190826-0900.jar:../junit.jar:../org.junit.jupiter.params_5.5.1.v20190826-0900.jar:../org.junit.vintage.engine_5.5.1.v20190826-0900.jar"
- #Cleans the project
- rm it/uniroma1/metodologie/MiniBASICTest.class
- find ${folder}/src/ -type f -name "*.class" -exec rm {} \;
- #Recompile from MiniBASICTest
- echo "Compiling it/uniroma1/metodologie/MiniBASICTest.java"
- jdk-14.0.1/bin/javac -encoding iso-8859-1 -classpath "${classPath}" it/uniroma1/metodologie/MiniBASICTest.java
- #If there's any class left behind, compile it manually
- find ${folder}/src/it/uniroma1/metodologie/ -type f -name "*.java" -exec bash -c 'fullName={}; baseName=${fullName::-4}; if [ ! -f "${baseName}class" ]; then echo "Manually compiling ${fullName}"; jdk-14.0.1/bin/javac -encoding iso-8859-1 -classpath "'${classPath}'" ${fullName}; fi' \;
- #BONUS: run the tests (not actually tested lol)
- jdk-14.0.1/bin/java --enable-preview -jar junit-platform-console-standalone-1.6.2.jar -cp ".:${folder}/src" -c it.uniroma1.metodologie.MiniBASICTest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement