Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com> Signed-off-by: Wei Liu <wei.l...@citrix.com> --- Cc: Andrew Cooper <andrew.coop...@citrix.com> Cc: George Dunlap <george.dun...@eu.citrix.com> Cc: Ian Jackson <ian.jack...@eu.citrix.com> Cc: Jan Beulich <jbeul...@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Tim Deegan <t...@xen.org> Cc: Wei Liu <wei.l...@citrix.com> Cc: Julien Grall <julien.gr...@arm.com> Cc: Anthony PERARD <anthony.per...@citrix.com> --- scripts/build-test.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 scripts/build-test.sh
diff --git a/scripts/build-test.sh b/scripts/build-test.sh new file mode 100755 index 0000000000..316419d6b7 --- /dev/null +++ b/scripts/build-test.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# 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. +# +# Cross-build is not yet supported. + +set -e + +if ! test -f xen/common/kernel.c; then + echo "Please run this script from top-level directory" + exit 1 +fi + +if test $# -lt 2 ; then + echo "Usage: $0 <BASE> <TIP> [CMD]" + exit 1 +fi + +status=`git status -s` +if test -n "$status"; then + echo "Tree is dirty, aborted" + exit 1 +fi + +if git branch | grep -q '^\*.\+detached at'; then + echo "Detached HEAD, aborted" + exit 1 +fi + +BASE=$1; shift +TIP=$1; shift +ORIG_BRANCH=`git rev-parse --abbrev-ref HEAD` + +if ! git merge-base --is-ancestor $BASE $TIP; then + echo "$BASE is not an ancestor of $TIP, aborted" + 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 + "$@" + fi + echo +done + +echo "Restoring original HEAD" +git checkout $ORIG_BRANCH -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel