public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: XFS mailing list <xfs@oss.sgi.com>
Subject: [RFC PATCH 1/3] xfstests: get some basic source tree info
Date: Wed, 19 Jun 2013 17:44:36 -0500	[thread overview]
Message-ID: <20130619224436.GU20932@sgi.com> (raw)
In-Reply-To: <20130619223750.GT20932@sgi.com>

Grab some basic information about the souce trees being tested and save
it off for later.  This includes information about the git commit and
any patches which are applied.

Set SRCDIRS environment variable with paths to the sources you're
testing, colon delimited like PATH. 

e.g.

export SRCDIRS="/path/to/kernel:/path/to/xfsprogs:/path/to/xfsdump:/path/to/xfstests"

Signed-off-by: Ben Myers <bpm@sgi.com>

---
 check     |    4 ++++
 common.rc |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

Index: xfstests/check
===================================================================
--- xfstests.orig/check
+++ xfstests/check
@@ -316,6 +316,7 @@ END	{ if (NR > 0) {
 
 	echo "" >>$check.log
 	date >>$check.log
+	cat /tmp/check.desc >>$check.log
 	echo $list | fmt | sed -e 's/^/    /' -e "s;$SRC_DIR/;;g" >>$check.log
 	$interrupt && echo "Interrupted!" >>$check.log
         
@@ -363,6 +364,9 @@ rm -f $check.full
 
 [ -f $check.time ] || touch $check.time
 
+_full_source_details > /tmp/check.desc
+cat /tmp/check.desc
+
 # print out our test configuration
 echo "FSTYP         -- `_full_fstyp_details`"
 echo "PLATFORM      -- `_full_platform_details`"
Index: xfstests/common/rc
===================================================================
--- xfstests.orig/common/rc
+++ xfstests/common/rc
@@ -1738,6 +1738,48 @@ _full_platform_details()
      echo "$os/$platform $host $kernel"
 }
 
+_full_source_details()
+{
+    if [ -z $SRCDIRS ]; then
+        return
+    fi
+
+    echo "SRCDIRS       -- $SRCDIRS"
+
+    dirs=$(echo $SRCDIRS | tr ":" "\n")
+    for dir in $dirs
+    do
+        echo "    $dir:"
+        if [ -d $dir/.git ]; then
+            # git url, branch, and description
+            url=$(cd $dir; git remote show origin | grep 'Fetch URL' | awk '{print $3}')
+            echo -e "\tURL           -- $url"
+            branch=$(cd $dir; git symbolic-ref HEAD)
+            echo -e "\tBRANCH        -- $branch"
+            desc=$(cd $dir; git describe)
+            echo -e "\tDESC          -- $desc"
+        fi
+
+        if [ -d $dir/patches ]; then
+            # quilt patches which are applied
+            echo -e "\tPATCHES:"
+            for p in $(cd $dir; quilt applied 2> /dev/null)
+            do
+                p=${p##patches/}
+                md5=$(md5sum $dir/patches/$p)
+                md5_checksum=${md5%% *}
+                patch_fn=${md5##* }
+                patchworkid=$(egrep -i '^X-Patchwork-Id:' $dir/patches/$p)
+                messageid=$(egrep -i '^Message-Id:' $dir/patches/$p)
+                echo -e "\t\t$patch_fn"
+                echo -e "\t\tmd5sum:\t\t$md5_checksum"
+                echo -e "\t\tX-Patchwork-Id:\t${patchworkid##* }"
+                echo -e "\t\tMessage-Id:\t${messageid##* }"
+            done
+        fi
+    done
+}
+
 _setup_udf_scratchdir()
 {
     [ "$FSTYP" != "udf" ] \

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-06-19 22:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 22:59 WANTED: xfstests results in different architectures Chandra Seetharaman
2013-06-18 23:34 ` Dave Chinner
2013-06-19  2:05   ` Phil White
2013-06-19 16:19   ` Ben Myers
2013-06-19 21:00   ` Chandra Seetharaman
2013-06-19 22:37     ` Ben Myers
2013-06-19 22:44       ` Ben Myers [this message]
2013-06-20  3:20         ` [RFC PATCH 1/3] xfstests: get some basic source tree info Eric Sandeen
2013-06-20  3:50           ` Dave Chinner
2013-06-20 17:03             ` Ben Myers
2013-06-19 22:46       ` [RFC PATCH 2/3] xfstests: use an intermediate check.log file Ben Myers
2013-06-19 22:49       ` [RFC PATCH 3/3] xfstests: upload test results Ben Myers

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=20130619224436.GU20932@sgi.com \
    --to=bpm@sgi.com \
    --cc=sekharan@us.ibm.com \
    --cc=xfs@oss.sgi.com \
    /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