From 94273b0ebf10accde2703cc72e505043d1749e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 06:27:13 +0200 Subject: [PATCH] ci: Remove not-printable chars from generated junit file Under windows we get some invalid chars that are causing gitlab not to be able to parse the xml files See: https://github.com/mesonbuild/meson/issues/9894 --- .gitlab-ci/test-msvc.bat | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index c5d64fa36..1ad2e4a57 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -20,8 +20,17 @@ ninja -C _build || goto :error meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% || goto :error meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --setup=unstable_tests --suite=failing --suite=flaky +:: Workaround meson issue https://github.com/mesonbuild/meson/issues/9894 +python -c "n = '_build/meson-logs/testlog.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" || goto :error +python -c "n = '_build/meson-logs/testlog-unstable_tests.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" || goto :error + :: FIXME: can we get code coverage support? goto :EOF :error + +:: Workaround meson issue https://github.com/mesonbuild/meson/issues/9894 +python -c "n = '_build/meson-logs/testlog.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" +python -c "n = '_build/meson-logs/testlog-unstable_tests.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" + exit /b 1