Commit fbc1c2a6 authored by Jan Kiene's avatar Jan Kiene
Browse files

convert print-results-banner anchor into script

parent a60d77e2
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -239,11 +239,6 @@ workflow:
      artifacts: true
    - job: build-codec-linux-make

.print-results-banner: &print-results-banner
  -   set +x
  -   echo ""
  -   echo -e "==================================================================================================================\n================================================== TEST RESULTS ==================================================\n==================================================================================================================\n"

# template for test jobs on linux that need the TESTV_DIR
.test-job-linux-needs-testv-dir:
  extends: .test-job-linux
@@ -454,7 +449,7 @@ workflow:
    -   grep "^ERROR" pytest_log.txt | sed "s/^ERROR //" | sed "s/] - .*/]/" > errors_testcases_for_printing.txt || true
    -   num_errors=$(wc -l < errors_testcases_for_printing.txt)

    -   *print-results-banner
    -   bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/print-results-banner.sh
    -   echo "Found these $num_failures non-bitexact testcases:"
    -   cat failed_testcases_for_printing.txt

@@ -474,7 +469,7 @@ workflow:
    -   touch $FAILED_TESTCASES_LIST
    -   touch $ERRORS_TESTCASES_LIST
    -   touch $PYTEST_CACHE_ARTIFACT
    -   *print-results-banner
    -   bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/print-results-banner.sh
    -   echo "All testcases are bitexact."
    - fi
    - exit $exit_code
@@ -538,7 +533,7 @@ workflow:
    -   export PYTEST_ADDOPTS=--last-failed
    - else
    # turn off echoing back of commands for result printout
    -   *print-results-banner
    -   bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/print-results-banner.sh
    -   echo -e "All tested cases were bit-exact between $CI_MERGE_REQUEST_TARGET_BRANCH_NAME and $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME.\nNo need to check for regressions. All is fine."
    -   exit 0
    - fi
@@ -612,7 +607,7 @@ workflow:
    - python3 scripts/basop_check_for_changes_in_testcases.py --show_improvements --xml_report $XML_REPORT_BRANCH $CSV_BRANCH $CSV_MAIN > regression_log.txt || regressions_found=$?

    - exit_code=0
    - *print-results-banner
    - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/print-results-banner.sh
    - if [ $zero_errors_branch != 1 ]; then
    -   echo "Run errors encountered!"
    -   exit_code=$EXIT_CODE_FAIL
@@ -2363,7 +2358,7 @@ check-be-between-renderer-framesizes:
    - zero_errors10=$(cat report-junit-10ms.xml | grep -c 'errors="0"') || true
    - zero_errors=1

    - *print-results-banner
    - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/print-results-banner.sh
    - echo "!! Encoder command lines are in the 20ms log files only !!!"
    - if [ $exit_code -ne 0 ]; then echo "20 ms framesize run already failed with errors."; zero_errors=0; fi
    - if [ $zero_errors5 != 1 ]; then echo "run error with 5ms rendering encountered"; zero_errors=0 ; fi
@@ -2576,7 +2571,7 @@ backup-long-term-job-logs:
  - mv -f ci/complexity_measurements/style.css ${public_dir}/

.complexity-measurements-report-summary: &complexity-measurements-report-summary
  - *print-results-banner
  - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/print-results-banner.sh
  - if [ $ret_val -eq 0 ]; then
  -   echo -e "No crashes occured.\nNo changes in complexity or memory usage (>1%) detected."
  - elif [ $ret_val -eq 123 ]; then
+5 −0
Original line number Diff line number Diff line
#! /bin/bash

set -euo pipefail
echo ""
echo -e "==================================================================================================================\n================================================== TEST RESULTS ==================================================\n==================================================================================================================\n"