Merge lp:~matthew-gretton-dann/cbuild/spawn-gcc-release-tests into lp:~linaro-toolchain-dev/cbuild/tools

Proposed by Matthew Gretton-Dann
Status: Approved
Approved by: Michael Hope
Approved revision: 49
Proposed branch: lp:~matthew-gretton-dann/cbuild/spawn-gcc-release-tests
Merge into: lp:~linaro-toolchain-dev/cbuild/tools
Diff against target: 105 lines (+101/-0)
1 file modified
spawn-gcc-release-tests.sh (+101/-0)
To merge this branch: bzr merge lp:~matthew-gretton-dann/cbuild/spawn-gcc-release-tests
Reviewer Review Type Date Requested Status
Michael Hope Approve
Review via email: mp+121043@code.launchpad.net

Description of the change

This adds the spawn-gcc-release-tests.sh script to ~linaro-toolchain-dev/cbuild/tools

I have made most of the changes suggested in other review comments.

However, I have not made the automatic detection of queues change as there are many more queues available than we test on - and that could be confusing.

To post a comment you must log in.
Revision history for this message
Michael Hope (michaelh1) wrote :

I like it. For the future, consider testing multiple variables the same way as crosstool-NG by using case "$foo","$bar". I like it as commas don't appear in names:

case "$queue-$release" in
   i686-*-4.6-*)

to

case "$queue","$release" in
   i686*,*-4.6-*)

review: Approve

Unmerged revisions

49. By Matthew Gretton-Dann

Add script to spawn GCC release tests.

This script is intended to be used during the GCC release process to spawn
the testing jobs after the toolchain has been built for various targets.

Intended usage is:

ssh -p7023 <email address hidden> \
    ./lib/tools/spawn-gcc-release-tests.sh gcc-linaro-4.X-20YY.MM[-R] <queue>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'spawn-gcc-release-tests.sh'
2--- spawn-gcc-release-tests.sh 1970-01-01 00:00:00 +0000
3+++ spawn-gcc-release-tests.sh 2012-08-23 16:09:36 +0000
4@@ -0,0 +1,101 @@
5+#! /bin/sh
6+#
7+
8+set -e
9+set -u
10+
11+die ()
12+{
13+ echo "Error: $*" >&2
14+ exit 2
15+}
16+
17+display_usage ()
18+{
19+ cat <<EOF
20+$0: [-x] [-h] <release> <queues...>
21+$0: Spawn GCC release tests for particular queues
22+
23+Options:
24+ -x Set -x
25+ --help Show this help
26+ -h Ditto
27+
28+Release is of the form gcc-linaro-V.v-YYYY.MM.
29+for example gcc-linaro-4.7-2012.08
30+
31+ Queues:
32+ a9-builder
33+ a9hf-builder
34+ armv5-builder
35+ i686
36+ x86_64
37+EOF
38+
39+ exit 0
40+}
41+
42+release=
43+
44+spawn_tests ()
45+{
46+ local tests
47+ local t
48+ local queue
49+
50+ queue="$1"
51+
52+ case "$queue" in
53+ i686 | x86_64 | a9*-builder)
54+
55+ # Note known failures
56+ case "$queue-$release" in
57+ i686-*-4.6-*)
58+ echo "Note: Python builds are expected to fail in queue '$queue' due to a known 4.6 PGO problem"
59+ ;;
60+ esac
61+
62+ tests="ubutest benchmarks benchmarks-spec2000"
63+ ;;
64+
65+ armv5-builder)
66+ tests="benchmarks"
67+ echo "Note: Only benchmarks tested for queue '$queue'."
68+ ;;
69+
70+ *)
71+ die "Unrecognised queue '$queue'."
72+ ;;
73+ esac
74+
75+ echo "Spawning tests '$tests' for release '$release' into queue '$queue'"
76+
77+ # We copy template.txt if the queue has one - otherwise we just generate an
78+ # empty job file.
79+ for t in $tests; do
80+ cp "$HOME/queue/$queue/template.txt" "$HOME/queue/$queue/$t-$release.job" \
81+ || touch "$HOME/queue/$queue/$t-$release.job"
82+ done
83+}
84+
85+while test $# -gt 0; do
86+ case "$1" in
87+ -x)
88+ set -x
89+ ;;
90+
91+ --help | -h)
92+ display_usage
93+ ;;
94+
95+ *)
96+ if test -z "$release"; then
97+ release="$1"
98+ else
99+ spawn_tests "$1"
100+ fi
101+ ;;
102+ esac
103+
104+ shift 1
105+done

Subscribers

People subscribed via source and target branches