[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [clazy/1.4] tests: run_tests.py: Print compiler output when test fails to compile
From: Sergio Martins <null () kde ! org>
Date: 2018-09-22 17:49:47
Message-ID: E1g3m2N-0008E9-Fr () code ! kde ! org
[Download RAW message or body]
Git commit a81154e974545bca4beb6472cbc64eeff6868d20 by Sergio Martins.
Committed on 22/09/2018 at 17:49.
Pushed by smartins into branch '1.4'.
run_tests.py: Print compiler output when test fails to compile
M +10 -0 tests/run_tests.py
https://commits.kde.org/clazy/a81154e974545bca4beb6472cbc64eeff6868d20
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 65a65c4..00c8c33 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -393,6 +393,12 @@ def extract_word(word, in_file, out_file):
in_f.close()
out_f.close()
+def print_file(filename):
+ f = open(filename, 'r')
+ print f.read()
+ f.close()
+
+
def run_unit_test(test, is_standalone):
if test.check.clazy_standalone_only and not is_standalone:
return True
@@ -441,6 +447,10 @@ def run_unit_test(test, is_standalone):
if (not cmd_success and not must_fail) or (cmd_success and must_fail):
print "[FAIL] " + checkname + " (Failed to build test. Check " + \
output_file + " for details)" + print "-------------------"
+ print "Contents of %s:" % output_file
+ print_file(output_file)
+ print "-------------------"
print
return False
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic