diff --git a/src/chaos-test/harness.py b/src/chaos-test/harness.py index aea3f322cfd..286aaf2664d 100755 --- a/src/chaos-test/harness.py +++ b/src/chaos-test/harness.py @@ -33,7 +33,7 @@ def run(rr_params): out_array = [] with open(d + "/out", 'r') as out: for line in out: - out_array.append(line) + out_array.append(line.strip()) return [ret, out_array] finally: shutil.rmtree(d) @@ -45,6 +45,7 @@ def run(rr_params): def safe_exit(code): pool.terminate() pool.join() + print() sys.exit(code) print("Running %d iterations of %s/bin/%s %s without chaos mode"%(sanity_runs, objdir, name, ' '.join(params))) @@ -72,7 +73,7 @@ def safe_exit(code): if failed == 0: print("First test failure detected, output:") for line in r[1]: - print(line,) + print(line) failed = failed + 1 if failed == 0: print("PROBLEM: With chaos mode, test %s did not fail in %d runs"%(name, runs)) @@ -83,5 +84,5 @@ def safe_exit(code): print("PROBLEM: Chaos mode didn't really help!") safe_exit(3) +print("SUCCESS") safe_exit(0) -print()