File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1666,6 +1666,16 @@ def __str__(self):
1666
1666
return ret
1667
1667
1668
1668
1669
+ class ValgrindFailedResult(Result):
1670
+ '''a custom Result to allow passing of Vaglrind failures around'''
1671
+ def __init__(self):
1672
+ super(ValgrindFailedResult, self).__init__(None)
1673
+ self.passed = False
1674
+
1675
+ def __str__(self):
1676
+ return "Valgrind error detected"
1677
+
1678
+
1669
1679
class TestSuite(ABC):
1670
1680
"""Base abstract class.
1671
1681
It implements the common function for all vehicle types.
@@ -11823,6 +11833,7 @@ def run_tests(self, tests) -> List[Result]:
11823
11833
valgrind_log = util.valgrind_log_filepath(binary=self.binary,
11824
11834
model=self.frame)
11825
11835
files = glob.glob("*" + valgrind_log)
11836
+ valgrind_failed = False
11826
11837
for valgrind_log in files:
11827
11838
os.chmod(valgrind_log, 0o644)
11828
11839
if os.path.getsize(valgrind_log) > 0:
@@ -11831,6 +11842,9 @@ def run_tests(self, tests) -> List[Result]:
11831
11842
os.path.basename(valgrind_log)))
11832
11843
self.progress("Valgrind log: moving %s to %s" % (valgrind_log, target))
11833
11844
shutil.move(valgrind_log, target)
11845
+ valgrind_failed = True
11846
+ if valgrind_failed:
11847
+ result_list.append(ValgrindFailedResult())
11834
11848
11835
11849
return result_list
11836
11850
You can’t perform that action at this time.
0 commit comments