Skip to content

[BASOP CI] Fix in test_param_file.py for tracefile check

norvell requested to merge basop-ci/fix-jbm-tracefile-check into main

There is a check in the JBM test cases that compares the number of the last decoded packet. However, this uses numpy.genfromtxt, which gives an error when the number of columns is inconsistent between lines.

The trace file writer will add an additional column when data->partial_frame == 1:

        /* rtpSeqNo;rtpTs;rcvTime;playTime;active\n */
        if ( data->dataUnit_flag )
        {
            if ( data->partial_frame == 1 )
            {
                fprintf( file, "%d;%d;%d;%f;%d;%d\n", -1, -1, -1, playTime, data->lastDecodedWasActive, data->partialCopyOffset );
            }
            else
            {
                fprintf( file, "%u;%u;%u;%f;%d\n", data->sequenceNumber, data->timeStamp, data->rcvTime, playTime, data->lastDecodedWasActive );
            }
        }
        else
        {
            fprintf( file, "%d;%d;%d;%f;%d\n", -1, -1, -1, playTime, data->lastDecodedWasActive );
        }

This fix is perhaps more clumsy in terms of Python code, but it works when I tested it locally.

Merge request reports

Loading