diff --git a/ci-operator/step-registry/acm/opp-app/acm-opp-app-commands.sh b/ci-operator/step-registry/acm/opp-app/acm-opp-app-commands.sh index af49d17bf203e..6ef112353c699 100755 --- a/ci-operator/step-registry/acm/opp-app/acm-opp-app-commands.sh +++ b/ci-operator/step-registry/acm/opp-app/acm-opp-app-commands.sh @@ -270,6 +270,24 @@ RunTestCase2() { # Set trap to generate JUnit XML on exit (regardless of success or failure) trap GenerateJunitXml EXIT +if [ "${MAP_TESTS:-}" = "true" ]; then + eval "$( + typeset -a _fURL=() + type -t wget 1>/dev/null && _fURL=(wget --timeout=30 -qO-) || _fURL=(curl --connect-timeout 10 --max-time 30 -fsSL) + "${_fURL[@]}" \ + https://raw.githubusercontent.com/RedHatQE/OpenShift-LP-QE--Tools/refs/heads/main/libs/bash/ci-operator/interop/common/ExitTrap--PostProcessPrep.sh + )" + if type -t ExitTrap--PostProcessPrep 1>/dev/null; then + trap ' + GenerateJunitXml + LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \ + ExitTrap--PostProcessPrep junit--acm-opp-app.xml + ' EXIT + else + : "WARNING: ExitTrap--PostProcessPrep not available, skipping junit remapping" + fi +fi + ################################################################################ # Pre-flight Checks ################################################################################ diff --git a/ci-operator/step-registry/acm/opp-app/acm-opp-app-ref.yaml b/ci-operator/step-registry/acm/opp-app/acm-opp-app-ref.yaml index 82a0d31e6294d..12f743acadbc4 100644 --- a/ci-operator/step-registry/acm/opp-app/acm-opp-app-ref.yaml +++ b/ci-operator/step-registry/acm/opp-app/acm-opp-app-ref.yaml @@ -8,5 +8,12 @@ ref: requests: cpu: 10m memory: 100Mi + env: + - name: DR__RP__CR_COMP_NAME + default: "lp-interop--OPP" + documentation: Component Readiness component name for junit remapping + - name: MAP_TESTS + default: "false" + documentation: When true, remap junit test suite names for Component Readiness routing documentation: |- Deploys an application that influences and/or uses all components of the OPP bundle. diff --git a/ci-operator/step-registry/acm/tests/observability/acm-tests-observability-commands.sh b/ci-operator/step-registry/acm/tests/observability/acm-tests-observability-commands.sh index 19fab6dbd5596..9f6ba264bc67a 100644 --- a/ci-operator/step-registry/acm/tests/observability/acm-tests-observability-commands.sh +++ b/ci-operator/step-registry/acm/tests/observability/acm-tests-observability-commands.sh @@ -11,7 +11,7 @@ if [ "${MAP_TESTS}" = "true" ]; then if type -t ExitTrap--PostProcessPrep 1>/dev/null; then trap ' LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \ - ExitTrap--PostProcessPrep + ExitTrap--PostProcessPrep junit--acm-observability.xml ' EXIT else echo "WARNING: ExitTrap--PostProcessPrep not available, skipping junit remapping" >&2 diff --git a/ci-operator/step-registry/quay-tests/quay-interop-test/quay-tests-quay-interop-test-commands.sh b/ci-operator/step-registry/quay-tests/quay-interop-test/quay-tests-quay-interop-test-commands.sh index 05b179b7b7563..7881197ea01fa 100644 --- a/ci-operator/step-registry/quay-tests/quay-interop-test/quay-tests-quay-interop-test-commands.sh +++ b/ci-operator/step-registry/quay-tests/quay-interop-test/quay-tests-quay-interop-test-commands.sh @@ -47,7 +47,7 @@ if [ "${MAP_TESTS}" = "true" ]; then trap ' copyArtifacts LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \ - ExitTrap--PostProcessPrep + ExitTrap--PostProcessPrep junit--quay-interop-test.xml ' EXIT else echo "WARNING: ExitTrap--PostProcessPrep not available, falling back to copyArtifacts only" >&2