Fix gtest invoking while workdir is set (#7904)

* Fix gtest invoking while workdir is set

* Fix gtest invoking when workdir is not set

* Code style fix

Co-authored-by: Sergey Kartashev <kartashev.sv@mipt.ru>
pull/7946/head
Sergey Kartashev 4 years ago committed by GitHub
parent 42d6b37423
commit c9b7e5bd40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      mesonbuild/mtest.py

@ -697,10 +697,10 @@ class SingleTestRunner:
extra_cmd = [] # type: T.List[str]
if self.test.protocol is TestProtocol.GTEST:
gtestname = '{}.xml'.format(self.test.name)
gtestname = self.test.name
if self.test.workdir:
gtestname = '{}:{}'.format(self.test.workdir, self.test.name)
extra_cmd.append('--gtest_output=xml:{}'.format(gtestname))
gtestname = os.path.join(self.test.workdir, self.test.name)
extra_cmd.append('--gtest_output=xml:{}.xml'.format(gtestname))
p = subprocess.Popen(cmd + extra_cmd,
stdout=stdout,

Loading…
Cancel
Save