adoptium / temurin-build

Eclipse Temurin™ build scripts - common across all releases/versions
Apache License 2.0
1.03k stars 249 forks source link

Temurin testimage built without gtest support #3956

Open zzambers opened 1 month ago

zzambers commented 1 month ago

Seems like testimage is being built without gtest, causing failures of gtest hotspot tests.

Error:

java.lang.Error: TESTBUG: the library has not been found in /home/jenkins/workspace/Grinder/jdkbinary/openjdk-test-image/hotspot/jtreg/native. Did you forget to use --with-gtest to configure?
    at GTestWrapper.main(GTestWrapper.java:62)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
    at java.base/java.lang.Thread.run(Thread.java:1583)

JavaTest Message: Test threw exception: java.lang.Error
JavaTest Message: shutting down test
judovana commented 1 month ago

Slightly more info in following snippet

  if [[ "$major" -ge "15" ]]; then
    #gtest was removed in jdk15. Recreating it.
    if [ "$major" -ge "21" ] ; then
        GTEST_TAG=v1.14.0
    else
        GTEST_TAG=release-1.8.1
    fi
    pushd ${SRC_DIR}/test/
      mkdir fmw
      wget https://github.com/google/googletest/archive/refs/tags/${GTEST_TAG}.tar.gz
      pushd ${SRC_DIR}/test/fmw
        tar -xf ../${GTEST_TAG}.tar.gz
        mv googletest-${GTEST_TAG#v} gtest
        EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --with-gtest=${SRC_DIR}/test/fmw/gtest"
      popd
    popd
  fi