RFR(M) : 8148244 : Finalize and integrate GTest implementation

Igor Ignatyev igor.ignatyev at oracle.com
Mon May 2 11:21:09 UTC 2016

> 615 lines changed: 605 ins; 2 del; 8 mod; 

> 218 lines changed: 209 ins; 0 del; 9 mod;

> 32029 lines changed: 32018 ins; 0 del; 11 mod; 

Hi all,

could you please review this patch which delivers core of JEP 281: HotSpot C++ Unit-Test Framework[1]? 
in more details, this patch
 - integrates sources of gtest-1.7.0[2] to /test/fmw/gtest (~32k LOC)
 - introduces TEST macros (/hotspot/test/native/unittest.hpp)
  - TEST — a basic unit test, doesn’t require an inited JVM
  - TEST_VM — a test which requires an inited JVM, but expected to leave JVM in a valid state
  - TEST_OTHER_VM — a test which requires a clean inited JVM
  - TEST_VM_ASSERT/TEST_VM_ASSERT_MSG - tests to verify assert, “death”[3] tests which require inited JVM
 - contains two tests as smoke tests for the project and examples. new tests should be added to /hotspot/test/native/ using the same directories layout as a corresponding product source files, and have prefix ‘test_’, e.g. test/native/runtime/test_os.cpp w/ tests for runtime/test_os.cpp
 - updates makefiles to build/run tests : to run tests, one should use 'make test TEST=hotspot_gtest’
 - adds hotspot_gtest to jprt testset 

more information on the project can be found in JEP 281[1].

please be informed, that existing unit tests (aka internal tests) will be ported into new framework later, this activity is tracking by JDK-8077965[4].

PS This patch relies on JDK-8149591[5] which is under review[6].

— Igor

JBS: https://bugs.openjdk.java.net/browse/JDK-8148244
 root      : http://cr.openjdk.java.net/~iignatyev/8148244-root/webrev.00/
 w/o gtest : http://cr.openjdk.java.net/~iignatyev/8148244-root-wo-gtest/webrev.00/
 hotspot   : http://cr.openjdk.java.net/~iignatyev/8148244-hotspot/webrev.00

[1] https://bugs.openjdk.java.net/browse/JDK-8047975
[2] https://github.com/google/googletest/releases/tag/release-1.7.0
[3] https://github.com/google/googletest/blob/master/googletest/docs/V1_7_AdvancedGuide.md#death-tests
[4] https://bugs.openjdk.java.net/browse/JDK-8077965
[5] https://bugs.openjdk.java.net/browse/JDK-8149591
[6] http://mail.openjdk.java.net/pipermail/hotspot-dev/2016-April/022937.html

More information about the hotspot-dev mailing list