qitest is confused by relative test-output-dir arguments
Closed this issue · 1 comments
sbarthelemy commented
when calling qitest run --test-output-dir riri
with a relative test output directory:
- qitest passes the test-output-dir down to gtest without making it absolute
- both qitest and gtest consider the actual target directory is relative to their own call directory
- however, since qitest changes directory when calling gtest, the two resulting directories do not match.
As a consequence
- gtest writes it output to a directory which is not considered by qitest
- qitest, not finding the gtest-generated xml files, generates its own files (with less detailed results)
(see below for an example).
A workaround is to use --test-output-dir with absolute paths.
A fix would be to ensure qitest passes an absolute directory down to gtest.
(Another fix would be to call gtest from the same directory as qitest, but that would probably have side effects).
$ qitest run -c linux64 --test-output-dir riri --verbose -k test_helptext_session
[DEBUG]: [qitest.actions.run] arguments:
action = run
all = False
backtrace = False
break_on_failure = False
build_prefix = None
capture = True
color = auto
config = linux64
coverage = False
coverage_output_dir = None
dep_types = default
excludes = None
groups = None
home = None
ignore_timeouts = False
last_failed = False
nightly = False
nightmare = False
num_cpus = -1
num_jobs = 1
patterns = ['test_helptext_session']
pdb = False
perf = False
projects = []
qitest_jsons = None
quiet = False
repeat_until_fail = 0
single = False
test_output_dir = riri
timestamp = False
title = auto
use_deps = False
valgrind = False
verbose = True
verbose_tests = False
worktree = None
[DEBUG]: Reading config from /home/sbarthelemy/dotfiles/.config/qi/qibuild.xml
[DEBUG]: Reading config from /home/sbarthelemy/dotfiles/.config/qi/qibuild.xml
[DEBUG]: Reading config from /home/sbarthelemy/dotfiles/.config/qi/qibuild.xml
Current build worktree: /home/sbarthelemy/ar/a/s
[DEBUG]: Reading config from /home/sbarthelemy/dotfiles/.config/qi/qibuild.xml
Using toolchain: linux64
Using profile: all
Using profile: nightly
* (1/1) test_helptext_session [DEBUG]: Starting thread.
[DEBUG]: Calling: /home/sbarthelemy/ar/a/s/sdk/libqi/build-linux64/sdk/bin/test_helptext_session --gtest_output=xml:riri/libqi/test-results/test_helptext_session.xml
[DEBUG]: Setting return code to Process.OK
[DEBUG]: Thread terminated.
[OK]
Ran 1 tests in 0s
All pass. Congrats!
$ tree riri/ build-linux64/sdk/riri/
riri/
└── libqi
├── perf-results
└── test-results
└── test_helptext_session.xml
build-linux64/sdk/riri/
└── libqi
└── test-results
└── test_helptext_session.xml
5 directories, 2 files
sbarthelemy commented
fixed