diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2021-03-08 18:20:06 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-03-16 15:32:33 +0000 |
commit | 81beef929dba5940985b750a33d919ea727db9f0 (patch) | |
tree | 64fc7c833d28d1bdcc2a62083369bf58f7337425 /.gitlab-ci | |
parent | e7ba882cd42ceca7f2d2a961279fca2631a76ab0 (diff) |
ci: Move /usr/bin/time check from meson test wrapper to build script
In jobs where the wrapper isn't used, this leaves the
<build directory>/meson-logs/testlog.txt filename unchanged.
Also prepares for using different wrapper scripts in different jobs.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/meson/build.sh | 7 | ||||
-rwxr-xr-x | .gitlab-ci/meson/test-wrapper.sh | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh index 6cda27a4bb2..bca9e4fea4c 100755 --- a/.gitlab-ci/meson/build.sh +++ b/.gitlab-ci/meson/build.sh @@ -40,6 +40,11 @@ if [ -n "$CROSS" ]; then fi fi +# Only use GNU time if available, not any shell built-in command +if test -f /usr/bin/time; then + MESON_TEST_ARGS+=--wrapper=$PWD/.gitlab-ci/meson/test-wrapper.sh +fi + rm -rf _build meson _build --native-file=native.file \ --wrap-mode=nofallback \ @@ -59,6 +64,6 @@ meson _build --native-file=native.file \ cd _build meson configure ninja -LC_ALL=C.UTF-8 meson test --num-processes ${FDO_CI_CONCURRENT:-4} ${MESON_TEST_ARGS} --wrapper=$PWD/../.gitlab-ci/meson/test-wrapper.sh +LC_ALL=C.UTF-8 meson test --num-processes ${FDO_CI_CONCURRENT:-4} ${MESON_TEST_ARGS} ninja install cd .. diff --git a/.gitlab-ci/meson/test-wrapper.sh b/.gitlab-ci/meson/test-wrapper.sh index aece02734a3..cde6bb71831 100755 --- a/.gitlab-ci/meson/test-wrapper.sh +++ b/.gitlab-ci/meson/test-wrapper.sh @@ -1,11 +1,5 @@ #!/bin/sh -# Only use GNU time if available, not any shell built-in command -if ! test -f /usr/bin/time; then - exec "$@" -fi - - # If the test times out, meson sends SIGTERM to this process. # Simply exec'ing "time" would result in no output from that in this case. # Instead, we need to run "time" in the background, catch the signals and |