This change returns a system error code if tests fail when
running any of the "make test" targets.
This allows the tests to report failures while running in
continuous integration environments.
Previously "make test" returned $? == 0 for all combinations
of success, failure and exception conditions.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
for test_group in autotest_data.non_parallel_test_group_list:
runner.add_non_parallel_test_group(test_group)
-runner.run_all_tests()
+num_fails = runner.run_all_tests()
+
+sys.exit(num_fails)
except:
print "Exception occured"
print sys.exc_info()
+ self.fails = 1
# drop logs from all executions to a logfile
for buf in self.log_buffers:
self.logfile.write(buf.replace("\r",""))
log_buffers = []
+
+ return self.fails