jjb: lava: fix: test results not being printed
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 9 Jan 2018 21:59:39 +0000 (16:59 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 9 Jan 2018 21:59:39 +0000 (16:59 -0500)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
scripts/system-tests/lava-submit.py

index 5d92177d56fde10d72f4c327ca2a9b81ba38a2d2..38a6fcfe156d024780ed0a834b1a3d3c6aa9a42b 100644 (file)
@@ -111,17 +111,18 @@ def print_test_output(server, job):
 
                     # Decode the base64 file and split on newlines to iterate
                     # on list
-                    testoutput = str(base64.b64decode(bytes(attachment['content'], encoding='UTF-8'))).split('\n')
+                    testoutput = str(base64.b64decode(bytes(attachment['content'], encoding='UTF-8')))
+
+                    testoutput = testoutput.replace('\\n', '\n')
 
                     # Create a generator to iterate on the lines and keeping
                     # the state of the iterator across the two loops.
-                    testoutput_iter = iter(testoutput)
+                    testoutput_iter = iter(testoutput.split('\n'))
                     for line in testoutput_iter:
 
                         # Find the header of the test case and start printing
                         # from there
                         if 'LAVA_SIGNAL_STARTTC run-tests' in line:
-                            found = True
                             print('---- TEST SUITE OUTPUT BEGIN ----')
                             for line in testoutput_iter:
                                 if 'LAVA_SIGNAL_ENDTC run-tests' not in line:
@@ -131,7 +132,6 @@ def print_test_output(server, job):
                                     # section
                                     break
 
-                        if found is True:
                             print('----- TEST SUITE OUTPUT END -----')
                             break
 
This page took 0.025646 seconds and 4 git commands to generate.