diff --git a/java-1.8.0-alibaba-dragonwell.spec b/java-1.8.0-alibaba-dragonwell.spec index 88c18c230e32df5c0b6eb5c43e7239034a541518..4e2b7681a1f1033334ad07d96b268127d94c3313 100644 --- a/java-1.8.0-alibaba-dragonwell.spec +++ b/java-1.8.0-alibaba-dragonwell.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 %bcond_without fastdebug %bcond_without slowdebug @@ -170,6 +170,7 @@ Source4: Alibaba_Dragonwell_8.10.11_aarch64_linux.tar.gz # Systemtap tapsets. Zipped up to keep it small. Source8: tapsets-icedtea-3.15.0.tar.xz +Source12: jtreg5.1-b01.zip BuildArch: x86_64 aarch64 @@ -596,6 +597,10 @@ sed -i 's/WARNINGS_ARE_ERRORS = -Werror/WARNINGS_ARE_ERRORS = -Wno-all/g' %{top_ # Extract systemtap tapsets tar --strip-components=1 -x -I xz -f %{SOURCE8} + +# Extrace jtreg zip file +rm -rf jtreg +unzip %{SOURCE12} %if %{with slowdebug} cp -r tapset tapset-slowdebug @@ -634,6 +639,11 @@ pushd %{top_level_dir_name}/common/autoconf bash autogen.sh popd +abort_build() { + echo "An error \"${1}\" occurred. Exiting build process." + echo exit 1 +} + function buildjdk() { local outputdir=${1} local buildjdk=${2} @@ -643,6 +653,7 @@ function buildjdk() { local top_dir_abs_src_path=$(pwd)/%{top_level_dir_name} local top_dir_abs_build_path=$(pwd)/${outputdir} + local jtreg_path=$(pwd)/jtreg echo "Using output directory: ${outputdir}"; echo "Checking build JDK ${buildjdk} is operational..." @@ -675,7 +686,8 @@ function buildjdk() { --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ --with-extra-cflags="$EXTRA_CFLAGS" \ --with-extra-asflags="$EXTRA_ASFLAGS" \ - --with-extra-ldflags="%{ourldflags}" + --with-extra-ldflags="%{ourldflags}" \ + --with-jtreg=${jtreg_path} echo "######################## make ########################" make \ @@ -683,6 +695,7 @@ function buildjdk() { JAVAC_FLAGS=-g \ SCTP_WERROR= \ ${maketargets} || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false ) + time make test TEST="tier1" JTREG="JOBS=${NUM_PROC};TIMEOUT_FACTOR=4" || abort_build "make test fail" popd } @@ -2456,6 +2469,9 @@ alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} $key %{_jvmdir}/%{sd %endif %changelog +* Thu Jun 14 2024 yansendao.ysd - 3:8.15.16.372-4 +- support make test during spec build + * Thu Nov 23 2023 lvfei.lv - 3:8.15.16.372-3 - remove all patches diff --git a/jtreg5.1-b01.zip b/jtreg5.1-b01.zip new file mode 100644 index 0000000000000000000000000000000000000000..4a9c93e7239588a80754b783f5a848c13f8af2a6 Binary files /dev/null and b/jtreg5.1-b01.zip differ