[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] scripts: introduce a script for build test
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@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |