From: Anthony PERARD <anthony.perard@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@arm.com>,
Jan Beulich <jbeulich@suse.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2] scripts: introduce a script for build test
Date: Tue, 24 Oct 2017 12:29:32 +0100 [thread overview]
Message-ID: <20171024112932.GD1885@perard.uk.xensource.com> (raw)
In-Reply-To: <20171023165633.26011-1-wei.liu2@citrix.com>
On Mon, Oct 23, 2017 at 05:56:33PM +0100, Wei Liu wrote:
> +
> +if test $# -lt 2 ; then
> + echo "Usage: $0 <BASE> <TIP> [CMD]"
> + exit 1
> +fi
[...]
> +git rev-list $BASE..$TIP | nl -ba | tac | \
> +while read num rev; do
> + echo "Testing $num $rev"
> + git checkout $rev
> + if test $# -eq 0 ; then
> + make -j4 distclean && ./configure && make -j4
> + else
> + "$@"
That feels wrong. How do I run the same exact command at the default
one, but with -j8 instead of -j4?
I can see only two options, but I'm not sure if it is what you had in
mind:
- Option #1: a script
$ echo 'make -j8 distclean && ./configure && make -j8' > tmp-script.sh
$ ./script/build-test.sh master my-feature bash tmp-script.sh
- Option #2: with eval!
$ ./script/build-test.sh master my-feature eval make -j8 distclean '&&' ./configure '&&' make -j8
# notice the eval ................... here ^^^^ :-)
> + fi
> + echo
> +done
> +
> +echo "Restoring original HEAD"
> +git checkout $ORIG_BRANCH
Also, what a developper should do when the build fail? She can't modify
the current code, because changes are going to be losts. Maybe we could
trap failures, restore original HEAD and point out which commit fails to
build.
Another thing that can be done is do the build test in a temporary
checkout, but I'm not sure if it is a good idea.
(I'm still trying to find out how a script can do a better job than a
plain `git rebase --interactive --exec 'blah'`, it is maybe just because
I know what to do if there is an issue.)
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-10-24 11:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 16:56 [PATCH v2] scripts: introduce a script for build test Wei Liu
2017-10-24 10:12 ` Ian Jackson
2017-10-24 11:29 ` Anthony PERARD [this message]
2017-10-24 13:38 ` Ian Jackson
2017-10-25 15:17 ` Wei Liu
2017-10-25 15:23 ` Anthony PERARD
2017-10-25 15:29 ` Wei Liu
2017-10-25 15:25 ` Ian Jackson
2017-10-25 15:27 ` Wei Liu
2017-10-25 15:42 ` Ian Jackson
2017-10-25 15:45 ` Wei Liu
2017-10-25 15:47 ` George Dunlap
2017-10-25 15:49 ` Wei Liu
2017-10-25 14:58 ` Wei Liu
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=20171024112932.GD1885@perard.uk.xensource.com \
--to=anthony.perard@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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.