chiark / gitweb /
test suite: protocol-compat: check that we use the right distro
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 13 Jan 2017 17:59:11 +0000 (17:59 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 13 Jan 2017 18:32:32 +0000 (18:32 +0000)
* Set distro to '' when running the import.  This makes dgit fall back
  to the default distro.

* Set the default distro to `foreign' (which has no settings, so we
  use builtin defaults).  This only has any effect if the shell
  variable `distro' is set to the empty string - so it only takes
  effect during the import.

* Set dgit-distro.foreign.cmd-git to false.  This therefore detects if
  we ever try to do the import with the default distro's `git'
  command: we are supposed to be using the one from the .dsc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/tests/protocol-compat

index 04328fe5fff8fa263be123bf2a2012cf3dbca866..dfd59b79464146aabaed0e9afb3e797b9f79ad7d 100644 (file)
@@ -14,6 +14,8 @@ dgit (3.3~) unstable; urgency=medium
   * Move default dsc distro config setting to lib.  We need this
     for the .dscs we have in tests/pkg-srcs/.
   * test suite: defdistro-import-dsc: Drop this test.
+  * test suite: protocol-compat: check that we use the right distro
+    information when importing.
   * test suite: Internal change: fix handling of nonempty distro=
 
  --
index 59e8d6515b128ed8cfd4ab1b05e682400bfb2633..fcbeedb82d7cc02c4b786e32d4b407aa6b0c01a3 100755 (executable)
@@ -6,6 +6,9 @@ set -e
 t-setup-import examplegit
 t-tstunt-parsechangelog
 
+t-git-config dgit.default.distro foreign
+t-git-config dgit-distro.foreign.cmd-git false
+
 prep () {
        dscf=$tmp/mirror/pool/main/example_$v.dsc
 }
@@ -23,6 +26,7 @@ check () {
 
        $1
 
+       local distro=''
        t-dgit import-dsc $dscf +imported
        t-ref-same refs/heads/imported
        cd ..