2 # This file is part of autopkgtest
3 # autopkgtest is a tool for testing Debian packages
5 # autopkgtest is Copyright (C) 2006 Canonical Ltd.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 # See the file CREDITS for a full list of credits information (often
22 # installed as /usr/share/doc/autopkgtest/CREDITS).
32 *) onepackage_args[${#onepackage_args[*]}]="${arg#@}" ;;
42 if [ "x$distro" = x ]; then
43 : ${testbed_check_path:=/var/lib/autopkgtest/xenlvm/adt_${distro}/good}
45 : ${testbed_check_path:=/dev/null}
48 if [ "x$test_classes" = x ]; then
49 : ${architecture:=`dpkg --print-architecture`}
50 test_classes="source $distro, target=source : binary $distro, target=binary-$architecture"
53 fail () { printf >&2 "%s\n" "$*"; exit 127; }
54 progress () { printf "========== %s ==========\n" "$1"; }
55 x () { printf "+ %s\n" "$*"; "$@"; }
56 x2 () { printf >&2 "+ %s\n" "$*"; "$@"; }
62 while ($go_anyway || test -f go) && test $test_count -lt $max_test_count; do
66 if ! test -e $testbed_check_path; then
67 printf " testbed broken, bailing\n"
71 xopts="${test_classes%%:*}"
72 xopts_opts="${xopts#*,}"
73 printf "considering (%s) " "$xopts_opts"
75 case "$test_classes" in
76 *:*) test_classes="${test_classes#*:}:$xopts" ;;
80 for x in ${xopts%%,*}; do
81 if test -f "stop-$x"; then
82 printf " skipping because of %s" "$x"
92 adt-testreport-onepackage \
93 adtrun_extra_opts=--built-binaries-filter=__ \
95 "${onepackage_args[@]}" \
98 test_count=$(( $test_count + 1 ))