Commit 88ca3306 authored by Jan Kiene's avatar Jan Kiene
Browse files

cleanup + make fixed ref commit work for comp stage

parent 6ac80834
Loading
Loading
Loading
Loading
Loading
+29 −50
Original line number Diff line number Diff line
@@ -20,16 +20,26 @@ variables:
  # They can be overwritten in the job templates to e.g. only test encoder or decoder in the chain
  DUT_ENCODER_PATH: "./IVAS_cod"
  DUT_DECODER_PATH: "./IVAS_dec"
  DUT_RENDERER_PATH: "./IVAS_rend"
  DUT_POST_RENDERER_PATH: "./ISAR_post_rend"
  REF_ENCODER_PATH: "./IVAS_cod_ref"
  REF_DECODER_PATH: "./IVAS_dec_ref"
  REF_RENDERER_PATH: "./IVAS_rend_ref"
  REF_POST_RENDERER_PATH: "./ISAR_post_rend_ref"
  MERGE_TARGET_ENCODER_PATH: "./IVAS_cod_merge_target"
  MERGE_TARGET_DECODER_PATH: "./IVAS_dec_merge_target"
  MERGE_TARGET_RENDERER_PATH: "./IVAS_rend_merge_target"
  MERGE_TARGET_POST_RENDERER_PATH: "./ISAR_post_rend_merge_target"
  # These path variables are used for building the binaries
  # They should never be overwritten!
  REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_ref"
  REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_ref"
  REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_ref"
  REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_ref"
  MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_target"
  MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_target"
  MERGE_TARGET_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_target"
  MERGE_TARGET_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_target"
  LEVEL_SCALING: "1.0"
  IVAS_PIPELINE_NAME: ''
  BASOP_CI_BRANCH_PC_REPO: "basop-ci-branch-pc"
@@ -174,35 +184,16 @@ stages:

# From float CI
.merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec
  ### build test binaries, initial clean for paranoia reasons
  - make clean
  - make -j
  - mv IVAS_cod IVAS_cod_test
  - mv IVAS_dec IVAS_dec_test
  - mv IVAS_rend IVAS_rend_test
  - git restore .

  ### store the current commit hash
  - source_branch_commit_sha=$(git rev-parse HEAD)
  - *build-merge-target-binaries

  ### checkout version to compare against
  - *mr-fetch-target-branch
  - *mr-get-target-commit
  - git checkout $target_commit
  - echo "Building reference codec at commit $target_commit"
  # need to rename to match the conventions for the renderer tests...
  - mv $MERGE_TARGET_ENCODER_PATH $REF_ENCODER_PATH
  - mv $MERGE_TARGET_DECODER_PATH $REF_DECODER_PATH
  - mv $MERGE_TARGET_RENDERER_PATH $REF_RENDERER_PATH
  - mv $MERGE_TARGET_POST_RENDERER_PATH $REF_POST_RENDERER_PATH

  ### build reference binaries
  - make clean
  - make -j
  - mv IVAS_cod IVAS_cod_ref
  - mv IVAS_dec IVAS_dec_ref
  - mv IVAS_rend IVAS_rend_ref
  - git restore .

  # rename test binaries back
  - mv IVAS_cod_test IVAS_cod
  - mv IVAS_dec_test IVAS_dec
  - mv IVAS_rend_test IVAS_rend

.merge-request-comparison-check: &merge-request-comparison-check
  - echo "--------------- Running merge-request-comparison-check anchor ---------------"
@@ -229,7 +220,8 @@ stages:
  - make -j >> /dev/null
  - mv ./IVAS_cod ./$REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_dec ./$REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_rend ./IVAS_rend_ref
  - mv ./IVAS_rend ./$REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./ISAR_post_rend ./$REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY
  ### Return to current branch
  - git restore .
  - git rev-parse HEAD > $FLOAT_REF_COMMIT_FILE
@@ -250,7 +242,8 @@ stages:
  - make -j >> /dev/null
  - mv ./IVAS_cod ./$MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_dec ./$MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_rend ./IVAS_rend_merge_target
  - mv ./IVAS_rend ./$MERGE_TARGET_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./ISAR_post_rend ./$MERGE_TARGET_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY
  ### Return to current branch
  - git restore .
  - git rev-parse HEAD > $MERGE_TARGET_COMMIT_FILE
@@ -849,10 +842,7 @@ stages:
    - python3 ci/basop-pages/create_summary_page.py $SUMMARY_HTML_ARTIFACT_NAME $CI_JOB_ID $CI_JOB_NAME $IMAGES_ARTIFACT_NAME --measures $MEASURES_FOR_REPORT

    ### run main now
    - git checkout $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
    - git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
    - make clean
    - make -j >> /dev/null
    - *build-merge-target-binaries
    # need to restore cache again
    - *overwrite-pytest-cache-with-artifact
    - python3 -m pytest --tb=no -q $TEST_SUITE -v --keep_files --create_cut --html=$HTML_REPORT_MAIN --self-contained-html --junit-xml=$XML_REPORT_MAIN $comp_args --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout || true
@@ -1424,6 +1414,7 @@ split-rendering-pytest-on-merge-request:
    - *update-scripts-repo
    - *get-commits-behind-count
    - *check-commits-behind-count-in-compare-jobs
    - *merge-request-comparison-setup-codec

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    # write to temporary file as workaround for failures observed with piping echo
@@ -1436,29 +1427,17 @@ split-rendering-pytest-on-merge-request:
    # store the current commit hash
    - source_branch_commit_sha=$(git rev-parse HEAD)

    - *mr-fetch-target-branch
    - *mr-get-target-commit
    - git checkout $target_commit
    - echo "Building reference codec at commit $target_commit"

    # build reference binaries
    - make -j
    - mv IVAS_cod IVAS_cod_ref
    - mv IVAS_dec IVAS_dec_ref
    - mv IVAS_rend IVAS_rend_ref

    ### If ref_using_target is not set, checkout the source branch to use scripts and input from there
    - if [ $ref_using_target == 0 ]; then git restore lib_com/options.h; fi # Revert changes back before checking out another branch to avoid conflicts
    - if [ $ref_using_target == 0 ]; then git checkout $source_branch_commit_sha; fi
    - exit_code=0
    - testcase_timeout=60
    - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout || exit_code=$?

    # back to source branch
    - git restore lib_com/options.h # Revert changes back before checking out another branch to avoid conflicts
    - git checkout $source_branch_commit_sha
    - make clean
    - make -j
    # remporary solution to make it work with and without https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/merge_requests/2181
    - mv $DUT_POST_RENDERER_PATH ISAR_post_rend_tmp
    - cp $REF_POST_RENDERER_PATH $DUT_POST_RENDERER_PATH
    - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout || exit_code=$?
    - mv ISAR_post_rend_tmp $DUT_POST_RENDERER_PATH

    ### Run test using scripts and input from main
    - if [ $ref_using_target == 1 ]; then git restore lib_com/options.h; fi # Revert changes back before checking out another branch to avoid conflicts
@@ -1994,7 +1973,7 @@ coverage-test-on-main-scheduled:
    # Build DuT binaries with GCOV
    - make clean >> /dev/null
    - make GCOV=1 -j
    - cp IVAS_rend IVAS_rend_ref # Copy to ensure instrumented renderer is run in the first pytest call
    - cp IVAS_rend $REF_RENDERER_PATH # Copy to ensure instrumented renderer is run in the first pytest call

    - testcase_timeout=$TESTCASE_TIMEOUT_LTV
    - exit_code_dec=0
+10 −0
Original line number Diff line number Diff line
@@ -12,16 +12,26 @@ variables:
  # They can be overwritten in the job templates to e.g. only test encoder or decoder in the chain
  DUT_ENCODER_PATH: "./IVAS_cod"
  DUT_DECODER_PATH: "./IVAS_dec"
  DUT_RENDERER_PATH: "./IVAS_rend"
  DUT_POST_RENDERER_PATH: "./ISAR_post_rend"
  REF_ENCODER_PATH: "./IVAS_cod_ref"
  REF_DECODER_PATH: "./IVAS_dec_ref"
  REF_RENDERER_PATH: "./IVAS_rend_ref"
  REF_POST_RENDERER_PATH: "./ISAR_post_rend_ref"
  MERGE_TARGET_ENCODER_PATH: "./IVAS_cod_merge_target"
  MERGE_TARGET_DECODER_PATH: "./IVAS_dec_merge_target"
  MERGE_TARGET_RENDERER_PATH: "./IVAS_rend_merge_target"
  MERGE_TARGET_POST_RENDERER_PATH: "./ISAR_post_rend_merge_target"
  # These path variables are used for building the binaries
  # They should never be overwritten!
  REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_ref"
  REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_ref"
  REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_ref"
  REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_ref"
  MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_target"
  MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_target"
  MERGE_TARGET_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_target"
  MERGE_TARGET_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_target"
  LEVEL_SCALING: "1.0"
  BASOP_CI_BRANCH_PC_REPO: "basop-ci-branch"
  PRM_FILES: "scripts/config/self_test.prm scripts/config/self_test_ltv.prm"