Increased output block size from 64 to 96 bytes; now using 8 counter values, instead...
[fast-key-erasure-rng-java.git] / test.sh
blob53e900488c58f418549f55ef797511b05c80cf7e
1 #!/bin/bash
2 set -e
3 cd -- "$(dirname "${BASH_SOURCE[0]}")"
5 if [ -z "${JAVA_HOME}" ]; then
6 echo "Error: Environment variable JAVA_HOME is not set!"
7 exit 1
8 fi
10 if [ ! -d "${JAVA_HOME}" ]; then
11 echo "Error: Directory JAVA_HOME='${JAVA_HOME}' not found!"
12 exit 1
15 export PATH="${JAVA_HOME}/bin:${PATH}"
17 if ! which java >/dev/null; then
18 echo "Error: Required command 'java' not found!"
19 exit 1
22 if ! which pv >/dev/null; then
23 echo "Error: Required command 'pv' not found!"
24 exit 1
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"
31 exit 1
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!"
37 exit 1
40 unset CLASSPATH
42 java -Xmx10g -Xms10g -ea -jar "${JUNIT_RUNNER_PATH}" --classpath "${JAR_FILE_PATH}" --scan-classpath | pv -q