aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2023-08-30 14:20:41 -0400
committerEli Schwartz <eschwartz93@gmail.com>2023-09-01 14:27:53 -0400
commit0833a0fa670cf741ffb7f50e777d443d39115b6a (patch)
treeaee21ae523381755ce00a1544adfb33530c3b2b2
parent1ec4a0900a0787358464d8bf8623a81bd6dc69dd (diff)
downloadmeson-0833a0fa670cf741ffb7f50e777d443d39115b6a.zip
meson-0833a0fa670cf741ffb7f50e777d443d39115b6a.tar.gz
meson-0833a0fa670cf741ffb7f50e777d443d39115b6a.tar.bz2
tests: move a couple log files into collapsed github groups where possible
-rwxr-xr-xrun_project_tests.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index f6568d4..523db10 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -565,11 +565,11 @@ def run_test_inprocess(testdir: str) -> T.Tuple[int, str, str, str]:
sys.stderr = mystderr = StringIO()
old_cwd = os.getcwd()
os.chdir(testdir)
- test_log_fname = Path('meson-logs', 'testlog.txt')
+ test_log_fname = os.path.join('meson-logs', 'testlog.txt')
try:
returncode_test = mtest.run_with_args(['--no-rebuild'])
- if test_log_fname.exists():
- test_log = test_log_fname.open(encoding='utf-8', errors='ignore').read()
+ if os.path.exists(test_log_fname):
+ test_log = _run_ci_include([test_log_fname])
else:
test_log = ''
returncode_benchmark = mtest.run_with_args(['--no-rebuild', '--benchmark', '--logbase', 'benchmarklog'])
@@ -679,11 +679,10 @@ def _run_test(test: TestDef,
returncode, stdo, stde = res
cmd = '(inprocess) $ ' if inprocess else '$ '
cmd += mesonlib.join_args(gen_args)
- try:
- logfile = Path(test_build_dir, 'meson-logs', 'meson-log.txt')
- with logfile.open(errors='ignore', encoding='utf-8') as fid:
- mesonlog = '\n'.join((cmd, fid.read()))
- except Exception:
+ logfile = os.path.join(test_build_dir, 'meson-logs', 'meson-log.txt')
+ if os.path.exists(logfile):
+ mesonlog = '\n'.join((cmd, _run_ci_include([logfile])))
+ else:
mesonlog = no_meson_log_msg
cicmds = run_ci_commands(mesonlog)
testresult = TestResult(cicmds)