RFR: 8294623: gtests does not work with googletest release-1.12.0+
Magnus Ihse Bursie
ihse at openjdk.org
Wed Oct 12 06:23:21 UTC 2022
On Wed, 12 Oct 2022 02:25:18 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> The scope of `GTEST_DECLARE_string_(internal_run_death_test)` has been changed in googletest 1.12.0 [1]. So we can see some new compiler errors as below:
>>
>>
>> $ bash configure --with-gtest=/home/dingli/jdk-tools/googletest && make run-test TEST="gtest:all"
>>
>> * For target hotspot_variant-server_libjvm_gtest_objs_gtestMain.o:
>> In file included from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/internal/gmock-port.h:57,
>> from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:49,
>> from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/gmock-actions.h:145,
>> from /home/dingli/jdk-tools/googletest/googlemock/include/gmock/gmock.h:56,
>> from /home/dingli/jdk/test/hotspot/gtest/unittest.hpp:51,
>> from /home/dingli/jdk/test/hotspot/gtest/gtestMain.cpp:39:
>
> It would be good if we can detect the version of the googletest and report an error if it's not 1.8.1. However, in https://github.com/google/googletest/archive/refs/tags/release-1.8.1.tar.gz, I couldn't find any file that contains the version information. The only file that contains some sort of version number doesn't have the right version:
>
>
> ./googlemock/configure.ac: [1.8.0]
>
>
> Maybe `make doctor` can print out some hints about 1.8.1 if it finds that the gtest build has failed?
@iklam I agree that ideally `configure` should complain if you have the wrong version of gtest. But as you say, this is not easy to determine. :-( That was why I skipped this when we added gtest as a prerequisite. But maybe I could do like an SHA256 of the source files and check if it matches..? Hm...
-------------
PR: https://git.openjdk.org/jdk/pull/10503
More information about the hotspot-runtime-dev
mailing list