Browse Source

oeqa/runtime/ptest: Avoid traceback for tests with no section

Some tests end up without a section, avoid tracebacks trying to use
None as a string in that case.

(From OE-Core rev: 86fb5d898a29761f120c2eaa538a32cf2e078487)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie 6 years ago
parent
commit
fa2db6a72a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      meta/lib/oeqa/runtime/cases/ptest.py

+ 1 - 1
meta/lib/oeqa/runtime/cases/ptest.py

@@ -99,7 +99,7 @@ class PtestRunnerTest(OERuntimeTestCase):
         resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'}
         for section in parse_result.result_dict:
             for test, result in parse_result.result_dict[section]:
-                testname = "ptestresult." + section + "." + "_".join(test.translate(trans).split())
+                testname = "ptestresult." + (section or "No-section") + "." + "_".join(test.translate(trans).split())
                 extras[testname] = {'status': resmap[result]}
 
         failed_tests = {}