ci: fix directory existence racing in parallel test execution
meson tests sharing a binary (and deviating in their env/args) will produce temporary logs to the same directory, which is assumed to exist only for the duration of a single test. This is problematic when running tests in parallel, as one test may remove the directory before the other(s) finish, causing a test flake. This appends the each test's pid to the output directory to enforce uniqueness and avoid the race. Signed-off-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20779>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$STRACEDIR" = "x" ]; then
|
||||
STRACEDIR=meson-logs/strace/$(for i in $@; do basename -z -- $i; echo -n _; done)
|
||||
STRACEDIR=meson-logs/strace/$(for i in $@; do basename -z -- $i; echo -n _; done).$$
|
||||
fi
|
||||
|
||||
mkdir -p $STRACEDIR
|
||||
|
Reference in New Issue
Block a user