HomeFreeBSD

googletest: backport GTEST_SKIP to googletest 1.8.1
AuditedrS345331

Description

googletest: backport GTEST_SKIP to googletest 1.8.1

This commit backports revisions 00938b2b228f3b70d3d9e51f29a1505bdad43f1e and
59f90a338bce2376b540ee239cf4e269bf6d68ad from googletest's master branch to
our included version of googletest, which is based on 1.8.1. It adds the
GTEST_SKIP feature, which is very useful for a project like FreeBSD where
some tests depend on particular system configurations.

Obtained from: github.com/google/googletest
Sponsored by: The FreeBSD Foundation

Details

Auditors
ngie
Provenance
asomersAuthored on
Parents
rS345330: loader: fix loading of kernels with . in path
Branches
Unknown
Tags
Unknown

Event Timeline

ngie raised a concern with this commit.Mar 20 2019, 5:36 PM
ngie added a subscriber: ngie.

The backport by itself looks good. Two requests:

  1. Could you please do it to ^/vendor/head/google/googletest/dist, then merge in to contrib/googletest (or did you need to make modifications to get it to compile)?
  2. Could you please build the new test (gtest_test_skip) as part of lib/googletest/gtest_main/tests and provide the results for the entire suite (TESTSBASE/lib/googletest)?
This commit now has outstanding concerns.Mar 20 2019, 5:36 PM

The backport by itself looks good. Two requests:

  1. Could you please do it to ^/vendor/head/google/googletest/dist, then merge in to contrib/googletest (or did you need to make modifications to get it to compile)?

I didn't have to modify it, except that a backport technically _is_ a modification, is it not? If I were to do this in vendor/, then our vendor branch wouldn't correspond to any upstream version, which seems wrong to me. Since we'll throw away these changes after importing the next released version of googletest, I thought it fine to use contrib.

  1. Could you please build the new test (gtest_test_skip) as part of lib/googletest/gtest_main/tests and provide the results for the entire suite (TESTSBASE/lib/googletest)?

What's the difference between the lib/googletest/gtest/tests and lib/googletest/gtest_main/tests directories?

...

What's the difference between the lib/googletest/gtest/tests and lib/googletest/gtest_main/tests directories?

They're two separate libraries. gtest_main builds off of gtest, with the sole purpose being that it provides a simple RUN_ALL_TESTS() wrapper.

Test added in r345346.

> pwd && kyua test
/usr/tests/lib/googletest
gmock/gmock_stress_test:main  ->  passed  [0.099s]
gmock_main/gmock-actions_test:main  ->  passed  [0.801s]
gmock_main/gmock-cardinalities_test:main  ->  passed  [0.004s]
gmock_main/gmock-generated-actions_test:main  ->  passed  [0.005s]
gmock_main/gmock-generated-function-mockers_test:main  ->  passed  [0.005s]
gmock_main/gmock-generated-internal-utils_test:main  ->  passed  [0.004s]
gmock_main/gmock-generated-matchers_test:main  ->  passed  [0.009s]
gmock_main/gmock-internal-utils_test:main  ->  passed  [0.277s]
gmock_main/gmock-matchers_test:main  ->  passed  [0.707s]
gmock_main/gmock-more-actions_test:main  ->  passed  [0.005s]
gmock_main/gmock-nice-strict_test:main  ->  passed  [0.006s]
gmock_main/gmock-port_test:main  ->  passed  [0.003s]
gmock_main/gmock-spec-builders_test:main  ->  passed  [0.192s]
gmock_main/gmock_ex_test:main  ->  passed  [0.004s]
gmock_main/gmock_link_test:main  ->  passed  [0.006s]
gmock_main/gmock_test:main  ->  passed  [0.004s]
gtest/googletest-param-test-test:main  ->  passed  [0.187s]
gtest/gtest-unittest-api_test:main  ->  passed  [0.004s]
gtest/gtest_environment_test:main  ->  passed  [0.003s]
gtest/gtest_no_test_unittest:main  ->  passed  [0.003s]
gtest/gtest_premature_exit_test:main  ->  passed  [0.003s]
gtest/gtest_repeat_test:main  ->  passed  [2.784s]
gtest/gtest_stress_test:main  ->  passed  [0.119s]
gtest/gtest_throw_on_failure_ex_test:main  ->  passed  [0.003s]
gtest_main/googletest-death-test-test:main  ->  passed  [0.460s]
gtest_main/googletest-filepath-test:main  ->  passed  [0.006s]
gtest_main/googletest-linked-ptr-test:main  ->  passed  [0.003s]
gtest_main/googletest-listener-test:main  ->  passed  [0.003s]
gtest_main/googletest-message-test:main  ->  passed  [0.004s]
gtest_main/googletest-options-test:main  ->  passed  [0.004s]
gtest_main/googletest-port-test:main  ->  passed  [2.584s]
gtest_main/googletest-printers-test:main  ->  passed  [0.007s]
gtest_main/googletest-test-part-test:main  ->  passed  [0.268s]
gtest_main/gtest-typed-test_test:main  ->  passed  [0.463s]
gtest_main/gtest_main_unittest:main  ->  passed  [0.003s]
gtest_main/gtest_pred_impl_unittest:main  ->  passed  [0.008s]
gtest_main/gtest_prod_test:main  ->  passed  [0.004s]
gtest_main/gtest_skip_test:main  ->  passed  [0.003s]
gtest_main/gtest_sole_header_test:main  ->  passed  [0.003s]
gtest_main/gtest_unittest:main  ->  passed  [1.879s]

Results file id is usr_tests_lib_googletest.20190320-200744-659408
Results saved to /home/somers/.kyua/store/results.usr_tests_lib_googletest.20190320-200744-659408.db

40/40 passed (0 failed)
All concerns with this commit have now been addressed.Mar 20 2019, 8:43 PM