]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
report: record fstests start and report generation timestamps
authorDarrick J. Wong <djwong@kernel.org>
Wed, 15 Mar 2023 00:52:59 +0000 (17:52 -0700)
committerZorro Lang <zlang@kernel.org>
Sun, 26 Mar 2023 14:03:33 +0000 (22:03 +0800)
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@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
check
common/report
doc/xunit.xsd

diff --git a/check b/check
index f2be3d7d7d1fbd7808e1fd5745718dff5c34b465..1a58a2b2690a1080e93a2e713793ddabebde7669 100755 (executable)
--- a/check
+++ b/check
@@ -668,6 +668,7 @@ _run_seq() {
 
 _detect_kmemleak
 _prepare_test_list
+fstests_start_time="$(date +"%F %T")"
 
 if $OPTIONS_HAVE_SECTIONS; then
        trap "_summary; exit \$status" 0 1 2 3 15
index 8e19e9f5572a05994d9f50f7502c87af1bd53df6..be991b55f5d4aa8f2360a4daebe7e5f57a60d7f9 100644 (file)
@@ -62,7 +62,9 @@ _xunit_make_section_report()
  name="xfstests"
  failures="$bad_count" skipped="$notrun_count" tests="$tests_count" time="$sect_time"
  hostname="$HOST"
- timestamp="$timestamp"
+  start_timestamp="$(date -Iseconds --date="$fstests_start_time")"
+        timestamp="$timestamp"
+ report_timestamp="$(date -Iseconds)"
 >
 ENDL
 
index 653f48687144a0323f72f186ded8a1d523a3b296..3ed72f2f8660b07753bbb5d30f09c0ba12709f20 100644 (file)
                 <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:annotation>
         </xs:attribute>
+        <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:annotation>
                 <xs:documentation xml:lang="en">Host on which the tests were executed. 'localhost' should be used if the hostname cannot be determined.</xs:documentation>