Commit 097ed75d authored by kinuthia's avatar kinuthia
Browse files

use exit non-be exit code for non-be case

parent d190a6f2
Loading
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -1200,22 +1200,29 @@ test-be-release-pre-test:
    - mkdir tests\codec_be_to_accepted_release\ref
    - mkdir tests\codec_be_to_accepted_release\dut

    # test generating references
    # create references
    - echo "generate references"

    # encoder, constant brate
    - $testcase_timeout=240   # to be reviewed
    - $zero_errors_enc_const_br_ref=0
    - $zero_failures_ref=0
    - ("& python -m pytest .\tests\codec_be_to_accepted_release\encoder\test_encoder_constant_bitrate.py --update_ref 1 --ref_encoder_path IVAS_cod_ref.exe --ref_decoder_path IVAS_dec_ref.exe --dut_encoder_path IVAS_cod_dut.exe --dut_decoder_path IVAS_dec_dut.exe --html=logs/report-enc-const_br-ref.html --self-contained-html --junit-xml=logs/report-junit-enc-const_br-ref.xml --testcase_timeout $testcase_timeout | out-null") | Invoke-Expression
    - IF (!(Select-String logs/report-junit-enc-const_br-ref.xml -Pattern 'errors="0"')){$zero_errors_enc_const_br_ref=1; echo "Errors encountered"}
    - IF (!(Select-String logs/report-junit-enc-const_br-ref.xml -Pattern 'failures="0"')){$zero_errors_enc_const_br_ref=1; echo "Failed tests encountered in ref generation"}
    - IF (!(Select-String logs/report-junit-enc-const_br-ref.xml -Pattern 'errors="0"')){$zero_errors_enc_const_br_ref=1; echo "Errors encountered in ref generation"}
    - IF (!(Select-String logs/report-junit-enc-const_br-ref.xml -Pattern 'failures="0"')){$zero_failures_ref=1; echo "Failed tests encountered in ref generation"}

    # test encoder dut
    - echo "dut test encoder"

    - $zero_errors_enc_const_br_dut=0
    - $zero_failures_dut=0
    - ("& python -m pytest .\tests\codec_be_to_accepted_release\encoder\test_encoder_constant_bitrate.py --ref_encoder_path IVAS_cod_ref.exe --ref_decoder_path IVAS_dec_ref.exe --dut_encoder_path IVAS_cod_dut.exe --dut_decoder_path IVAS_dec_dut.exe --html=logs/report-enc-const_br-dut.html --self-contained-html --junit-xml=logs/report-junit-enc-const_br-dut.xml --testcase_timeout $testcase_timeout | out-null") | Invoke-Expression
    - IF (!(Select-String logs/report-junit-enc-const_br-dut.xml -Pattern 'errors="0"')){$zero_errors_enc_const_br_dut=1; echo "Errors encountered"}
    - IF (!(Select-String logs/report-junit-enc-const_br-dut.xml -Pattern 'failures="0"')){$zero_errors_enc_const_br_dut=1; echo "Failed tests encountered"}
    - IF (!(Select-String logs/report-junit-enc-const_br-dut.xml -Pattern 'errors="0"')){$zero_errors_enc_const_br_dut=1; echo "Errors encountered in dut"}
    - IF (!(Select-String logs/report-junit-enc-const_br-dut.xml -Pattern 'failures="0"')){$zero_failures_dut=1; echo "Failed tests encountered in dut"}

    - IF($zero_errors_enc_const_br_ref -ne 0 -or $zero_errors_enc_const_br_dut -ne 0 ) {echo "Errors encountered"; exit $EXIT_CODE_FAIL}
    - IF($zero_failures_ref -ne 0 ) {echo "Failed tests encountered in ref generation"; exit $EXIT_CODE_FAIL}
    - IF($zero_failures_dut -ne 0 ) {echo "Non-bitexact cases encountered!"; exit $EXIT_CODE_NON_BE}

  artifacts:
    name: "test-be-to-release--$REF_COMMIT-to-$DUT_COMMIT--results"