[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.10] scripts: add a script for build testing
>>> On 20.10.17 at 19:32, <wei.liu2@xxxxxxxxxx> wrote: > --- /dev/null > +++ b/scripts/build-test.sh > @@ -0,0 +1,40 @@ > +#!/bin/sh > + > +# WARNING: Always backup the branch by creating another reference to it if > +# you're not familiar with git-rebase(1). > +# > +# Use `git rebase` to run command or script on every commit within the range > +# specified. If no command or script is provided, use the default one to > clean > +# and build the whole tree. > +# > +# If something goes wrong, the script will stop at the commit that fails. > Fix > +# the failure and run `git rebase --continue`. > +# > +# If for any reason the tree is screwed, use `git rebase --abort` to restore > to > +# original state. > + > +if ! test -f xen/Kconfig; then > + echo "Please run this script from top-level directory" Wouldn't running this in one of the top-level sub-trees also be useful? E.g. why would one want a hypervisor only series not touching the public interface to have the tools tree rebuilt all the time? > + exit 1 > +fi > + > +if test $# -lt 2 ; then > + echo "Usage: $0 <BASE> <TIP> [CMD|SCRIPT]" Perhaps echo "Usage: $0 <BASE> <TIP> [<CMD>|<SCRIPT>]" ? Also I'm not clear why you make the distinction between command and script. > + exit 1 > +fi > + > +BASE=$1 > +TIP=$2 > +CMD=${3:-git clean -fdx && ./configure && make -j4} > + > +echo "Running command \"$CMD\" on every commit from $BASE to $TIP" > +echo -n "Starting in " > + > +for i in `seq 5 -1 1`; do > + echo -n "$i ... " > + sleep 1 > +done What is this startup delay intended for? > +echo > + > +git rebase $BASE $TIP -x "$CMD" Is this quoting on $CMD really going to work right no matter what the variable actually expands to? I.e. don't you either want to use "eval" or adjust script arguments such that you can use "$@" with its special quoting rules? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |