Module: Mesa
Branch: master
Commit: 81beef929dba5940985b750a33d919ea727db9f0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=81beef929dba5940985b750a33d919ea727db9f0

Author: Michel Dänzer <[email protected]>
Date:   Mon Mar  8 18:20:06 2021 +0100

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472>

---

 .gitlab-ci/meson/build.sh        | 7 ++++++-
 .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

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to