diff --git a/java-1.8.0-alibaba-dragonwell.spec b/java-1.8.0-alibaba-dragonwell.spec index 47a0a124bdaf39ef474f33ee13e798439de02ab1..ae077dcefe6268f6bd13674a399c648478c8f85e 100644 --- a/java-1.8.0-alibaba-dragonwell.spec +++ b/java-1.8.0-alibaba-dragonwell.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %bcond_without fastdebug %bcond_without slowdebug @@ -205,6 +205,9 @@ Source20: repackReproduciblePolycies.sh Source100: config.guess Source101: config.sub +#jtreg zip +Source110: jtreg5.1-b01.zip + Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch # RH1582504: Use RSA as default for keytool, as DSA is disabled in all crypto policies except LEGACY Patch1003: rh1582504-rsa_default_for_keytool.patch @@ -780,6 +783,10 @@ popd # Extract systemtap tapsets tar --strip-components=1 -x -I xz -f %{SOURCE8} + +# Extrace jtreg zip file +rm -rf jtreg +unzip %{SOURCE110} %if %{with slowdebug} cp -r tapset tapset-slowdebug @@ -839,6 +846,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} @@ -848,6 +860,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..." @@ -883,7 +896,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 \ @@ -891,6 +905,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 } @@ -2717,6 +2732,9 @@ alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} $key %{_jvmdir}/%{sd %endif %changelog +* Thu Jun 14 2024 yansendao.ysd - 3:8.15.16.372-3 +- support make test during spec build + * Fri Sep 15 2023 lvfei.lv - 3:8.15.16.372-2 - fix the version of package 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