[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/2] cambridge: arrange to test each new baseline



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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.