Skip to contentSkip to conversation

parselogs.py: output correct log location

PATCH New Chen Qi 1 participant 2 messages Aug 13, 2018

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover parselogs.py: output correct log location

*** BLURB HERE ***
The following changes since commit 028a292001f64ad86c6b960a05ba1f6fd72199de:

binutils: enable x86_64-pep for producing EFI binaries on x86-64 (2018-08-09 23:47:56 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/parselogs_fix
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/parselogs_fix

Chen Qi (1):
parselogs.py: output correct log location

 meta/lib/oeqa/runtime/cases/parselogs.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 parselogs.py: output correct log location

The log entry in results is altered to remove 'target_logs'. This causes wrong log location in output.

e.g.
AssertionError: 1 != 0 : Log: /path/to/image/1.0-r0/postinstall.log

But when user wants to check the log, the user will find the log is
not present. The actual log file is /path/to/image/1.0-r0/target_logs/postinstall.log.

So fix to use the correct log location.

---
 meta/lib/oeqa/runtime/cases/parselogs.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/runtime/cases/parselogs.py +2 -2
index 017b550..f6e9820 100644
@@ -313,7 +313,7 @@ class ParseLogsTest(OERuntimeTestCase):
                 pass
 
             if result is not None:
-                results[log.replace('target_logs/','')] = {}
+                results[log] = {}
                 rez = result.splitlines()
 
                 for xrez in rez:
@@ -323,7 +323,7 @@ class ParseLogsTest(OERuntimeTestCase):
                         grep_output = check_output(cmd).decode('utf-8')
                     except:
                         pass
-                    results[log.replace('target_logs/','')][xrez]=grep_output
+                    results[log][xrez]=grep_output
 
         return results
 
Signature · 1 line
1.9.1