-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·68 lines (62 loc) · 1.83 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·68 lines (62 loc) · 1.83 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
JAVA_HOME="${JAVA_HOME:-/usr/lib/jvm/java-17-openjdk-amd64}"
if [[ ! -x "$JAVA_HOME/bin/javac" ]] && [[ -x /usr/libexec/java_home ]]; then
JAVA_HOME="$(/usr/libexec/java_home -v 17)"
fi
export JAVA_HOME
# Default gate is Maven: JUnit 5 (including binary128 oracles and
# Bid128TgammaBoundaryTest) plus every main() vector suite.
if [[ "${1:-}" != "javac" ]]; then
exec mvn -B test
fi
OUT="$ROOT/target/classes"
JAVAC="$JAVA_HOME/bin/javac"
JAVA="$JAVA_HOME/bin/java"
rm -rf "$ROOT/target"
mkdir -p "$OUT"
SOURCES=()
while IFS= read -r source; do
SOURCES+=("$source")
done < <(
find "$ROOT/binary128/src/main/java" "$ROOT/bid/src/main/java" \
"$ROOT/bid/src/test/java" -name '*.java' \
! -name 'LibraryTests.java' \
! -name 'Bid128TgammaBoundaryTest.java' \
! -name 'IntelNativeReadtestTest.java'
printf '%s\n' \
"$ROOT/binary128/src/test/java/org/bidfp/binary128/Binary128Check.java"
)
"$JAVAC" --release 17 -Werror -Xlint:all -d "$OUT" "${SOURCES[@]}"
"$JAVA" -ea -cp "$OUT" org.bidfp.binary128.Binary128Check
for test_class in \
Bid64Test \
Bid64IntelVectorTest \
Bid64CompareTest \
Bid64ConversionTest \
Bid64AddTest \
Bid64MultiplyTest \
Bid64DivideTest \
Bid64RawKernelTest \
Bid128Test \
Bid128AddTest \
Bid128MultiplyTest \
Bid128DivideTest \
UInt128Test \
BidRawApiTest \
BidBinary128VectorTest \
BidTranscendentalVectorTest \
BidArithmeticVectorTest \
BidComparisonVectorTest \
BidRoundingVectorTest \
BidScaleVectorTest \
BidNextMinMaxVectorTest \
BidFmaRemVectorTest \
BidDpdVectorTest \
BidIntegerVectorTest \
BidMiscVectorTest \
BidUtilityVectorTest \
BidObjectApiTest; do
"$JAVA" -ea -cp "$OUT" "org.bidfp.$test_class"
done