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>
This commit is contained in:
parent
e7ba882cd4
commit
81beef929d
|
@ -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 ..
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue