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 /run_unittests.py | |
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 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py index da898a3..3826762 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4625,8 +4625,7 @@ recommended as it is not supported on some platforms''') schema = et.XMLSchema(et.parse(str(Path(__file__).parent / 'data' / 'schema.xsd'))) - testdir = os.path.join(self.common_test_dir, case) - self.init(testdir) + self.init(case) self.run_tests() junit = et.parse(str(Path(self.builddir) / 'meson-logs' / 'testlog.junit.xml')) @@ -4636,10 +4635,13 @@ recommended as it is not supported on some platforms''') self.fail(e.error_log) def test_junit_valid_tap(self): - self._test_junit('213 tap tests') + self._test_junit(os.path.join(self.common_test_dir, '213 tap tests')) def test_junit_valid_exitcode(self): - self._test_junit('44 test args') + self._test_junit(os.path.join(self.common_test_dir, '44 test args')) + + def test_junit_valid_gtest(self): + self._test_junit(os.path.join(self.framework_test_dir, '2 gtest')) class FailureTests(BasePlatformTests): |