Commit c082c0a2 authored by norvell's avatar norvell
Browse files

Re-enable ivas-conformance-linux for all Linux runners

parents f8f69750 6ff9e500
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1443,7 +1443,7 @@ ivas-conformance:

ivas-conformance-linux:
  tags:
    - test-ericsson-linux-runner
    - ivas-linux
  stage: test
  timeout: "90 minutes"
  rules:
@@ -1507,13 +1507,15 @@ ivas-conformance-linux:
        
    # Test run generated scripts in testvec
    - cd testvec   
    - python3 -m pytest conformance-test/test_26252.py --junit-xml=report-junit.xml --html=report.html --self-contained-html
    - exit_code=0    
    - python3 -m pytest conformance-test/test_26252.py --junit-xml=report-junit.xml --html=report.html --self-contained-html || exit_code=$?
    - mv report.html ..
    - mv report-junit.xml ..

    # Collect coverage
    - cd -
    - lcov -c -d obj -o coverage.info
    - commit_sha=$(git rev-parse HEAD)
    - genhtml coverage.info -o coverage -t "Coverage on main @ $commit_sha"

  artifacts:
+30 −0
Original line number Diff line number Diff line
@@ -38,6 +38,36 @@ if __name__ == '__main__':
                    cmds_dec.extend(re.findall(r"DUT decoder command:\\n\\t(.*?)\\n", line))
                    cmds_rend.extend(re.findall(r"Running command\\n(.*?)\\n", line))

    # If pytest-html < v4 is used, the parsing will fail and render empty lists. This is a work-around in case that happens.
    if all(not x for x in [cmds_enc, cmds_dec, cmds_rend]):
        for html_report in input:
            with open(html_report,'r') as infile:
                enc_cmd = False
                dec_cmd = False
                rend_cmd = False
                for line in infile.readlines():
                    if enc_cmd:
                        cmds_enc.append(line)
                        enc_cmd = False
                    elif dec_cmd:
                        cmds_dec.append(line)
                        dec_cmd = False
                    elif rend_cmd:
                        cmds_rend.append(line)
                        rend_cmd = False
                    else:
                        if "DUT encoder command" in line:
                            enc_cmd = True
                        elif "DUT decoder command" in line:
                            dec_cmd = True
                        elif "Running command" in line:
                            rend_cmd = True

    # Sort lists to keep deterministic order between runs
    cmds_enc.sort()
    cmds_dec.sort()
    cmds_rend.sort()

    with open(txt_file.replace('.','_enc.'),'w', newline='\n') as outfile:
        with open('scripts/enc_header.txt','r') as header:
            outfile.write(header.read())