ci: Use GNU time as meson test wrapper

This will hopefully give us more information about why some tests are
intermittently timing out.

Only in build jobs using the x86_build docker image for now, since
those are where we're currently seeing most such timeouts. But may
expand this later if it provides the expected benefits.

v2:
* Add comment about why we test for and use /usr/bin/time explicitly.

Acked-by: Eric Engestrom <eric@engestrom.ch> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8776>
This commit is contained in:
Michel Dänzer 2021-01-29 11:03:19 +01:00 committed by Marge Bot
parent cf23161040
commit 35f59e14f8
4 changed files with 11 additions and 2 deletions

View File

@ -277,7 +277,7 @@ x86_build:
extends:
- .use-x86_build-base
variables:
MESA_IMAGE_TAG: &x86_build "2021-1-4-directx-headers"
MESA_IMAGE_TAG: &x86_build "2021-01-29-time"
.use-x86_build:
variables:

View File

@ -32,6 +32,7 @@ apt-get install -y --no-remove \
liblua5.3-dev \
libxml2-dev \
ocl-icd-opencl-dev \
time \
wine-development \
wine32-development

View File

@ -59,6 +59,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}
LC_ALL=C.UTF-8 meson test --num-processes ${FDO_CI_CONCURRENT:-4} --wrapper=$PWD/../.gitlab-ci/meson/test-wrapper.sh
ninja install
cd ..

View File

@ -0,0 +1,8 @@
#!/bin/sh
# Only use GNU time if available, not any shell built-in command
if test -f /usr/bin/time; then
exec /usr/bin/time -v "$@"
fi
exec "$@"