[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] automation: introduce a script for build test
On Tue, Jul 24, 2018 at 05:56:51PM +0100, Wei Liu wrote: > Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > --- > This is a script I wrote previously for build test. Goal here is to bisect a series to find the build failure? We could allow git bisect to do the work and just build and return success or failure instead of having to walk it by hand. I don't have one specifically for Xen but on other projects I've got something like: ./scripts/bisect.sh <GOOD> <BAD> which looks roughly like: #!/bin/sh git bisect start $2 $1 git bisect run ./scripts/basic-build.sh Then my ./scripts/basic-build.sh would look like: #!/bin/sh git clean -xdf ./configure || exit 1 make > > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Cc: Jan Beulich <jbeulich@xxxxxxxx> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> > Cc: Tim Deegan <tim@xxxxxxx> > Cc: Wei Liu <wei.liu2@xxxxxxxxxx> > Cc: Julien Grall <julien.grall@xxxxxxx> > Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx> > > v5: > 1. Use bash so that while do ... done < () works. > 2. Move script to automation directory. > > v4: > 1. Check, save/restore $?. > 2. Don't use trap, check exit code directly. > 3. More error messages. > > v3: > 1. Use git-clean in default rune. > 2. Print more friendly message. > 3. Restore HEAD automatically. > --- > automation/scripts/build-test.sh | 68 > ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 68 insertions(+) > create mode 100755 automation/scripts/build-test.sh > > diff --git a/automation/scripts/build-test.sh > b/automation/scripts/build-test.sh > new file mode 100755 > index 0000000000..885e5f7a13 > --- /dev/null > +++ b/automation/scripts/build-test.sh > @@ -0,0 +1,68 @@ > +#!/bin/bash > + > +# Run command on every commit within the range specified. If no command is > +# provided, use the default one to clean and build the whole tree. > +# > +# The default rune is rather simple. To do a cross-build, please put your > usual > +# build rune in a shell script and invoke it with this script. > + > +if ! test -f xen/common/kernel.c; then > + echo "Please run this script from top-level directory" > + exit 1 > +fi You could make it run from anywhere if you did: pushd `git rev-parse --show-toplevel` _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |