forked from STAMP-project/dhell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_dhell_tests.sh
More file actions
executable file
·32 lines (26 loc) · 985 Bytes
/
run_dhell_tests.sh
File metadata and controls
executable file
·32 lines (26 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# running tests
# find all classes in target/test-classes and run each of them with jUnit
################################################################################
CurrentDir=`pwd`
BuildDir="target"
ObjDir="$BuildDir/classes"
RunFlags="-classpath $ObjDir"
# silent build
BuildTraces="/tmp/run_hello_app_tests_`date +%Y%m%d_%Hh%M`.traces"
mvn clean package >$BuildTraces 2>&1
JarFile=`find $BuildDir -name "*.jar"`
TestObjDir="$BuildDir/test-classes"
JunitPath="/usr/share/java/junit4.jar"
TestRunFlags="-classpath $TestObjDir:$JarFile:$JunitPath"
TestMainPath="org.junit.runner.JUnitCore"
cd $TestObjDir
TestClassList=`find . -name "*.class" | sed -e "s/\.\///" -e "s/\.class//" -e "s/\//\./g"`
cd $CurrentDir
for testPath in $TestClassList
do
echo "------------------------------------------------------------"
echo "---- $testPath"
echo "------------------------------------------------------------"
java $TestRunFlags $TestMainPath $testPath
done