Commit 773dd616 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Run pytest MR scripts in parallel

parent 52ad39c7
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1284,6 +1284,12 @@ ivas-pytest-on-merge-request:
    - .rules-merge-request-no-draft
  stage: compare
  timeout: "50 minutes"
  parallel:
    matrix:
      # note: keep in sync with list in $TESTS_DIR_CODEC_BE_ON_MR
      - PYTEST_SCRIPT:
          - test_param_file.py
          - test_sba.py
  variables:
    REPORT_XML: "report--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.xml"
    REPORT_HTML: "report--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.html"
@@ -1313,7 +1319,7 @@ ivas-pytest-on-merge-request:

    ### prepare pytest
    # create references
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1
    - python3 -m pytest "$TESTS_DIR_CODEC_BE_ON_MR"/"$PYTEST_SCRIPT" -v --update_ref 1

    ### Run test using branch scripts and input
    - if [ $ref_using_target == 1 ]; then git checkout $source_branch_commit_sha; fi
@@ -1321,7 +1327,7 @@ ivas-pytest-on-merge-request:
    ### run pytest
    - exit_code=0
    - testcase_timeout=600
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --mld --ssnr --odg --html=$REPORT_HTML --self-contained-html --junit-xml=$REPORT_XML --testcase_timeout=$testcase_timeout || exit_code=$?
    - python3 -m pytest "$TESTS_DIR_CODEC_BE_ON_MR"/"$PYTEST_SCRIPT" -v --mld --ssnr --odg --html=$REPORT_HTML --self-contained-html --junit-xml=$REPORT_XML --testcase_timeout=$testcase_timeout || exit_code=$?
    - zero_errors=$(cat $REPORT_XML | grep -c 'errors="0"') || true

    - python3 scripts/parse_xml_report.py $REPORT_XML $REPORT_CSV