* [OSSTEST PATCH 2/3] mg-branch-setup: New script
2015-01-26 18:05 [OSSTEST PATCH 1/3] ap-common: Have ap-push for linux trees use refs/heads/ Ian Jackson
@ 2015-01-26 18:05 ` Ian Jackson
2015-01-26 18:05 ` [OSSTEST PATCH 3/3] linux-3.16: New branch Ian Jackson
2015-01-27 9:35 ` [OSSTEST PATCH 1/3] ap-common: Have ap-push for linux trees use refs/heads/ Ian Campbell
2 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2015-01-26 18:05 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell
Also, update the README.dev accordingly
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
README.dev | 77 +++++++++++++++-------------------------
mg-branch-setup | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 134 insertions(+), 49 deletions(-)
create mode 100755 mg-branch-setup
diff --git a/README.dev b/README.dev
index e9458a3..3303e77 100644
--- a/README.dev
+++ b/README.dev
@@ -69,60 +69,39 @@ former case, disables everything; in the latter, just that "branch")
Creating a new branch
=====================
-As osstest@osstest:
-
-$ cd branches
-
-($branch sort of matching ap-fetch-version modulo wildcards and must
-match cron invocation)
-
-$ cd ~osstest/branches
-$ umask 002
-$ git clone ../testing.git for-$branch.git
-
-If you want to bisect then:
-$ cd ../bisects
-$ git clone ../testing.git for-$branch.git
-
-$ cd ../branches
-$ ln -s /export/home/osstest/bisects/for-$branch.git for-$branch.git/tree-bisect
-
-$ mkdir for-$branch.git/tmp
-# For manual playing only.
-
-Now can play in here. Can push random stuff and run
-"cr-daily-branch --real $branch" as osstest@osstest. e.g.
+* Add appropriate code to ap-*
+ (For linux-* this is not needed if the tag is in the standard namespace)
+ (ap-push should use refs/heads/foo, not just `foo', for the remote
+ ref name - so that the initial push works)
+
+* Create any necessary output tree on xenbits:
+ As xen@xenbits do mkdir and git init --bare
+ If this tree is going to contain push gate input, push something to
+ the push gate input ref.
+
+* Create the actual trees and push an initial version
+ As osstest@osstest:
+ $ cd $HOME/testing.git
+ $ OSSTEST_CONFIG=production-config \
+ ./mg-branch-setup BRANCH bisect INITIAL-TESTED-VERSION
+
+* Optional testing:
+ You can now play in here if you like. Can push random stuff and run
+ "cr-daily-branch --real $branch" as osstest@osstest. e.g.
$ OSSTEST_EMAIL_HEADER=/home/ianc/osstest-email-ijc \
OSSTEST_CONFIG=production-config ./cr-daily-branch --real $branch
-Note: Push to incoming and git reset --hard incoming
-Note2:
-$ cat ~/osstest-email-ijc
-To: ian.campbell@citrix.com
-
-Do not run cr-for-branches -- it will try to update all sorts trees
-etc.
-
-Need to create any xenbits trees which are referenced:
-
-As xen@xenbits do mkdir and git init --bare, but this might confuse
-cr-daily-branches so you would want to push something there
-(e.g. current master, easiest to do as osstest@osstest). Or "git clone
---bare" but might create all sorts of unwanted refs.
-
-Use ap-push to populate tree, in order to test ap-push, after using
-ap-fetch-version to populate the local repo. e.g.
-OSSTEST_CONFIG=production-config ./ap-fetch-version $branch
-OSSTEST_CONFIG=production-config ./ap-push $branch $revision
+ If you do this, do not run cr-for-branches -- it will try to update
+ all sorts trees etc.
-NOTE: $revision must be a revision *not* a tag. If you want to start
-with a known baseline then git rev-parse FOO~0 it first.
-NOTE2: ap-push should use refs/heads/foo explicitly so that this
-initial push works
+ Before enabling this in cron (eg by pushing the change to BRANCHES
+ to production pretest branch), rewind so that osstest can fast
+ forward it to the actual production version. Ie in bisects and
+ branches for-$branch.git,
+ git fetch origin incoming
+ git reset --hard FETCH_HEAD
-When pushing the patches, be sure to make sure that the
-for-$branch.git repo can fast forward to the pushed version (perhaps
-by resetting it).
+$ Add to BRANCHES setting in cr-for-branches
Force pushing a branch
======================
diff --git a/mg-branch-setup b/mg-branch-setup
new file mode 100755
index 0000000..b0c9712
--- /dev/null
+++ b/mg-branch-setup
@@ -0,0 +1,106 @@
+#!/bin/bash
+#
+# usage:
+# ./mg-branch-setup BRANCH bisect INITIAL-TESTED-VERSION
+# ./mg-branch-setup BRANCH no-bisect
+# ./mg-branch-setup BRANCH no-check
+#
+# - checks that ap-fetch works (only if not `no-check')
+# - creates the tree in ~osstest/branches
+# - if applicable, creates the tree in ~osstest/bisects
+# - if applicable, pushes INITIAL-TESTED-VERSION with ap-push
+#
+# Does NOT
+# - add anything to the branch list in cr-for-branches
+# - create any input/output tree on xenbits
+# - run any test flights (obviously)
+
+set -e
+
+fail () { echo >&2 "$*"; exit 1; }
+badusage () { fail 'bad usage'; }
+need_value () {
+ case "$1" in
+ -*|'') badusage ;;
+ esac
+}
+
+branch=$1; shift
+need_value "$branch"
+
+mode=$1; shift
+
+case "$mode" in
+bisect)
+ fetch=true
+ push=true
+ bisect=true
+ push_version="$1"; shift
+ need_value "$push_version"
+ ;;
+no-bisect)
+ fetch=true
+ push=false
+ bisect=false
+ ;;
+no-check)
+ fetch=false
+ push=false
+ bisect=false
+ ;;
+*)
+ badusage
+ ;;
+esac
+
+if [ $# != 0 ]; then badusage; fi
+
+umask 002
+
+must_test () {
+ local dir="$1"; shift
+ local t
+ for t in "$@"; do
+ if ! test $t "$dir"; then fail "test $t $dir failed"; fi
+ done
+}
+
+(
+ set -e
+ cd $HOME
+ must_test testing.git -d
+ must_test branches -d -w
+ if $bisect; then
+ must_test bisects -d -w
+ fi
+)
+
+x () { echo >&2 "; $*"; "$@"; }
+
+if $fetch; then
+ x ./ap-fetch-version $branch
+fi
+
+if $push; then
+ x ./ap-push $branch "$push_version"~0
+ x ./ap-fetch-version-baseline $branch
+fi
+
+make_tree () {
+ (
+ set -e
+ x cd $HOME/$1
+ x git clone ../testing.git for-$branch.git
+ x mkdir for-$branch.git/tmp
+ )
+}
+
+set -e
+make_tree branches
+if $bisect; then
+ make_tree bisects
+ x ln -sf $HOME/branches/for-$branch.git \
+ $HOME/bisects/for-$branch.git/tree-bisect
+fi
+
+echo "Branch $branch set up ok."
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [OSSTEST PATCH 3/3] linux-3.16: New branch
2015-01-26 18:05 [OSSTEST PATCH 1/3] ap-common: Have ap-push for linux trees use refs/heads/ Ian Jackson
2015-01-26 18:05 ` [OSSTEST PATCH 2/3] mg-branch-setup: New script Ian Jackson
@ 2015-01-26 18:05 ` Ian Jackson
2015-01-27 9:35 ` [OSSTEST PATCH 1/3] ap-common: Have ap-push for linux trees use refs/heads/ Ian Campbell
2 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2015-01-26 18:05 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell
Test this too. We fetch this from the Canonical Kernel Team (ckt)
repo, but do not encode `ckt' in the branch name, in case this becomes
a proper stable tree.
(I have set up this branch on the osstest with the mg-branch-setup
script in this version of this tree.)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
ap-common | 5 +++++
cr-for-branches | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ap-common b/ap-common
index 014dd76..f1eba6f 100644
--- a/ap-common
+++ b/ap-common
@@ -109,6 +109,11 @@ info_linux_tree () {
: ${TAG_LINUX_THIS:=linux-arm-xen}
: ${TAG_LINUX_ARM_THIS:=linux-arm-xen}
;;
+ linux-3.16)
+ # unofficial Ubuntu (Canonical) kernel team (ckt) for now
+ : ${TREE_LINUX_THIS:=git://kernel.ubuntu.com/ubuntu/linux.git}
+ : ${TAG_LINUX_THIS:=$1.y}
+ ;;
linux-3.*)
: ${TREE_LINUX_THIS:=${KERNEL_SCM}/stable/linux-stable.git}
: ${TAG_LINUX_THIS:=$1.y}
diff --git a/cr-for-branches b/cr-for-branches
index 65beb12..cbd1c74 100755
--- a/cr-for-branches
+++ b/cr-for-branches
@@ -31,7 +31,7 @@ scriptoptions="$1"; shift
LOGFILE=tmp/cr-for-branches.log
export LOGFILE
-: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf ${EXTRA_BRANCHES}}
+: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf ${EXTRA_BRANCHES}}
export BRANCHES
fetchwlem=$wlem
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread