Architecture: field corrected so package selection works properly.
* adt-testreport-onepackage: use ln -f when installing summary.
* hosts/cadmium/*: new directory for stuff on Canonical buildd.
* adt-run: increase timeouts 100s, 3ks, 10ks, 100ks.
* adt-testreport-onepackage: suppress repetitive emails.
* hosts/cadmium/onepackage-config: change destination directory
* adt-testreport-onepackage: support for Launchpad bug filing
including signing emails, `affects' line, etc.
* hosts/chinstrap/*: screen-scrap Launchpad to get existing bugs.
* adt-testreport-onepackage: suppress email for packages listed
in existing bugs suppression file.
* hosts/cadmium/*: convenience scripts changed.
* better formatting and explanations in some emails.
* options for setting timeouts.
debian/files
xen/sed-readconfig
xen/readconfig
+hosts/chinstrap/webpage
+hosts/chinstrap/suppressions
+hosts/chinstrap/suppressions.new
+autopkgtest (1.0.4) gutsy; urgency=low
+
+ * adt-testreport-onepackage: Handling of source packages'
+ Architecture: field corrected so package selection works properly.
+ * adt-testreport-onepackage: use ln -f when installing summary.
+ * hosts/cadmium/*: new directory for stuff on Canonical buildd.
+ * adt-run: increase timeouts 100s, 3ks, 10ks, 100ks.
+ * adt-testreport-onepackage: suppress repetitive emails.
+ * hosts/cadmium/onepackage-config: change destination directory
+ * adt-testreport-onepackage: support for Launchpad bug filing
+ including signing emails, `affects' line, etc.
+ * hosts/chinstrap/*: screen-scrap Launchpad to get existing bugs.
+ * adt-testreport-onepackage: suppress email for packages listed
+ in existing bugs suppression file.
+ * hosts/cadmium/*: convenience scripts changed.
+ * better formatting and explanations in some emails.
+ * options for setting timeouts.
+
+ -- Ian Jackson <iwj@ubuntu.com> Tue, 28 Aug 2007 17:42:13 +0100
+
+Tue, 28 Aug 2007 17:41:35 +0100
+
autopkgtest (1.0.3) unstable; urgency=low
* Set LANG to C by default for commands (eg builds and tests) run on
--- /dev/null
+#!/bin/sh
+set -e
+cd /home/iwj/public_html/autopkgtest-output
+
+#rmvia=true
+
+find * \
+ -maxdepth 2 \
+ -mindepth 2 \
+ \( \
+ -name src \
+ -o -name tmp.\* \
+ -o -type d \
+ -o -size +100k \
+ \) \
+ -mtime +3 \
+ -print0 \
+ | xargs -tr0 $rmvia rm -rf --
+
+find * \
+ -maxdepth 1 \
+ -mindepth 1 \
+ -type d \
+ -mtime +100 \
+ -print0 \
+ | xargs -tr0 $rmvia rm -rf --
+
--- /dev/null
+#!/bin/sh
+set -e
+cd adt-play
+exec >>overall.log 2>&1
+test -f go
+with-lock-ex -q nightly-lock ./lalonde-nightly max_test_count=100
--- /dev/null
+# m h dom mon dow command
+4-59/5 * * * * adt-play/cronjob
+22 0 * * Mon savelog -n7 adt-play/overall.log
+58 7 * * * adt-play/cleanup
--- /dev/null
+#!/bin/sh
+set -e
+cd /work/AutomatedTesting/autopkgtest--main/
+rsync -a . cadmium.buildd:autopkgtest/.
--- /dev/null
+#!/bin/bash
+
+set -e
+
+PATH=/home/iwj/autopkgtest/runner:/usr/local/sbin:/usr/sbin:$PATH
+export PATH
+
+#any_tests_ok=false
+any_tests_ok=true
+source_tests_ok=true
+binary_tests_ok=true
+gutsy_tests_ok=true
+max_test_count=10
+go_anyway=false
+
+for x in "$@"; do eval "$x"; done
+
+fail () { printf >&2 "%s\n" "$*"; exit 127; }
+progress () { printf "========== %s ==========\n" "$1"; }
+x () { printf "+ %s\n" "$*"; "$@"; }
+x2 () { printf >&2 "+ %s\n" "$*"; "$@"; }
+
+wait_for () {
+ remain=$1; interval=$2; on_not=$3; shift;shift;shift
+ progress "await ($interval/$remain) $*"
+ while true; do
+ date
+ if "$@"; then return; fi
+ remain=$(( $remain - $interval ))
+ if [ $remain -lt 0 ]; then fail "wait timed out for $*"; fi
+ eval "$on_not"
+ sleep $interval
+ done
+}
+
+progress testing
+
+xoptslist="source gutsy, target=source:binary gutsy, target=binary-amd64"
+
+test_count=0
+
+while $any_tests_ok && ($go_anyway || test -f go) && test $test_count -lt $max_test_count; do
+ now=`date`
+ printf "%s" "$now: "
+
+ xopts="${xoptslist%%:*}"
+ xopts_opts="${xopts#*,}"
+ xoptslist="${xoptslist#*:}:$xopts"
+ printf "considering (%s) " "$xopts_opts"
+
+ anybroken=false
+ for x in ${xopts%%,*}; do
+ if eval \$${x}_tests_ok; then :; else
+ printf " skipping because of %s\n" "$x"
+ anybroken=true
+ break
+ fi
+ done
+ if $anybroken; then continue; fi
+
+ adt-testreport-onepackage /home/iwj/adt-play/onepackage-config \
+ adtrun_extra_opts=--built-binaries-filter=__ \
+ interactive=false $xopts_opts
+
+ test_count=$(( $test_count + 1 ))
+done
+
+progress 'stopping'
--- /dev/null
+#!/bin/sh
+# usage: .../manual-test-one-source <package-name>
+set -ex
+cd /home/iwj/adt-play
+PATH=/home/iwj/autopkgtest/runner:/usr/local/sbin:/usr/sbin:$PATH
+export PATH
+adt-testreport-onepackage /home/iwj/adt-play/onepackage-config adtrun_extra_opts=--built-binaries-filter=__ interactive=false target=source pkg=$1
--- /dev/null
+cd /home/iwj/adt-play
+mirror=http://archive.ubuntu.com/ubuntu
+distro=gutsy
+suite=main
+administrator_email=iwj@ubuntu.com
+#maintainer_email_override="$administrator_email"
+salutation="Ian"
+from="$salutation Jackson <ian+ubuntu-autopkgtest@chiark.greenend.org.uk>"
+disable=false
+desthttphead=http://autopkgtest.ubuntu.com
+destrsynchead=/home/iwj/public_html
+destdirtail=autopkgtest-output
+adtvirt_extra_opts=--userv
+upload_if_ok=true
+upload_if_notests=true
+suppressrepeatedemails=false
+suppresspackages=suppressions
+
+email_extra_info='
+The test environment is an amd64 Xen guest with limited amounts of
+memory. The relevant dependencies are installed for each test but
+very few other packages. Most autopkgtest reports are FTBFS problems.
+'
+
+maintainer_email_override="new@bugs.launchpad.net"
+email_package_header='
+ affects /ubuntu/%s
+ importance high
+
+'
+email_signing_key=0xD6279768
--- /dev/null
+MAILTO=iwj@ubuntu.com
+# m h dom mon dow command
+6-46/20 * * * * autopkgtest/hosts/chinstrap/update-suppressions >/dev/null
--- /dev/null
+#!/bin/sh
+set -e
+cd /work/AutomatedTesting/autopkgtest--main/
+rsync -a . chinstrap.ubuntu.com:autopkgtest/.
--- /dev/null
+#!/bin/sh
+
+cd ${0%/*}
+
+url='https://launchpad.net/ubuntu/+bugs?field.searchtext=&orderby=-importance&field.status%3Alist=New&field.status%3Alist=Incomplete&field.status%3Alist=Confirmed&field.status%3Alist=Triaged&field.status%3Alist=In+Progress&field.status%3Alist=Fix+Committed&assignee_option=any&field.assignee=&field.bug_reporter=ian%2Bubuntu-autopkgtest&field.bug_contact=&field.bug_commenter=&field.subscriber=&field.status_upstream-empty-marker=1&field.omit_dupes.used=&field.has_patch.used=&field.tag=&field.has_cve.used=&search=Search'
+
+echo 'fetching'
+curl -s -k -o webpage "$url"
+
+echo 'grepping'
+perl -ne '
+ print "$1\n" or die $! if
+ m,"https://bugs.launchpad.net/ubuntu/\+source/([-+.0-9a-z]+)/\+bug/\d+",
+' <webpage >suppressions.new
+
+nl -ba suppressions.new
+
+if ! test -s suppressions.new;
+then
+ echo >&2 'NO SUPPRESSIONS - PROBABLY WENT WRONG'
+fi
+
+echo 'uploading'
+
+mv suppressions.new suppressions
+RSYNC_RSH=ssh rsync suppressions cadmium.buildd:adt-play/.
+
+echo 'done.'
tmpdir = None # pathstring on host
testbed = None # Testbed
errorcode = 0 # exit status that we are going to use
-timeouts = { 'short':10, 'install':900, 'test':600, 'build':3000 }
+timeouts = { 'short':100, 'install':3000, 'test':10000, 'build':100000 }
binaries = None # Binaries (.debs we have registered)
build_essential = ["build-essential"]
return "<Action %s %s %s>" % (a.kind, a.what, `a.af`)
def parse_args():
- global opts
+ global opts, timeouts
global n_non_actions # argh, stupid python scoping rules
usage = "%prog <options> --- <virt-server>..."
parser = OptionParser(usage=usage)
help='write a summary report to SUMMARY,'
' emptying it beforehand')
+ for k in timeouts.keys():
+ pa('','--timeout-'+k, type='int', dest='timeout_'+k,
+ metavar='T', help='set %s timeout to T')
+ pa('','--timeout-factor', type='float', dest='timeout_factor',
+ metavar='FACTOR', default=1.0,
+ help='multiply all default timeouts by FACTOR')
+
pa('','--user', type='string', dest='user',
help='run tests as USER (needs root on testbed)')
pa('','--gain-root', type='string', dest='gainroot',
if n_non_actions >= len(parser.largs):
parser.error('nothing to do specified')
+ for k in timeouts.keys():
+ t = getattr(opts,'timeout_'+k)
+ if t is None: t = timeouts[k] * opts.timeout_factor
+ timeouts[k] = int(t)
+
arghandling = initial_arghandling
opts.actions = []
ix = 0
if opts.summary is not None:
summary_stream = open(opts.summary, 'w', 0)
- debug('options: '+`opts`, 1)
+ debug('options: '+`opts`+'; timeouts: '+`timeouts`, 1)
def finalise_options():
global opts, tb, build_essential
in any case.
\fIsummary\fR is not affected by \fB--paths-testbed\fR.
.TP
+.BR --timeout- \fIwhich\fR = \fIseconds\fR
+Use a different timeout for operations on or with the testbed. There
+are four timeouts affected by four values of \fIwhich\fR:
+.BR short :
+supposedly
+short operations like setting up the testbed's apt and checking the
+state (default: 100s);
+.BR install :
+installation of packages including dependencies
+(default: 3ks);
+.BR test :
+test runs (default: 10ks); and
+.BR build :
+builds (default:
+100ks). The value must be specified as an integer number of seconds.
+.TP
+.BR --timeout-factor =\fIdouble\fR
+Multiply all of the default timeouts by the specified factor (see
+\fB--timeout-\fR\fIwhich\fR above). Only the defaults are affected;
+explicit timeout settings are used exactly as specified.
+.TP
.BR --debug | -d
Include additional debugging information in the trace log. Each
additional \fB-d\fR increases the debugging level; the current maximum
disable=true
interactive=true
target=source
+suppressrepeatedemails=false
arch=`dpkg --print-architecture`
for config in "$@"; do
return if $score < $best_score
or ($score==$best_score and \
$package gt $best_package);
+#printf STDERR " <----- best score=%s best_score=%s\n", $score, $best_score;
$best_score= $score;
$best_package= $package;
}
$score= 1e7 if $score>1e7;
$score *= 5 if $lastver{$package} ne $version;
$score *= 10 unless $extras{$package} =~ m/ nt /;
+#print STDERR "$package score $score\n";
} elsif (m/^Architecture:.*/ &&
- !m/\s'$arch'\s/) {
+ !m/\s(?:'$arch'|all|any)\s/) {
+#printf STDERR " <----- skip %s %s\n", $&, "'$arch'";
$skip= 1;
} elsif (m/^$/) {
endpackage();
progress "RESULTS $summary"
+if [ "x$suppresspackages" != x ] \
+ && grep -x "$pkg" "$suppresspackages" >/dev/null; then
+ printf >&3 "email-suppressed "
+ email=''
+fi
+
if $upload; then
progress "bundling"
printf "\n%s\n" "$summary" >>"$tmp"/_summary
- ln "$tmp"/_summary "$tp"/summary
+
+ edest=${email%_email}
+ esummary="$var"/emailed/last-$pkg,$edest
+ if [ "x$edest" = x ]; then
+ printf >&3 "email-none "
+ rm -f "$var"/emailed/last-$pkg,*
+ esummary=''
+ elif $suppressrepeatedemails \
+ && [ -f "$esummary" ] \
+ && diff -u "$esummary" "$tmp"/_summary >"$var"/emailed/diff-$pkg; then
+ printf >&3 "email-same $email "
+ email=''
+ esummary=''
+ else
+ cp "$tmp"/_summary "$esummary".new
+ fi
+
+ ln -f "$tmp"/_summary "$tp"/summary
for odir in tmp out; do
if test -d "$tp"/$odir; then
progress "contacting $email"
eval "email_addr=\$$email"
printf >&3 "email \"%s\" " "$email_addr"
- cat >"$tmp"/_email <<END
+ cat >"$tmp"/_email_header <<END
From: $from
To: $email_addr
Subject: autopkgtest $distro $desc: $summary
+END
+
+ printf >"$tmp"/_email "$email_package_header" "$pkg"
+
+ cat >>"$tmp"/_email <<END
Test executed for: $distro $target $pkg
Outcome: $summary
END
pMaintainer)
cat >>"$tmp"/_email <<END
You are listed in the Maintainer field of the $pkg package in $distro
- and the test results appear to indicate a problem with the package.
+ and the test results appear to indicate a problem with the package.
END
;;
maintainer_email_override)
cat >>"$tmp"/_email <<END
The test results appear to indicate a problem with the package
- and reports for package maintainers for $distro are being directed to
- $maintainer_email_override
+ and reports for package maintainers for $distro are being directed to
+ $maintainer_email_override
END
;;
administrator_email)
sufficient, another copy can be found along with output files, saved
temporary files, and so on, at:
$desthttphead/$destdirfin/
-
+$email_extra_info
If you have any questions about this service please contact me at:
$from
fi
else
cat >>"$tmp"/_email 2>&1 "$tmp"/_log ||:
+
+ if [ "x$email_signing_key" != x ]; then
+ printf >&3 "signing "
+ echo >>"$tmp/_email"
+ gpg -u"$email_signing_key" --clearsign \
+ <"$tmp/_email" >"$tmp/_email.asc"
+ mv -f "$tmp/_email.asc" "$tmp/_email"
+ fi
+ cat "$tmp/_email_header" "$tmp/_email" >"$tmp/_email.new"
+ mv -f "$tmp/_email.new" "$tmp/_email"
+
if $interactive; then
cat "$tmp"/_email >&2
else
sendmail -odi -oem -t -oi <"$tmp"/_email
+ if [ "x$esummary" != x ]; then
+ printf >&3 "email-recorded "
+ mv "$esummary".new "esummary"
+ fi
fi
fi