[PATCH 05/15] report: record fstests start and report generation timestamps

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

From: Darrick J. Wong <djwong@xxxxxxxxxx>

Report two new timestamps in the xml report: the time that ./check was
started, and the time that the report was generated.  We introduce new
timestamps to minimize breakage with parsing scripts.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
 check         |    1 +
 common/report |    4 +++-
 doc/xunit.xsd |   10 ++++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/check b/check
index f2be3d7d7d..1a58a2b269 100755
--- a/check
+++ b/check
@@ -668,6 +668,7 @@ _run_seq() {
+fstests_start_time="$(date +"%F %T")"
 	trap "_summary; exit \$status" 0 1 2 3 15
diff --git a/common/report b/common/report
index 8e19e9f557..be991b55f5 100644
--- a/common/report
+++ b/common/report
@@ -62,7 +62,9 @@ _xunit_make_section_report()
  failures="$bad_count" skipped="$notrun_count" tests="$tests_count" time="$sect_time"
- timestamp="$timestamp"
+  start_timestamp="$(date -Iseconds --date="$fstests_start_time")"
+        timestamp="$timestamp"
+ report_timestamp="$(date -Iseconds)"
diff --git a/doc/xunit.xsd b/doc/xunit.xsd
index 653f486871..3ed72f2f86 100644
--- a/doc/xunit.xsd
+++ b/doc/xunit.xsd
@@ -187,6 +187,16 @@
                 <xs:documentation xml:lang="en">Time that the last testcase was started. If no tests are started, this is the time the report was generated. Timezone must be specified as an offset from UTC.</xs:documentation>
+        <xs:attribute name="report_timestamp" type="ISO8601_DATETIME_PATTERN" use="required">
+            <xs:annotation>
+                <xs:documentation xml:lang="en">Time that the report was generated.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="start_timestamp" type="ISO8601_DATETIME_PATTERN" use="required">
+            <xs:annotation>
+                <xs:documentation xml:lang="en">Time that fstests was started.</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
         <xs:attribute name="hostname" use="required">
                 <xs:documentation xml:lang="en">Host on which the tests were executed. 'localhost' should be used if the hostname cannot be determined.</xs:documentation>

[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux