Commit 9d9a917b authored by Jan Kiene's avatar Jan Kiene
Browse files

add interop test with fxp encoder and flt decoder

parent 6f3264fd
Loading
Loading
Loading
Loading
Loading
+49 −7
Original line number Diff line number Diff line
@@ -73,9 +73,8 @@ stages:
    echo "Commit time was $CI_COMMIT_TIMESTAMP"
    date | xargs echo "System time is"

.mld-test-setup-codec: &mld-test-setup-codec 
.setup-codec: &setup-codec
  - current_commit_sha=$(git rev-parse HEAD)

  ### build reference binaries
  - git checkout $REFERENCE_TAG
  - make clean
@@ -88,6 +87,10 @@ stages:
  - make clean
  - make -j


.mld-test-setup-codec: &mld-test-setup-codec
  - *setup-codec

  ### prepare pytest
  # create short test vectors
  - python3 tests/create_short_testvectors.py
@@ -108,6 +111,12 @@ stages:
  - cp -r $SCRIPTS_DIR/tests .
  - cp $SCRIPTS_DIR/pytest.ini .


.pytest-check-results: &pytest-check-results
  - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
  - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi


# TODO: this needs to be updated in case the reference is updated
.remove-unsupported-testcases: &remove-unsupported-testcases
  - sed -i '1649,1655d' scripts/config/self_test.prm
@@ -170,6 +179,27 @@ stages:
    - cp -r scripts/testv/* $TESTV_DIR/


.ivas-pytest-interop-anchor: &ivas-pytest-interop-anchor
  - *print-common-info
  - *update-scripts-repo
  - *remove-unsupported-testcases

  ### run pytest
  # create short test vectors
  - python3 tests/create_short_testvectors.py
  - exit_code1=0
  - exit_code2=0
  - python3 -m pytest $TEST_SUITE -v --update_ref 1 -m create_ref -n auto --ref_encoder_path $ENCODER --ref_decoder_path $DECODER --html=report_1.html --self-contained-html --junit-xml=report-junit_1.xml || exit_code1=$?
  - python3 -m pytest $TEST_SUITE -v --update_ref 1 -m create_ref_part2 -n auto --ref_encoder_path $ENCODER --ref_decoder_path $DECODER --html=report_2.html --self-contained-html --junit-xml=report-junit_2.xml || exit_code2=$?

  - zero_errors=$(cat report-junit_1.xml report-junit2.xml | grep -c 'errors="0"') || true

  - exit_code=0
  - if [ $exit_code1 -ne 0 || $exit_code2 -ne 0 ]; then exit_code=1; fi
  - *pytest-check-results
  - exit 0


.ivas-pytest-mld-anchor: &ivas-pytest-mld-anchor
  stage: test
  needs: ["build-codec-linux-make"]
@@ -198,8 +228,7 @@ stages:

    - python3 scripts/parse_mld_xml.py report-junit.xml mld.csv

    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi
    - *pytest-check-results
    - exit 0

  allow_failure:
@@ -307,6 +336,19 @@ ivas-pytest-mld-dec-lev+10:
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-mld-anchor

ivas-pytest-interop-enc-fixed-dec-float:
  extends:
    - .rules-pytest-mld
    - .test-job-linux
  stage: test
  needs: ["build-codec-linux-make"]
  timeout: "30 minutes"
  script:
    - *setup-codec
    - ENCODER=./IVAS_cod_ref
    - DECODER=./IVAS_dec_ref
    - *ivas-pytest-interop-anchor

# ---------------------------------------------------------------
# Long test jobs 
# ---------------------------------------------------------------