From 896b9b098d17583fb570ea4662ebd26b12149b3a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 21 Aug 2007 18:00:25 +0100 Subject: [PATCH] * hosts/cadmium/*: new directory for stuff on Canonical buildd. --- debian/changelog | 1 + hosts/cadmium/adt-sendto-launchpad | 85 ++++++++++++++++++++++++++++++ hosts/cadmium/cleanup | 27 ++++++++++ hosts/cadmium/cronjob | 6 +++ hosts/cadmium/crontab | 4 ++ hosts/cadmium/lalonde-nightly | 68 ++++++++++++++++++++++++ hosts/cadmium/nightly-lock | 0 hosts/cadmium/onepackage-config | 15 ++++++ 8 files changed, 206 insertions(+) create mode 100755 hosts/cadmium/adt-sendto-launchpad create mode 100755 hosts/cadmium/cleanup create mode 100755 hosts/cadmium/cronjob create mode 100644 hosts/cadmium/crontab create mode 100755 hosts/cadmium/lalonde-nightly create mode 100644 hosts/cadmium/nightly-lock create mode 100644 hosts/cadmium/onepackage-config diff --git a/debian/changelog b/debian/changelog index 863797e..9e47285 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ autopkgtest (1.0.4) unstable; 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. -- diff --git a/hosts/cadmium/adt-sendto-launchpad b/hosts/cadmium/adt-sendto-launchpad new file mode 100755 index 0000000..c636269 --- /dev/null +++ b/hosts/cadmium/adt-sendto-launchpad @@ -0,0 +1,85 @@ +#!/usr/bin/perl + +# formail < AUTOPKGTEST -s /net/anarres/slash/ubuntu/work/AutomatedTesting/autopkgtest--main/runner/adt-sendto-launchpad --mail + +if ($ARGV[0] eq '--mail') { + shift; + $sm= open STDOUT, "|/usr/sbin/sendmail -oi -odb -oem -t"; + defined $sm or die $!; +} + +while (<>) { + if (s/^subject: //i) { + s/^autopkgtest // or die "$_ ?"; + s/^(\w+) // or die "$_ ?"; $distro= $1; + s/^([-+.0-9a-z]+)// or die "$_ ?"; $package= $1; + if (m/^:/) { + $target= 'source'; + } elsif (m/^ (\w+)\:/) { + $target= $1; + } else { + die "$_ ?"; + } + } + last if m/^$/; +} + +$lphead= " affects /ubuntu/$package\n"; + +if ($target eq 'source') { + $subject= "$distro/amd64: ftbfs / autopkgtest failure"; + $intro= ' +An instance of autopkgtest (an automatic package testing system) has +found that this package either failed to build from source - or that +it declared some tests in its debian/tests/control and that at least +one of these tests failed. +'; +} else { + $subject= "$distro/$target: failed to install (autopkgtest)"; + $intro= ' +An instance of autopkgtest (an automatic package testing system) has +found that this package did not successfully install. +'; +} + +$common= " +A human has briefly looked at the transcript and concluded that the +fault is a bug in the package or one of its build-dependencies. + +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. + +The top and bottom of the mail sent by the autopkgtest instance to its +administrator is included below. The full log can be found at + http://autopkgtest.ubuntu.com/autopkgtest-output/$distro/$package/ + +"; + +$headers= +"To: new\@bugs.launchpad.net +Subject: $subject + +"; + +for ($i=0; $i<7; $i++) { $top .= "| ".<>; } + +for (;;) { + defined($_= <>) or last; + push @bot, "| ".$_; + shift @bot if @bot > 50; +} + +print $headers or die $!; + +$body= $lphead.$intro. $common. $top. "...\n". join("",@bot); + +open P, "|gpg -u0xc62ac3f4 --clearsign" or die $!; +print P $body; +$?=0; close P or die $!; +die $? if $?; + +if (defined $sm) { + $?=0; close STDOUT or die $!; + die $? if $?; +} diff --git a/hosts/cadmium/cleanup b/hosts/cadmium/cleanup new file mode 100755 index 0000000..aa7edad --- /dev/null +++ b/hosts/cadmium/cleanup @@ -0,0 +1,27 @@ +#!/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 -- + diff --git a/hosts/cadmium/cronjob b/hosts/cadmium/cronjob new file mode 100755 index 0000000..28d45ce --- /dev/null +++ b/hosts/cadmium/cronjob @@ -0,0 +1,6 @@ +#!/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 diff --git a/hosts/cadmium/crontab b/hosts/cadmium/crontab new file mode 100644 index 0000000..119497e --- /dev/null +++ b/hosts/cadmium/crontab @@ -0,0 +1,4 @@ +# 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 diff --git a/hosts/cadmium/lalonde-nightly b/hosts/cadmium/lalonde-nightly new file mode 100755 index 0000000..020b5f2 --- /dev/null +++ b/hosts/cadmium/lalonde-nightly @@ -0,0 +1,68 @@ +#!/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' diff --git a/hosts/cadmium/nightly-lock b/hosts/cadmium/nightly-lock new file mode 100644 index 0000000..e69de29 diff --git a/hosts/cadmium/onepackage-config b/hosts/cadmium/onepackage-config new file mode 100644 index 0000000..96de272 --- /dev/null +++ b/hosts/cadmium/onepackage-config @@ -0,0 +1,15 @@ +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 " +disable=false +desthttphead=http://autopkgtest.ubuntu.com/ +destrsynchead=/home/iwj/public_html +destdirtail=autopkgtest-output/$distro +adtvirt_extra_opts=--userv +upload_if_ok=true +upload_if_notests=true -- 2.30.2