All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH v2 2/2] cambridge: arrange to test each new baseline
Date: Wed, 12 Aug 2015 17:31:51 +0100	[thread overview]
Message-ID: <1439397111.8356.68.camel@citrix.com> (raw)
In-Reply-To: <21963.27243.742209.864679@mariner.uk.xensource.com>

On Wed, 2015-08-12 at 16:46 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH v2 2/2] cambridge: arrange 
> to test each new baseline"):
> > diff --git a/cr-daily-branch b/cr-daily-branch
> > index 4b9b525..f9edbd4 100755
> > --- a/cr-daily-branch
> > +++ b/cr-daily-branch
> > @@ -100,6 +100,13 @@ if [ "x$OSSTEST_BASELINES_ONLY" = xy ] ; then
> >      force_baseline=baselines-only
> >      wantpush=false
> >      skipidentical=true
> > +    if [ "x$treeurl" != xnone: ]; then
> > +	treearg=--tree-$tree=$treeurl
> > +    fi
> > +    tested_revision=`check_tested $treearg --print-revision=$tree`
> > +    if [ "x$tested_revision" != x ]; then
> > +	OLD_REVISION="$tested_revision"
> > +    fi
> 
> This is strikingly similar to the code inside
>    if [ "x$OSSTEST_NO_BASELINE" != xy ] ; then
> near line 99.
> 
> Maybe, instead, you should nobble the
>      if [ "x$OLD_REVISION" = x ]; then
> bit which sets OLD_REVISION, somehow, and then the later code is
> nearly right.

The relevant hunks (proper, not incremental) would then be something like
this (untested):

diff --git a/cr-daily-branch b/cr-daily-branch
index 06df5a0..caf5b5b 100755
--- a/cr-daily-branch
+++ b/cr-daily-branch
@@ -91,18 +91,28 @@ if [ "x$OLD_REVISION" = x ]; then
            OSSTEST_NO_BASELINE=y
            OLD_REVISION=flight-`check_tested`
            ;;
-       *) OLD_REVISION="`./ap-fetch-version-old $branch`";;
+       *)
+           if [ "x$OSSTEST_BASELINES_ONLY" != xy ] ; then
+               OLD_REVISION="`./ap-fetch-version-old $branch`"
+           fi
+           ;;
     esac
     export OLD_REVISION
 fi
 
 if [ "x$OSSTEST_NO_BASELINE" != xy ] ; then
-       testedflight=`check_tested --revision-$tree="$OLD_REVISION"`
+       if [ "x$OSSTEST_BASELINES_ONLY" != xy ] ; then
+           testedflight=`check_tested --revision-$tree="$OLD_REVISION"`
+       fi
 
        if [ "x$testedflight" = x ]; then
                wantpush=false
                skipidentical=false
-               force_baseline='untested'
+               if [ "x$OSSTEST_BASELINES_ONLY" = xy ] ; then
+                   force_baseline=baselines-only
+               else
+                   force_baseline='untested'
+               fi
                if [ "x$treeurl" != xnone: ]; then
                        treearg=--tree-$tree=$treeurl
                fi

Is that better?

I also considered refactoring this bit:

		if [ "x$treeurl" != xnone: ]; then
			treearg=--tree-$tree=$treeurl
		fi
		tested_revision=`check_tested $treearg --print-revision=$tree`
		if [ "x$tested_revision" != x ]; then
			OLD_REVISION="$tested_revision"
		fi

into a helper e.g. select_last_test_revision.

Ian.

  reply	other threads:[~2015-08-12 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 10:55 [PATCH v2 1/2] cr-daily-branch: Begin to support other reasons for forcing a baseline Ian Campbell
2015-07-27 10:55 ` [PATCH v2 2/2] cambridge: arrange to test each new baseline Ian Campbell
2015-08-12 14:08   ` Ian Campbell
2015-08-12 15:27     ` Ian Campbell
2015-08-12 15:46       ` Ian Jackson
2015-08-12 16:31         ` Ian Campbell [this message]
2015-08-13 10:47           ` Ian Jackson

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=1439397111.8356.68.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.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 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.