ci: Provide consistent results location in LAVA

There is an out-of-sync approach regarding the location of the results
folder: some scripts refer to it via $CI_PROJECT_DIR/results, while
others just assume it is located in the current working directory.

Usually $PWD points to $CI_PROJECT_DIR, but in some cases this is not
the case, hence let's ensure the 'results' folder can always be found
in the current working directory.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
This commit is contained in:
Cristian Ciocaltea 2021-11-04 20:49:05 +02:00 committed by Marge Bot
parent 3e01cea1bd
commit fb2ffc2f67
1 changed files with 6 additions and 5 deletions

View File

@ -91,11 +91,12 @@ if [ -n "$HWCI_START_XORG" ]; then
export DISPLAY=:0
fi
RESULT=fail
if sh $HWCI_TEST_SCRIPT; then
RESULT=pass
rm -rf results/trace/$PIGLIT_REPLAY_DEVICE_NAME
fi
sh "$HWCI_TEST_SCRIPT" && RESULT=pass || RESULT=fail
# Let's make sure the results are always stored in current working directory
mv -f ${CI_PROJECT_DIR}/results ./ 2>/dev/null || true
[ "${RESULT}" = "fail" ] || rm -rf results/trace/$PIGLIT_REPLAY_DEVICE_NAME
# upload artifacts
MINIO=$(cat /proc/cmdline | tr ' ' '\n' | grep minio_results | cut -d '=' -f 2 || true)