From 3b4e4b6d8082437f5b1f38664157169aa26bb2d7 Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Wed, 3 Feb 2021 11:09:41 -0500 Subject: [PATCH] Add java test script --- runJavaTests/runJavaTests.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 runJavaTests/runJavaTests.sh diff --git a/runJavaTests/runJavaTests.sh b/runJavaTests/runJavaTests.sh new file mode 100755 index 0000000..0f75bb7 --- /dev/null +++ b/runJavaTests/runJavaTests.sh @@ -0,0 +1,14 @@ +#!/bin/bash +javac -cp /usr/share/java/junit4.jar *.java +java -cp /usr/share/java/junit4.jar:. org.junit.runner.JUnitCore $1 + +### Works on Ubunutu (tested on Mint). + +### Install Junit4 from the repos. +### NOTE: Make sure you are using the right version of Junit, +### Update this script as needed as tests are upgraded for correct version + +### Useage: ./runJavaTests.sh [test-name] +### Example: ./runJavaTests.sh MyStudentTest + +### Works just fine everywhere if put in /usr/share/bin/