All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Ben Myers <bpm@sgi.com>
Cc: Chandra Seetharaman <sekharan@us.ibm.com>,
	XFS mailing list <xfs@oss.sgi.com>
Subject: Re: [RFC PATCH 1/3] xfstests: get some basic source tree info
Date: Wed, 19 Jun 2013 22:20:10 -0500	[thread overview]
Message-ID: <51C274EA.3030506@sandeen.net> (raw)
In-Reply-To: <20130619224436.GU20932@sgi.com>

On 6/19/13 5:44 PM, Ben Myers wrote:
> Grab some basic information about the souce trees being tested and save
> it off for later.  

save it where?  Ah, results/check.log.

README updates maybe?

> 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"

ok so after looking at the patch more carefully, this can be any
collection of paths to git trees in any order, right, and outputs i.e.:

SRCDIRS       -- /mnt/test2/git/linux-2.6:/mnt/test2/git/xfsdump:/mnt/test2/git/xfsprogs
    /mnt/test2/git/linux-2.6:
	URL           -- git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
	BRANCH        -- refs/heads/master
	DESC          -- v3.10-rc2-48-g4284097
    /mnt/test2/git/xfsdump:
	URL           -- git://oss.sgi.com/xfs/cmds/xfsdump.git
	BRANCH        -- refs/heads/master
	DESC          -- v3.1.2-4-g71f940f
...

But what if we're testing packaged bits, not from a git tree,
should that be collected?

> 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

what if it's guilt not quilt?

> +            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
> 

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

  reply	other threads:[~2013-06-20  3:20 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       ` [RFC PATCH 1/3] xfstests: get some basic source tree info Ben Myers
2013-06-20  3:20         ` Eric Sandeen [this message]
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=51C274EA.3030506@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.