[libconfig-model-dpkg-perl] 03/03: test for debhelper and compat interdependency

dod at debian.org dod at debian.org
Wed Jul 8 19:13:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit a5e966c6defeec5c25d75e6679d86a877cfd6ed7
Author: Dominique Dumont <dod at debian.org>
Date:   Wed Jul 8 21:13:24 2015 +0200

    test for debhelper and compat interdependency
    
    Gbp-Dch: Ignore
---
 t/dependency-check.t | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/t/dependency-check.t b/t/dependency-check.t
index 9caaa8d..6655378 100644
--- a/t/dependency-check.t
+++ b/t/dependency-check.t
@@ -104,6 +104,7 @@ EOD
 
 ok(1,"compiled");
 
+#die "test compat update";
 # pseudo root where config files are written by config-model
 my $wr_root = 'wr_root';
 
@@ -381,6 +382,49 @@ foreach my $vt (@vcs_tests) {
     is($vcs->fetch, $urlb,'fixed $elt URL') ;
 }
 
+# test debhelper compat interaction
+{
+    # instance to check one dependency at a time
+    my $unit = $model->instance (
+        root_class_name => 'Dpkg',
+        root_dir        => $wr_dir,
+        # skip_read       => 1,
+        instance_name   => "compat-test",
+    );
+
+    my $root = $unit->config_root;
+    my $compat_obj = $root->grab("compat");
+    $compat_obj->store(8);
+
+    # TODO: check warnings
+    my $dh_obj;
+    warning_like {
+        $dh_obj = $root->grab("control source Build-Depends:0");
+    }
+        [ qr/debhelper/, (qr/control/) x 8 ] ,
+              "check warnings on initial dep load";
+
+    # apply fixes
+    $dh_obj->apply_fixes;
+    $dh_obj->check(silent => 1);
+    is(scalar $dh_obj->warning_msg,'',"no warnings afer fix");
+
+    # bump debhelper
+    $compat_obj->store(9);
+
+    # check for warnings
+    warning_like {
+        $dh_obj->check;
+    }
+        [ qr/debhelper/ ] , "check warnings after compat bump";
+
+    # apply fixes again
+    $dh_obj->apply_fixes;
+
+    is($dh_obj->fetch,'debhelper (>= 9)',"test fixed debhelper value after compat change");
+}
+
+
 memory_cycle_ok($model, "memory cycles");
 
 done_testing;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



More information about the Pkg-perl-cvs-commits mailing list