print('<?xml version="1.0" encoding="UTF-8"?>', file=f)
print('<testsuites disabled="0" errors="%d" failures="%d" tests="1" time="%d">' % (junit_errors, junit_failures, job.total_time), file=f)
print('<testsuite disabled="0" errors="%d" failures="%d" name="%s" skipped="0" tests="1" time="%d">' % (junit_errors, junit_failures, junit_ts_name, job.total_time), file=f)
+ print('<properties>', file=f)
+ print('<property name="os" value="%s"/>' % os.name, file=f)
+ print('</properties>', file=f)
print('<testcase classname="%s" name="%s" status="%s" time="%d">' % (junit_ts_name, junit_tc_name, job.status, job.total_time), file=f)
if junit_errors:
print('<error message="%s" type="%s"/>' % (job.status, job.status), file=f)
retcode |= run_job(t)
sys.exit(retcode)
-
if os.name == "posix":
self.cmdline = cmdline
else:
+ # Windows command interpreter equivalents for sequential
+ # commands (; => &) command grouping ({} => ()).
replacements = {
";" : "&",
"{" : "(",
ru = resource.getrusage(resource.RUSAGE_CHILDREN)
total_process_time = int((ru.ru_utime + ru.ru_stime) - self.start_process_time)
self.total_time = total_process_time
+
+ self.summary = [
+ "Elapsed clock time [H:MM:SS (secs)]: %d:%02d:%02d (%d)" %
+ (total_clock_time // (60*60), (total_clock_time // 60) % 60, total_clock_time % 60, total_clock_time),
+ "Elapsed process time [H:MM:SS (secs)]: %d:%02d:%02d (%d)" %
+ (total_process_time // (60*60), (total_process_time // 60) % 60, total_process_time % 60, total_process_time),
+ ] + self.summary
else:
- total_process_time = 0
-
- self.summary = [
- "Elapsed clock time [H:MM:SS (secs)]: %d:%02d:%02d (%d)" %
- (total_clock_time // (60*60), (total_clock_time // 60) % 60, total_clock_time % 60, total_clock_time),
- "Elapsed process time [H:MM:SS (secs)]: %d:%02d:%02d (%d)" %
- (total_process_time // (60*60), (total_process_time // 60) % 60, total_process_time % 60, total_process_time),
- ] + self.summary
+ self.summary = [
+ "Elapsed clock time [H:MM:SS (secs)]: %d:%02d:%02d (%d)" %
+ (total_clock_time // (60*60), (total_clock_time // 60) % 60, total_clock_time % 60, total_clock_time),
+ "Elapsed process time unvailable on Windows"
+ ] + self.summary
for line in self.summary:
self.log("summary: %s" % line)