1 |
jsr166 |
1.1 |
#!/bin/bash |
2 |
|
|
|
3 |
|
|
set -eu -o pipefail |
4 |
|
|
|
5 |
|
|
readonly BUILD_JDK="$HOME/jdk/jdk8" |
6 |
|
|
readonly JTREG_REV="jtreg-6.1+1" |
7 |
|
|
|
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 |
|
|
save_package_source jcov |
28 |
|
|
|
29 |
|
|
cp -p "$jtreg_image"/lib/*.jar ../jsr166/lib/. |
30 |
|
|
|
31 |
|
|
( cd ../jsr166 && ant test ) |
32 |
|
|
|
33 |
|
|
exit 0 |
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
main "$@" |