Unverified Commit 7eaf792c authored by norvell's avatar norvell
Browse files

Fix for generate_scripts_from_regressions.py

parent 8a5cfa2c
Loading
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -7,12 +7,13 @@ REPRODUCE_REGRESSION_SCRIPT_TMPL = """
#!/bin/bash -x

SCRIPTS_DIR=/usr/local/scripts
REF_DIR=/usr/local/scripts # float main should be the same as the scripts folder from now on. Note that the user needs write access to this folder, so it could be a local clone for reproducing test cases
REF_DIR=../ivas-codec # float main should be the same as the scripts folder from now on. Note that the user needs write access to this folder, so it could be a local clone for reproducing test cases
LTV_DIR=/usr/local/ltv

MIN_DATE={min_date}
MIN_SHA={min_sha}
LEVEL_SCALING={level_scaling}
MLD_PLAYBACK_LEVEL={mld_playback_level}
TESTCASE="{testcase}"

REF_ENC1={REF_ENC1}
@@ -25,8 +26,6 @@ REF_DEC2={REF_DEC2}
DUT_ENC2={DUT_ENC2}
DUT_DEC2={DUT_DEC2}

INV_LEVEL_SCALING=$(awk "BEGIN {{print 1.0 / $LEVEL_SCALING}}")

# Obtain reference executables from past reference
working_dir=$(pwd)
pushd $REF_DIR
@@ -82,7 +81,7 @@ tests/scale_pcm.py ./scripts/testv/ "$LEVEL_SCALING"
cp IVAS_rend_ref_1 IVAS_rend_ref
cp IVAS_rend_1 IVAS_rend
python3 -m pytest "$TESTCASE" -n 1 --update_ref 1 --create_ref --param_file scripts/config/self_test_ltv.prm --use_ltv --ref_encoder_path $REF_ENC1 --ref_decoder_path $REF_DEC1 
python3 -m pytest "$TESTCASE" -n 1                --create_cut --param_file scripts/config/self_test_ltv.prm --use_ltv --dut_encoder_path $DUT_ENC1 --dut_decoder_path $DUT_DEC1 --mld --ssnr --odg --scalefac $INV_LEVEL_SCALING --junit-xml=report1.xml --html=report1.html --self-contained-html
python3 -m pytest "$TESTCASE" -n 1                --create_cut --param_file scripts/config/self_test_ltv.prm --use_ltv --dut_encoder_path $DUT_ENC1 --dut_decoder_path $DUT_DEC1 --mld --ssnr --odg --mld-playback-level $MLD_PLAYBACK_LEVEL --junit-xml=report1.xml --html=report1.html --self-contained-html
python3 scripts/parse_xml_report.py report1.xml report1.csv

# Store results from first run
@@ -94,7 +93,7 @@ cp -r tests/renderer/cut tests1/renderer
cp IVAS_rend_ref_2 IVAS_rend_ref
cp IVAS_rend_2 IVAS_rend
python3 -m pytest "$TESTCASE" -n 1 --update_ref 1 --create_ref --param_file scripts/config/self_test_ltv.prm --use_ltv --ref_encoder_path $REF_ENC2 --ref_decoder_path $REF_DEC2
python3 -m pytest "$TESTCASE" -n 1                --create_cut --param_file scripts/config/self_test_ltv.prm --use_ltv --dut_encoder_path $DUT_ENC2 --dut_decoder_path $DUT_DEC2 --mld --ssnr --odg --scalefac $INV_LEVEL_SCALING --junit-xml=report2.xml --html=report2.html --self-contained-html
python3 -m pytest "$TESTCASE" -n 1                --create_cut --param_file scripts/config/self_test_ltv.prm --use_ltv --dut_encoder_path $DUT_ENC2 --dut_decoder_path $DUT_DEC2 --mld --ssnr --odg --mld-playback-level $MLD_PLAYBACK_LEVEL --junit-xml=report2.xml --html=report2.html --self-contained-html
python3 scripts/parse_xml_report.py report2.xml report2.csv

"""
@@ -106,10 +105,13 @@ def main(critical_list):
    for row_counter, row in critical.iterrows():
        # Find level
        level_scaling = 1.0
        mld_playback_level = 92.0
        if "lev+10" in row["job"]:
            level_scaling = 3.162
            mld_playback_level = 82.0
        if "lev-10" in row["job"]:
            level_scaling = 0.3162
            mld_playback_level = 102.0

        # Find executables setup
        REF_ENC1 = "IVAS_cod_ref_1"
@@ -132,6 +134,7 @@ def main(critical_list):
            min_date=row["min_date"],
            min_sha=row["min_sha"][1:],
            level_scaling=level_scaling,
            mld_playback_level=mld_playback_level,
            testcase=row["testcase"],
            REF_ENC1=REF_ENC1,
            REF_DEC1=REF_DEC1,