Passed: ngie-eign/kyua#99 (add-googletest-support - ff52f04)

0 views
Skip to first unread message

Travis CI

unread,
Apr 5, 2019, 11:54:04 PM4/5/19
to kyua...@googlegroups.com

ngie-eign

/

kyua

branch iconadd-googletest-support

arrow to build time
clock icon4 mins and 59 secs

Enji Cooper avatarEnji Cooper

Add Google Test support

This change adds fine grained execution of Google Test test programs.

First, the Google Test test is executed with `--gtest_list_tests`. Next,
based on the output from `--gtest_list_tests`, the testcases are run
individually. The output from each unique testcase is based on the
standard output it provides, per the test output protocol defined in
the GoogleTest docs on github [1], [2], and instrumented via various
demo programs I created, which can be found on GitHub
[here](https://github.com/ngie-eign/scratch/tree/master/programming/c%2B%2B/gtest).

This support is a very rough cut to provide an initial working
integration effort. There're additional improvements that can be made by
leveraging either the JSON or XML structured output format, instead of
scraping standard output using beginning and ending sentinels to search for
regular expressions. In order to do that though without reinventing the wheel,
Kyua would need to rely on an external JSON or XML library.

This test interface supports fine grained execution of test programs
like the ATF test interface, but matches behavior of plain/TAP interfaces by
instead supporting metadata passing via `$TEST_ENV_` prefixed environment
variables.

This support adds additional tests for verifying pass, fail, skip (will
be available in version 1.9.0 and is available in FreeBSD base's version
of Google Test), and disabled result determination, using mock output and a mock
test program (`engine/googletest_helpers`), for parity with other test formats
(ATF, plain, TAP). The helper test program purposely avoids relying on
`getopt_long*` for portability reasons, and the GoogleTest test
infrastructure, in order to limit Kyua's dependencies.

As part of this change, `store/read_transaction.cpp` needed to support
optional reasons provided with skip results. While it's bad form to omit
test results with tests, providing a reason is optional with Google
Test, and unfortunately not all portions of the test framework output a
reason when `GTEST_SKIP()` is called. See the issue in [3] for one such example
issue when `GTEST_SKIP()` is called from SetUp test fixtures.

1. https://github.com/google/googletest/blob/master/googletest/docs/primer.md
2. https://github.com/google/googletest/blob/master/googletest/docs/advanced.md
3. https://github.com/google/googletest/issues/2208

Signed-off-by: Enji Cooper <yaneu...@gmail.com>

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you!

SIGN UP HERE
book icon

Documentation about Travis CI

Have any questions? We're here to help.
Unsubscribe from build emails from the ngie-eign/kyua repository.
To unsubscribe from all build emails, please update your settings.
black and white travis ci logo

Travis CI GmbH, Rigaer Str. 8, 10427 Berlin, Germany | GF: Konstantin Haase, Fritz Thielemann | Contact: con...@travis-ci.com | Amtsgericht Charlottenburg, Berlin, HRB 140133 B | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648

Reply all
Reply to author
Forward
0 new messages