[CRIU] [PATCH 2/2] zdtm.py: add support of test reports in TAP format
Pavel Emelyanov
xemul at virtuozzo.com
Thu Mar 3 10:01:25 PST 2016
> @@ -971,6 +973,21 @@ class launcher:
> else:
> self.__use_log = False
>
> + if opts['ignore_fails']:
> + now = datetime.datetime.now()
> + if report_dir:
> + reportname = report_dir + "/" + "criu-testreport-" + now.strftime("%Y-%m-%d-%H-%M-%S") + ".tap"
> + else:
> + reportname = "criu-testreport-" + now.strftime("%Y-%m-%d-%H-%M-%S") + ".tap"
> +
> + global f
BTW, the glbal f is not nice. Make this variable be member of class launcher.
> + f = open(reportname, 'a')
> + print >> f, "# Hardware architecture: " + arch
> + print >> f, "# Timestamp: " + now.strftime("%Y-%m-%d %H:%M") + " (GMT+1)"
> + print >> f, "# "
> + print >> f, "TAP version 13"
> + print >> f, "1.." + str(nr_tests)
> +
> def __show_progress(self):
> perc = self.__nr * 16 / self.__total
> print "=== Run %d/%d %s" % (self.__nr, self.__total, '=' * perc + '-' * (16 - perc))
More information about the CRIU
mailing list