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).
27 : ${ADT_GO_ANYWAY:=false}
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 ($ADT_GO_ANYWAY || test -f go) && \
63 test $test_count -lt $max_test_count; do
67 if ! test -e $testbed_check_path; then
68 printf " testbed broken, bailing\n"
72 xopts="${test_classes%%:*}"
73 xopts_opts="${xopts#*,}"
74 printf "considering (%s) " "$xopts_opts"
76 case "$test_classes" in
77 *:*) test_classes="${test_classes#*:}:$xopts" ;;
81 for x in ${xopts%%,*}; do
82 if test -f "stop-$x"; then
83 printf " skipping because of %s" "$x"
93 adt-testreport-onepackage \
94 adtrun_extra_opts=--built-binaries-filter=__ \
96 "${onepackage_args[@]}" \
99 test_count=$(( $test_count + 1 ))