Add a unit test and clearer debug print for issue #39

This commit is contained in:
Don Porter
2017-01-21 13:59:37 -05:00
parent fba92d6a28
commit b3da2aff67
5 changed files with 21 additions and 1 deletions
+3
View File
@@ -36,6 +36,7 @@ class Regression:
run_times = 0
outputs = []
timed_out = False
while run_times < needed_times:
args = []
if self.loader:
@@ -64,6 +65,7 @@ class Regression:
sleep_time += 1
if not finish and p.poll() is None:
timed_out = True
p.kill()
time.sleep(0.1)
@@ -82,6 +84,7 @@ class Regression:
print '\033[92m[Success]\033[0m', name
else:
print '\033[93m[Fail ]\033[0m', name
if timed_out : print 'Test timed out!'
keep_log = True
if self.keep_log and keep_log: