public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com, fstests@vger.kernel.org
Subject: [PATCH] fstests: drop check.log and check.time into section specific results dir
Date: Mon, 14 Sep 2020 20:22:43 -0400	[thread overview]
Message-ID: <20200915002243.57729-1-josef@toxicpanda.com> (raw)

Right now we only track check.log and check.time globally, it would be nice
to do it per-section as well.  This makes it easier to parse results from
systems that run a bunch of different configurations at once.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 check | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/check b/check
index 5ffa8777..6a79825d 100755
--- a/check
+++ b/check
@@ -391,6 +391,13 @@ _wipe_counters()
 	unset try notrun bad
 }
 
+_global_log() {
+	echo "$1" >> $check.log
+	if $OPTIONS_HAVE_SECIONS; then
+		echo "$1" >> ${REPORT_DIR}/check.log
+	fi
+}
+
 _wrapup()
 {
 	seq="check"
@@ -415,10 +422,13 @@ _wrapup()
 				}' \
 				| sort -n >$tmp.out
 			mv $tmp.out $check.time
+			if $OPTIONS_HAVE_SECTIONS; then
+				cp $check.time ${REPORT_DIR}/check.time
+			fi
 		fi
 
-		echo "" >>$check.log
-		date >>$check.log
+		_global_log ""
+		_global_log "$(date)"
 
 		echo "SECTION       -- $section" >>$tmp.summary
 		echo "=========================" >>$tmp.summary
@@ -427,29 +437,33 @@ _wrapup()
 				echo "Ran:$try"
 				echo "Ran:$try" >>$tmp.summary
 			fi
-			echo "Ran:$try" >>$check.log
+			_global_log "Ran:$try"
 		fi
 
 		$interrupt && echo "Interrupted!" | tee -a $check.log
+		if $OPTIONS_HAVE_SECIONS; then
+			$interrupt && echo "Interrupted!" | tee -a \
+				${REPORT_DIR}/check.log
+		fi
 
 		if [ ! -z "$notrun" ]; then
 			if [ $brief_test_summary == "false" ]; then
 				echo "Not run:$notrun"
 				echo "Not run:$notrun" >>$tmp.summary
 			fi
-			echo "Not run:$notrun" >>$check.log
+			_global_log "Not run:$notrun"
 		fi
 
 		if [ ! -z "$n_bad" -a $n_bad != 0 ]; then
 			echo "Failures:$bad"
 			echo "Failed $n_bad of $n_try tests"
-			echo "Failures:$bad" >>$check.log
-			echo "Failed $n_bad of $n_try tests" >>$check.log
+			_global_log "Failures:$bad"
+			_global_log "Failed $n_bad of $n_try tests"
 			echo "Failures:$bad" >>$tmp.summary
 			echo "Failed $n_bad of $n_try tests" >>$tmp.summary
 		else
 			echo "Passed all $n_try tests"
-			echo "Passed all $n_try tests" >>$check.log
+			_global_log "Passed all $n_try tests"
 			echo "Passed all $n_try tests" >>$tmp.summary
 		fi
 		echo "" >>$tmp.summary
-- 
2.28.0


                 reply	other threads:[~2020-09-15  0:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200915002243.57729-1-josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=fstests@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox