From 489e7850ab2e86bd84aa7c6f4385eccf59df40a0 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 6 Mar 2025 09:13:08 +0100 Subject: [PATCH] fix(cypress scripts): refs #6695 improve cleanup process and adjust output redirection --- test/cypress/cypressParallel.sh | 2 +- test/cypress/run.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) mode change 100644 => 100755 test/cypress/run.sh diff --git a/test/cypress/cypressParallel.sh b/test/cypress/cypressParallel.sh index 0cada5437..8ef26bcde 100644 --- a/test/cypress/cypressParallel.sh +++ b/test/cypress/cypressParallel.sh @@ -10,6 +10,6 @@ xargs -P "$1" -I {} sh -c ' --headless \ --spec "{}" \ --quiet \ - > /dev/null 2>&1 + > /dev/null ' wait diff --git a/test/cypress/run.sh b/test/cypress/run.sh old mode 100644 new mode 100755 index b3082697c..efaec4e57 --- a/test/cypress/run.sh +++ b/test/cypress/run.sh @@ -1,15 +1,19 @@ #!/bin/bash + cleanup() { - docker-compose -p e2e --project-directory . -f test/cypress/docker-compose.yml down || true + if [[ -z "$ended" ]]; then + ended=true + docker-compose -p e2e --project-directory . -f test/cypress/docker-compose.yml down -v + fi } trap cleanup SIGINT #CLEAN -rm -rf test/cypress/screenshots -rm -rf test/cypress/results -rm -rf test/cypress/reports -rm -rf junit +rm -f test/cypress/screenshots/* +rm -f test/cypress/results/* +rm -f test/cypress/reports/* +rm -f junit/e2e-*.xml #RUN export CI=true