diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-10-16 12:37:30 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-05 10:23:41 -0800 |
commit | d89ec98b4763cda13da0ae22515c27f4dfe5c1b9 (patch) | |
tree | 77c7d63e029c3e3a0cb369124a257a6f21ba763c /mesonbuild/interpreter.py | |
parent | 07ff9c61fed420af33f9d1a561512ff2c6cd21d2 (diff) | |
download | meson-d89ec98b4763cda13da0ae22515c27f4dfe5c1b9.zip meson-d89ec98b4763cda13da0ae22515c27f4dfe5c1b9.tar.gz meson-d89ec98b4763cda13da0ae22515c27f4dfe5c1b9.tar.bz2 |
mtest: Add support for rust unit tests
Rust has it's own built in unit test format, which is invoked by
compiling a rust executable with the `--test` flag to rustc. The tests
are then run by simply invoking that binary. They output a custom test
format, which this patch adds parsing support for. This means that we
can report each subtest in the junit we generate correctly, which should
be helpful for orchestration systems like gitlab and jenkins which can
parse junit XML.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index c20c205..0c6bb99 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -4159,8 +4159,8 @@ This will become a hard error in the future.''' % kwargs['input'], location=self if not isinstance(timeout, int): raise InterpreterException('Timeout must be an integer.') protocol = kwargs.get('protocol', 'exitcode') - if protocol not in {'exitcode', 'tap', 'gtest'}: - raise InterpreterException('Protocol must be "exitcode", "tap", or "gtest".') + if protocol not in {'exitcode', 'tap', 'gtest', 'rust'}: + raise InterpreterException('Protocol must be one of "exitcode", "tap", "gtest", or "rust".') suite = [] prj = self.subproject if self.is_subproject() else self.build.project_name for s in mesonlib.stringlistify(kwargs.get('suite', '')): |