3 cd -- "$(dirname "${BASH_SOURCE[0]}")"
5 if [ -z "${JAVA_HOME}" ]; then
6 echo "Error: Environment variable JAVA_HOME is not set!"
10 if [ ! -d "${JAVA_HOME}" ]; then
11 echo "Error: Directory JAVA_HOME='${JAVA_HOME}' not found!"
15 export PATH
="${JAVA_HOME}/bin:${PATH}"
17 if ! which java
>/dev
/null
; then
18 echo "Error: Required command 'java' not found!"
22 if ! which pv
>/dev
/null
; then
23 echo "Error: Required command 'pv' not found!"
27 JUNIT_RUNNER_PATH
="$(find -L "${PWD}/libexec
" -type f -name 'junit-platform-console-standalone*.jar' | head -n 1)"
28 if [[ -z "${JUNIT_RUNNER_PATH}" ||
! -e "${JUNIT_RUNNER_PATH}" ]]; then
29 echo "Error: Required file \"libexec/junit-platform-console-standalone.jar\" not found!"
30 echo "Please download from https://mvnrepository.com/artifact/org.junit.platform/junit-platform-console-standalone"
34 JAR_FILE_PATH
="$(find -L "${PWD}/dist
" -type f -name 'fast-key-erasure.*.tests.jar' | head -n 1)"
35 if [[ -z "${JAR_FILE_PATH}" ||
! -e "${JAR_FILE_PATH}" ]]; then
36 echo "Error: File \"dist/fast-key-erasure.tests.jar\" not found. Please build first!"
42 java
-Xmx10g -Xms10g -ea -jar "${JUNIT_RUNNER_PATH}" --classpath "${JAR_FILE_PATH}" --scan-classpath | pv
-q