Skip to content

Commit c24ab23

Browse files
author
MohitMaliFtechiz
committed
Renamed compile_and_run_test.sh to run_test.sh as now this script is only for running test cases, removed unnecessary check for directory in run_test.sh
1 parent 4d44799 commit c24ab23

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ task renameLibkiwixSoFile(type: Copy) {
283283

284284
task createCodeCoverageReport(type: Exec) {
285285
workingDir "${projectDir}/src/test/"
286-
commandLine 'sh', '-c', "bash 'compile_and_run_test.sh' ${buildDir}/libs/*lib*.jar $buildDir"
286+
commandLine 'sh', '-c', "bash 'run_test.sh' ${buildDir}/libs/*lib*.jar $buildDir"
287287
}
288288

289289
task checkCurrentJavaVersion() {
Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/bash
22

3-
# This script compiles and runs the unit test to test the java wrapper.
3+
# This script runs the unit test to test the java wrapper.
44
# This is not integrated in meson because ... this is not so easy.
55

66
die()
@@ -9,25 +9,8 @@ die()
99
exit 1
1010
}
1111

12-
# Copy generated .so file to build directory to run test cases
13-
cd ../../../
14-
./gradlew copyBuildKiwixSoFile
15-
cd lib/src/test
16-
17-
KIWIX_LIB_JAR=$1
18-
if [ -z $KIWIX_LIB_JAR ]
19-
then
20-
die "You must give the path to the kiwixlib.jar as first argument"
21-
fi
22-
23-
KIWIX_LIB_DIR=$2
24-
if [ -z $KIWIX_LIB_DIR ]
25-
then
26-
die "You must give the path to directory containing libkiwix.so as second argument"
27-
fi
28-
29-
KIWIX_LIB_JAR=$(readlink -f "$KIWIX_LIB_JAR")
30-
KIWIX_LIB_DIR=$(readlink -f "$KIWIX_LIB_DIR")
12+
KIWIX_LIB_JAR=$(readlink -f "$1")
13+
KIWIX_LIB_DIR=$(readlink -f "$2")
3114
TEST_SOURCE_DIR=$(dirname "$(readlink -f $0)")
3215

3316
cd "$TEST_SOURCE_DIR"

0 commit comments

Comments
 (0)