Commit 7bf9c9df authored by sagnowski's avatar sagnowski
Browse files

Try to fix parsing of voip be test log

parent 591cd2ff
Loading
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -43,12 +43,11 @@ make clean
make all -j 8

# Run the same modes in VoIP and non-VoIP mode with a neutral delay profile
./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_default | tee jbm_be_test_output.txt
./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_voip -J "$network_profile_path" | tee -a jbm_be_test_output.txt
./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_default | tee voip_be_test_output.txt
./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_voip -J "$network_profile_path" | tee -a voip_be_test_output.txt

# Check if Python scripts above failed. They return status 0 even when running a mode fails, so we have to parse log file
run_errors=$(grep -i failed jbm_be_test_output.txt) || true
if [ "$run_errors" != 0 ] ; then
if grep -iq failed voip_be_test_output.txt ; then
    echo "Run errors in runIvasCodec.py"
    exit 1
fi
@@ -69,7 +68,7 @@ fi
for cut in "$output_dir_voip_dec"/*.wav; do
    output_path=${cut/$output_dir_voip_dec/$output_dir_voip_dec_trimmed}
    output_path=${output_path/".wav"/".raw"}
    python3 "$python_audiofile_script_path" pre-trim 60 "$cut" "$output_path" | tee -a jbm_be_test_output.txt
    python3 "$python_audiofile_script_path" pre-trim 60 "$cut" "$output_path" | tee -a voip_be_test_output.txt
done

# Convert non-VoIP output from wav to pcm (comparison script doesn't support wav)
@@ -83,7 +82,7 @@ fi
for ref in "$output_dir_default_dec"/*.wav; do
    output_path=${ref/$output_dir_default_dec/$output_dir_default_dec_pcm}
    output_path=${output_path/".wav"/".raw"}
    python3 "$python_audiofile_script_path" convert "$ref" "$output_path" | tee -a jbm_be_test_output.txt
    python3 "$python_audiofile_script_path" convert "$ref" "$output_path" | tee -a voip_be_test_output.txt
done

# Assert BE between non-VoIP and VoIP modes
@@ -96,17 +95,17 @@ for ref in "$output_dir_default_dec_pcm"/*; do
    cut=${cut/".dec."/"_jbm_dly_error_profile_0_dat.dec."}

    # Print paths of compared files, since the script doesn't do it
    printf "\nComparing %s and %s\n" "$ref" "$cut" | tee -a jbm_be_test_output.txt
    printf "\nComparing %s and %s\n" "$ref" "$cut" | tee -a voip_be_test_output.txt
    printout=$($cmp_custom_path "$ref" "$cut" 2 0)
    if [ $? -ne 0 ]; then
        all_be=0
    fi
    printf "%s\n" "$printout" | tee -a jbm_be_test_output.txt
    printf "%s\n" "$printout" | tee -a voip_be_test_output.txt
done

if [ $all_be -eq 1 ]; then
    printf "\n\nAll tested conditions are bit-exact\n" | tee -a jbm_be_test_output.txt
    printf "\n\nAll tested conditions are bit-exact\n" | tee -a voip_be_test_output.txt
else
    printf "\n\nBitexactness problems found!\n" | tee -a jbm_be_test_output.txt
    printf "\n\nBitexactness problems found!\n" | tee -a voip_be_test_output.txt
    exit 1;
fi