1 |
jsr166 |
1.1 |
#!/bin/bash |
2 |
|
|
|
3 |
|
|
set -eu -o pipefail |
4 |
|
|
|
5 |
|
|
readonly BUILD_JDK="$HOME/jdk/jdk11" |
6 |
jsr166 |
1.4 |
readonly JTREG_REV="jtreg-7.3+1" |
7 |
jsr166 |
1.1 |
|
8 |
|
|
main() { |
9 |
|
|
[[ "$PWD" =~ /lib-src$ ]] \ |
10 |
|
|
|| { echo Always run from lib-src directory >&2; exit 1; } |
11 |
|
|
|
12 |
|
|
rm -rf jtreg |
13 |
|
|
git clone -q https://github.com/openjdk/jtreg.git |
14 |
|
|
git -C jtreg checkout -q "$JTREG_REV" |
15 |
|
|
git -C jtreg status |
16 |
|
|
jar cf jtreg-source.zip jtreg |
17 |
|
|
( cd jtreg && bash make/build.sh --jdk "$BUILD_JDK"; ) |
18 |
|
|
|
19 |
|
|
local -r jtreg_image="jtreg/build/images/jtreg" |
20 |
|
|
chmod -R u+w "$jtreg_image" |
21 |
|
|
save_package_source() { cp -p "jtreg/build/deps/$1/source.zip" "$1-source.zip"; } |
22 |
|
|
|
23 |
|
|
set -x |
24 |
|
|
|
25 |
|
|
save_package_source asmtools |
26 |
|
|
save_package_source jtharness |
27 |
|
|
|
28 |
|
|
cp -p "$jtreg_image"/lib/*.jar ../jsr166/lib/. |
29 |
|
|
|
30 |
jsr166 |
1.2 |
# ant test broken as of 2022-12 |
31 |
|
|
# ( cd ../jsr166 && ant test ) |
32 |
jsr166 |
1.1 |
|
33 |
|
|
exit 0 |
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
main "$@" |