Removing the directory itself can be problematic with certain runner
strategies (B2C).
v2:
- Better deleting pattern matching since the previously used one was
problematic and not pointed out by /bin/sh, as noticed by Emma.
v3:
- Check that the results directory exists before attempting to
delete its content.
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10856>
SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
-rm -rf results
+if [ -d results ]; then
+ cd results && rm -rf ..?* .[!.]* *
+fi
cd /piglit
if [ -n "$USE_CASELIST" ]; then
VERSION=`cat install/VERSION`
-rm -rf results
+if [ -d results ]; then
+ cd results && rm -rf ..?* .[!.]* *
+fi
cd /piglit
export OCL_ICD_VENDORS=$OLDPWD/install/etc/OpenCL/vendors/