diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-04-30 15:36:17 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-05-04 11:33:19 -0700 |
commit | 083c5f635741a29f93f95c817601dbc66207699d (patch) | |
tree | b0bcbb26bc160bb0fd6dcc496e733c5317a555da /mesonbuild/backend | |
parent | 0c51762463abd72526ac84f3cfeaa286186ae1d7 (diff) | |
download | meson-083c5f635741a29f93f95c817601dbc66207699d.zip meson-083c5f635741a29f93f95c817601dbc66207699d.tar.gz meson-083c5f635741a29f93f95c817601dbc66207699d.tar.bz2 |
Add native support for gtest tests
Gtest can output junit results with a command line switch. We can parse
this to get more detailed results than the returncode, and put those in
our own Junit output. We basically just throw away the top level
'testsuites' object, then fixup the names of the tests, and shove that
into our junit.
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/backends.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index ad01011..d41cef1 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -42,6 +42,7 @@ class TestProtocol(enum.Enum): EXITCODE = 0 TAP = 1 + GTEST = 2 @classmethod def from_str(cls, string: str) -> 'TestProtocol': @@ -49,11 +50,15 @@ class TestProtocol(enum.Enum): return cls.EXITCODE elif string == 'tap': return cls.TAP + elif string == 'gtest': + return cls.GTEST raise MesonException('unknown test format {}'.format(string)) def __str__(self) -> str: if self is self.EXITCODE: return 'exitcode' + elif self is self.GTEST: + return 'gtest' return 'tap' |