summaryrefslogtreecommitdiffstats
path: root/test/integration/test-apt-get-build-dep
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest/integration/test-apt-get-build-dep149
-rwxr-xr-xtest/integration/test-apt-get-build-dep-barbarian140
-rwxr-xr-xtest/integration/test-apt-get-build-dep-file222
3 files changed, 511 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-build-dep b/test/integration/test-apt-get-build-dep
new file mode 100755
index 0000000..403de8f
--- /dev/null
+++ b/test/integration/test-apt-get-build-dep
@@ -0,0 +1,149 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+
+setupenvironment
+configarchitecture 'i386'
+
+insertpackage 'stable' 'build-essential' 'i386' '1'
+insertpackage 'stable' 'build-essential2' 'i386' '1'
+insertpackage 'stable' 'build-depends' 'i386' '1'
+insertpackage 'stable' 'build-depends-arch' 'i386' '1'
+insertpackage 'stable' 'build-depends-indep' 'i386' '1'
+insertinstalledpackage 'build-conflicts' 'i386' '1'
+insertinstalledpackage 'build-conflicts-arch' 'i386' '1'
+insertinstalledpackage 'build-conflicts-indep' 'i386' '1'
+
+setupaptarchive
+
+cat > foobar.dsc <<EOF
+Format: 3.0 (native)
+Source: foobar
+Binary: foobar
+Architecture: all
+Version: 1
+Maintainer: Joe Sixpack <joe@example.org>
+Build-Depends: build-depends (>= 1)
+Build-Depends-Indep: build-depends-indep (>= 1)
+Build-Depends-Arch: build-depends-arch (>= 1)
+Build-Conflicts: build-conflicts (>= 1)
+Build-Conflicts-Indep: build-conflicts-indep (>= 1)
+Build-Conflicts-Arch: build-conflicts-arch (>= 1)
+Standards-Version: 3.9.8
+EOF
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ build-conflicts build-conflicts-arch build-conflicts-indep
+The following NEW packages will be installed:
+ build-depends build-depends-arch build-depends-indep build-essential
+0 upgraded, 4 newly installed, 3 to remove and 0 not upgraded.
+Remv build-conflicts [1]
+Remv build-conflicts-arch [1]
+Remv build-conflicts-indep [1]
+Inst build-depends (1 stable [i386])
+Inst build-depends-arch (1 stable [i386])
+Inst build-depends-indep (1 stable [i386])
+Inst build-essential (1 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-depends-arch (1 stable [i386])
+Conf build-depends-indep (1 stable [i386])
+Conf build-essential (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc
+
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ build-conflicts build-conflicts-arch build-conflicts-indep
+The following NEW packages will be installed:
+ build-depends build-depends-arch build-depends-indep build-essential2
+0 upgraded, 4 newly installed, 3 to remove and 0 not upgraded.
+Remv build-conflicts [1]
+Remv build-conflicts-arch [1]
+Remv build-conflicts-indep [1]
+Inst build-depends (1 stable [i386])
+Inst build-depends-arch (1 stable [i386])
+Inst build-depends-indep (1 stable [i386])
+Inst build-essential2 (1 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-depends-arch (1 stable [i386])
+Conf build-depends-indep (1 stable [i386])
+Conf build-essential2 (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc -o APT::Build-Essential="build-essential2"
+
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ build-conflicts build-conflicts-arch build-conflicts-indep
+The following NEW packages will be installed:
+ build-depends build-depends-arch build-depends-indep
+0 upgraded, 3 newly installed, 3 to remove and 0 not upgraded.
+Remv build-conflicts [1]
+Remv build-conflicts-arch [1]
+Remv build-conflicts-indep [1]
+Inst build-depends (1 stable [i386])
+Inst build-depends-arch (1 stable [i386])
+Inst build-depends-indep (1 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-depends-arch (1 stable [i386])
+Conf build-depends-indep (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc -o APT::Build-Essential=","
+
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ build-conflicts build-conflicts-arch build-conflicts-indep
+The following NEW packages will be installed:
+ build-depends build-depends-arch build-depends-indep build-essential
+ build-essential2
+0 upgraded, 5 newly installed, 3 to remove and 0 not upgraded.
+Remv build-conflicts [1]
+Remv build-conflicts-arch [1]
+Remv build-conflicts-indep [1]
+Inst build-depends (1 stable [i386])
+Inst build-depends-arch (1 stable [i386])
+Inst build-depends-indep (1 stable [i386])
+Inst build-essential (1 stable [i386])
+Inst build-essential2 (1 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-depends-arch (1 stable [i386])
+Conf build-depends-indep (1 stable [i386])
+Conf build-essential (1 stable [i386])
+Conf build-essential2 (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc -o APT::Build-Essential::="build-essential2"
+
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ build-conflicts build-conflicts-arch
+The following NEW packages will be installed:
+ build-depends build-depends-arch build-essential
+0 upgraded, 3 newly installed, 2 to remove and 0 not upgraded.
+Remv build-conflicts [1]
+Remv build-conflicts-arch [1]
+Inst build-depends (1 stable [i386])
+Inst build-depends-arch (1 stable [i386])
+Inst build-essential (1 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-depends-arch (1 stable [i386])
+Conf build-essential (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc --arch-only
+
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ build-conflicts build-conflicts-indep
+The following NEW packages will be installed:
+ build-depends build-depends-indep build-essential
+0 upgraded, 3 newly installed, 2 to remove and 0 not upgraded.
+Remv build-conflicts [1]
+Remv build-conflicts-indep [1]
+Inst build-depends (1 stable [i386])
+Inst build-depends-indep (1 stable [i386])
+Inst build-essential (1 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-depends-indep (1 stable [i386])
+Conf build-essential (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc --indep-only
diff --git a/test/integration/test-apt-get-build-dep-barbarian b/test/integration/test-apt-get-build-dep-barbarian
new file mode 100755
index 0000000..688f7a5
--- /dev/null
+++ b/test/integration/test-apt-get-build-dep-barbarian
@@ -0,0 +1,140 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'amd64' 'i386' 'armel' 'mipsel'
+
+insertinstalledpackage 'build-essential' 'all' '1'
+insertpackage 'unstable' 'samey' 'amd64,i386,armel,mipsel' '1' 'Multi-Arch: same'
+insertinstalledpackage 'samey' 'unknown' '1' 'Multi-Arch: same'
+
+insertsource 'unstable' 'cool-foo' 'any' '1' 'Build-Depends: foo, samey'
+insertsource 'unstable' 'bad-amd64-foo' 'any' '1' 'Build-Depends: foo, samey
+Build-Conflicts: foo:amd64'
+insertsource 'unstable' 'bad-armel-foo' 'any' '1' 'Build-Depends: foo, samey
+Build-Conflicts: foo:armel'
+insertsource 'unstable' 'bad-amd64-armel-foo' 'any' '1' 'Build-Depends: foo, samey
+Build-Conflicts: foo:amd64, foo:armel'
+insertsource 'unstable' 'bad-amd64-i386-foo' 'any' '1' 'Build-Depends: foo, samey
+Build-Conflicts: foo:amd64, foo:i386'
+insertsource 'unstable' 'bad-amd64-i386-armel-foo' 'any' '1' 'Build-Depends: foo, samey
+Build-Conflicts: foo:amd64, foo:i386, foo:armel'
+insertpackage 'unstable' 'foo' 'amd64,i386,armel,mipsel' '1' 'Multi-Arch: foreign'
+
+setupaptarchive
+
+installsfoosamey() {
+ local FOO="foo:$1"
+ local SAMEY="samey:$2"
+ if [ "$1" = 'amd64' ]; then FOO='foo'; fi
+ if [ "$2" = 'amd64' ]; then SAMEY='samey'; fi
+ echo "Reading package lists...
+Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ $FOO $SAMEY
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst $FOO (1 unstable [$1])
+Inst $SAMEY (1 unstable [$2])
+Conf $FOO (1 unstable [$1])
+Conf $SAMEY (1 unstable [$2])"
+}
+
+testdpkginstalled 'samey:unknown'
+
+testsuccessequal "$(installsfoosamey 'amd64' 'amd64')" apt build-dep cool-foo -s
+testsuccessequal "$(installsfoosamey 'amd64' 'amd64')" apt build-dep cool-foo -s -a amd64
+testsuccessequal "$(installsfoosamey 'amd64' 'i386')" apt build-dep cool-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'amd64' 'armel')" apt build-dep cool-foo -s -a armel
+
+testsuccessequal "$(installsfoosamey 'i386' 'amd64')" apt build-dep bad-amd64-foo -s
+testsuccessequal "$(installsfoosamey 'i386' 'amd64')" apt build-dep bad-amd64-foo -s -a amd64
+testsuccessequal "$(installsfoosamey 'i386' 'i386')" apt build-dep bad-amd64-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'i386' 'armel')" apt build-dep bad-amd64-foo -s -a armel
+
+testsuccessequal "$(installsfoosamey 'amd64' 'amd64')" apt build-dep bad-armel-foo -s
+testsuccessequal "$(installsfoosamey 'amd64' 'amd64')" apt build-dep bad-armel-foo -s -a amd64
+testsuccessequal "$(installsfoosamey 'amd64' 'i386')" apt build-dep bad-armel-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'amd64' 'armel')" apt build-dep bad-armel-foo -s -a armel
+
+testsuccessequal "$(installsfoosamey 'i386' 'amd64')" apt build-dep bad-amd64-armel-foo -s
+testsuccessequal "$(installsfoosamey 'i386' 'amd64')" apt build-dep bad-amd64-armel-foo -s -a amd64
+testsuccessequal "$(installsfoosamey 'i386' 'i386')" apt build-dep bad-amd64-armel-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'i386' 'armel')" apt build-dep bad-amd64-armel-foo -s -a armel
+
+testsuccessequal "$(installsfoosamey 'armel' 'amd64')" apt build-dep bad-amd64-i386-foo -s
+testsuccessequal "$(installsfoosamey 'armel' 'amd64')" apt build-dep bad-amd64-i386-foo -s -a amd64
+testsuccessequal "$(installsfoosamey 'armel' 'i386')" apt build-dep bad-amd64-i386-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'armel' 'armel')" apt build-dep bad-amd64-i386-foo -s -a armel
+
+testsuccessequal "$(installsfoosamey 'mipsel' 'amd64')" apt build-dep bad-amd64-i386-armel-foo -s
+testsuccessequal "$(installsfoosamey 'mipsel' 'amd64')" apt build-dep bad-amd64-i386-armel-foo -s -a amd64
+testsuccessequal "$(installsfoosamey 'mipsel' 'i386')" apt build-dep bad-amd64-i386-armel-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'mipsel' 'armel')" apt build-dep bad-amd64-i386-armel-foo -s -a armel
+
+
+msgmsg 'BarbarianArchitectures' 'config'
+echo 'APT::BarbarianArchitectures { "mipsel"; "armel"; };' > rootdir/etc/apt/apt.conf.d/99barbarianarchs
+testsuccess aptcache gencaches
+
+testsuccessequal "$(installsfoosamey 'amd64' 'i386')" apt build-dep cool-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'i386' 'i386')" apt build-dep bad-amd64-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'amd64' 'i386')" apt build-dep bad-armel-foo -s -a i386
+testsuccessequal "$(installsfoosamey 'i386' 'i386')" apt build-dep bad-amd64-armel-foo -s -a i386
+testfailureequal 'Reading package lists...
+Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ builddeps:bad-amd64-i386-foo:i386 : Depends: foo:i386
+E: Unable to correct problems, you have held broken packages.' apt build-dep bad-amd64-i386-foo -s -a i386
+testfailureequal 'Reading package lists...
+Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ builddeps:bad-amd64-i386-armel-foo:i386 : Depends: foo:i386
+E: Unable to correct problems, you have held broken packages.' apt build-dep bad-amd64-i386-armel-foo -s -a i386
+
+testsuccessequal "$(installsfoosamey 'amd64' 'armel')" apt build-dep cool-foo -s -a armel
+testsuccessequal "$(installsfoosamey 'i386' 'armel')" apt build-dep bad-amd64-foo -s -a armel
+testsuccessequal "$(installsfoosamey 'amd64' 'armel')" apt build-dep bad-armel-foo -s -a armel
+testsuccessequal "$(installsfoosamey 'i386' 'armel')" apt build-dep bad-amd64-armel-foo -s -a armel
+testsuccessequal "$(installsfoosamey 'armel' 'armel')" apt build-dep bad-amd64-i386-foo -s -a armel
+FAILURE='Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ builddeps:bad-amd64-i386-armel-foo:armel : Depends: foo:armel
+E: Unable to correct problems, you have held broken packages.'
+testfailureequal "Reading package lists...
+$FAILURE" apt build-dep bad-amd64-i386-armel-foo -s -a armel
+
+msgmsg 'BarbarianArchitectures' 'cmdline options'
+rm rootdir/etc/apt/apt.conf.d/99barbarianarchs
+testsuccess aptcache gencaches
+
+testsuccessequal "$(installsfoosamey 'mipsel' 'armel')" apt build-dep bad-amd64-i386-armel-foo -s -a armel
+testsuccess aptcache gencaches -o APT::BarbarianArchitectures::=armel
+testsuccessequal "$(installsfoosamey 'mipsel' 'armel')" apt build-dep bad-amd64-i386-armel-foo -s -a armel -o APT::BarbarianArchitectures::=armel
+testfailureequal "$FAILURE" apt build-dep bad-amd64-i386-armel-foo -s -a armel -o APT::BarbarianArchitectures::=mipsel
+testfailureequal "$FAILURE" apt build-dep bad-amd64-i386-armel-foo -s -a armel -o APT::BarbarianArchitectures::=mipsel -o APT::BarbarianArchitectures::=armel
+testfailureequal "Reading package lists...
+$FAILURE" apt build-dep bad-amd64-i386-armel-foo -s -a armel -o APT::BarbarianArchitectures=mipsel,armel
diff --git a/test/integration/test-apt-get-build-dep-file b/test/integration/test-apt-get-build-dep-file
new file mode 100755
index 0000000..88bf10b
--- /dev/null
+++ b/test/integration/test-apt-get-build-dep-file
@@ -0,0 +1,222 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+
+setupenvironment
+configarchitecture 'i386'
+
+insertpackage 'stable' 'debhelper' 'i386' '7'
+insertpackage 'stable' 'build-essential' 'i386' '1'
+insertpackage 'stable' 'build-depends' 'i386' '1'
+insertsource 'stable' 'unrelated' 'any' '1'
+insertinstalledpackage 'build-conflict' 'i386' '1'
+
+setupaptarchive
+
+msgmsg 'Test with' 'unsigned dsc'
+cat > 2vcard_0.5-3.dsc <<EOF
+Format: 1.0
+Source: 2vcard
+Binary: 2vcard
+Architecture: all
+Version: 0.5-3
+Maintainer: Martin Albisetti <argentina@gmail.com>
+Uploaders: Marcela Tiznado <mlt@debian.org>
+Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 5.0.37)
+Build-Conflicts: build-conflict (<< 2)
+Checksums-Sha1:
+ b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
+ 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
+Checksums-Sha256:
+ efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
+ 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
+Files:
+ f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
+ 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
+EOF
+
+test2vcardbuilddep() {
+ local name="$1"
+ testsuccessequal "Note, using file './$name' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ build-conflict
+The following NEW packages will be installed:
+ build-essential debhelper
+0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
+Remv build-conflict [1]
+Inst build-essential (1 stable [i386])
+Inst debhelper (7 stable [i386])
+Conf build-essential (1 stable [i386])
+Conf debhelper (7 stable [i386])" aptget build-dep -s ./$name
+testfailure aptget build-dep --simulate $name
+cd downloaded
+testsuccess aptget build-dep --simulate ../$name
+testsuccess aptget build-dep --simulate "$(readlink -f ../$name)"
+cd ..
+}
+test2vcardbuilddep "2vcard_0.5-3.dsc"
+cp "2vcard_0.5-3.dsc" "2VCard_0.5-3.dsc"
+test2vcardbuilddep "2VCard_0.5-3.dsc"
+
+msgmsg 'Test with' 'signed dsc'
+cat > 2vcard_0.5-3.dsc <<EOF
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+Format: 1.0
+Source: 2vcard
+Binary: 2vcard
+Architecture: all
+Version: 0.5-3
+Maintainer: Martin Albisetti <argentina@gmail.com>
+Uploaders: Marcela Tiznado <mlt@debian.org>
+Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 5.0.37)
+Build-Conflicts: build-conflict (<< 2)
+Checksums-Sha1:
+ b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
+ 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
+Checksums-Sha256:
+ efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
+ 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
+Files:
+ f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
+ 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iEYEARECAAYFAkijKhsACgkQsrBfRdYmq7aA2gCfaOW9riTYVQMx5ajKQVAcctlC
+z2UAn1oXgTai6opwhVfkxrlmJ+iRxzuc
+=4eRd
+-----END PGP SIGNATURE-----
+EOF
+test2vcardbuilddep "2vcard_0.5-3.dsc"
+cp "2vcard_0.5-3.dsc" "2VCard_0.5-3.dsc"
+test2vcardbuilddep "2VCard_0.5-3.dsc"
+
+
+msgmsg 'Test with' 'unpacked source dir'
+mkdir -p foo-1.0/debian
+cat > foo-1.0/debian/control <<'EOF'
+Source: apturl
+Section: admin
+Priority: optional
+Maintainer: Michael Vogt <mvo@ubuntu.com>
+Build-Depends: ,debhelper (>= 7),
+Build-Conflicts: ,,,
+Build-Depends-Indep:
+X-Python3-Version: >= 3.2
+Standards-Version: 3.9.3
+
+Package: apturl-common
+Architecture: any
+Depends: ${python3:Depends},
+ ${shlibs:Depends},
+ ${misc:Depends},
+ python3-apt,
+ python3-update-manager
+Replaces: apturl (<< 0.3.6ubuntu2)
+Description: install packages using the apt protocol - common data
+ AptUrl is a simple graphical application that takes an URL (which follows the
+ apt-protocol) as a command line option, parses it and carries out the
+ operations that the URL describes (that is, it asks the user if he wants the
+ indicated packages to be installed and if the answer is positive does so for
+ him).
+ .
+ This package contains the common data shared between the frontends.
+
+EOF
+
+testsuccessequal "Note, using directory './foo-1.0' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ build-essential debhelper
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst build-essential (1 stable [i386])
+Inst debhelper (7 stable [i386])
+Conf build-essential (1 stable [i386])
+Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./foo-1.0
+testfailure aptget build-dep --simulate foo-1.0
+cd downloaded
+testsuccess aptget build-dep --simulate ../foo-1.0
+testsuccess aptget build-dep --simulate "$(readlink -f ../foo-1.0)"
+cd ..
+cd foo-1.0
+testsuccess aptget build-dep --simulate './'
+testsuccess aptget build-dep --simulate '.'
+cd debian
+testsuccess aptget build-dep --simulate './../'
+testsuccess aptget build-dep --simulate '../'
+testsuccess aptget build-dep --simulate '..'
+cd ../..
+
+testfailureequal 'E: Must specify at least one package to check builddeps for' aptget build-dep
+testfailureequal "Note, using directory './foo-1.0' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ builddeps:./foo-1.0:armel : Depends: debhelper:armel (>= 7) but it is not installable
+W: No architecture information available for armel. See apt.conf(5) APT::Architectures for setup
+E: Unable to correct problems, you have held broken packages." aptget build-dep --simulate ./foo-1.0 -a armel
+testfailureequal 'Reading package lists...
+E: Unable to find a source package for foo' aptget build-dep --simulate foo
+
+msgmsg 'Test with a dsc' 'with comments'
+cat > comments.dsc <<EOF
+# I love comments
+# I love them so much, I give them their own paragraph
+
+#This is my first package
+Format: 3.0 (native)
+Source: comments
+Binary: comments
+Architecture: all
+Version: 1
+#Version: 2
+Maintainer: Joe Sixpack <joe@example.org>
+Build-Depends: debhelper (>= 5),
+# TODO: add more
+ build-depends (= 1),
+Standards-Version: 3.9.6
+# This is the end…
+
+# or this?
+EOF
+testsuccessequal "Note, using file './comments.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ build-depends build-essential debhelper
+0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Inst build-depends (1 stable [i386])
+Inst build-essential (1 stable [i386])
+Inst debhelper (7 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-essential (1 stable [i386])
+Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./comments.dsc
+testsuccessequal "Note, using file './comments.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+Execute external solver...
+The following NEW packages will be installed:
+ build-depends build-essential debhelper
+0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Inst build-depends (1 stable [i386])
+Inst build-essential (1 stable [i386])
+Inst debhelper (7 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf build-essential (1 stable [i386])
+Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./comments.dsc --solver apt