[SCM] ci-tooling packaging branch, master, updated. a1294d84e8d44eabd01912f5721e4f6cafe6abcf

Harald Sitter apachelogger-guest at moszumanska.debian.org
Wed Sep 16 13:02:10 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=a1294d8

The following commit has been merged in the master branch:
commit a1294d84e8d44eabd01912f5721e4f6cafe6abcf
Author: Harald Sitter <sitter at kde.org>
Date:   Wed Sep 16 15:02:07 2015 +0200

    cover buildpackage failure in build_source test and nocov dch fail
    
    dch cannot fail because it is of suitable format when dch is run due to
    us parsing it beforehand to get to the version
---
 lib/ci/build_source.rb                                           | 4 ++++
 .../test_build_fail/packaging/debian/changelog                   | 9 +++++++++
 .../packaging/debian/compat                                      | 0
 .../packaging/debian/control                                     | 2 +-
 .../packaging/debian/rules                                       | 0
 .../packaging/debian/source/format                               | 0
 .../test_build_fail/source/README}                               | 0
 test/test_ci_build_source.rb                                     | 8 ++++++++
 8 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/lib/ci/build_source.rb b/lib/ci/build_source.rb
index 5ffb81b..f5b636a 100644
--- a/lib/ci/build_source.rb
+++ b/lib/ci/build_source.rb
@@ -104,7 +104,11 @@ class VcsSourceBuilder
       ENV['DEBEMAIL'] = @data[@flavor][:email]
       unless system("dch -b -v #{@source.version} -D #{@release} \
                     'Automatic #{@flavor.capitalize} CI Build'")
+        # :nocov:
+        # dch cannot actually fail because we parse the changelog beforehand
+        # so it is of acceptable format here already.
         fail 'Failed to create changelog entry'
+        # :nocov:
       end
     end
   end
diff --git a/test/data/test_ci_build_source/test_build_fail/packaging/debian/changelog b/test/data/test_ci_build_source/test_build_fail/packaging/debian/changelog
new file mode 100644
index 0000000..31561c2
--- /dev/null
+++ b/test/data/test_ci_build_source/test_build_fail/packaging/debian/changelog
@@ -0,0 +1,9 @@
+hello (2.10-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/patches: Drop 01-fix-i18n-of-default-message, no longer needed.
+  * debian/patches: Drop 99-config-guess-config-sub, no longer needed.
+  * debian/rules: Drop override_dh_auto_build hack, no longer needed.
+  * Standards-Version: 3.9.6 (no changes for this).
+
+ -- Santiago Vila <sanvila at debian.org>  Sun, 22 Mar 2015 11:56:00 +0100
diff --git a/test/data/test_ci_build_source/test_empty_install/packaging/debian/compat b/test/data/test_ci_build_source/test_build_fail/packaging/debian/compat
similarity index 100%
copy from test/data/test_ci_build_source/test_empty_install/packaging/debian/compat
copy to test/data/test_ci_build_source/test_build_fail/packaging/debian/compat
diff --git a/test/data/test_ci_build_source/test_empty_install/packaging/debian/control b/test/data/test_ci_build_source/test_build_fail/packaging/debian/control
similarity index 96%
copy from test/data/test_ci_build_source/test_empty_install/packaging/debian/control
copy to test/data/test_ci_build_source/test_build_fail/packaging/debian/control
index 00487a1..2bcd0b6 100644
--- a/test/data/test_ci_build_source/test_empty_install/packaging/debian/control
+++ b/test/data/test_ci_build_source/test_build_fail/packaging/debian/control
@@ -1,4 +1,4 @@
-Source: hello
+Source: differentsourcename
 Section: devel
 Priority: optional
 Maintainer: Santiago Vila <sanvila at debian.org>
diff --git a/test/data/test_ci_build_source/test_empty_install/packaging/debian/rules b/test/data/test_ci_build_source/test_build_fail/packaging/debian/rules
similarity index 100%
copy from test/data/test_ci_build_source/test_empty_install/packaging/debian/rules
copy to test/data/test_ci_build_source/test_build_fail/packaging/debian/rules
diff --git a/test/data/test_ci_build_source/test_quilt/packaging/debian/source/format b/test/data/test_ci_build_source/test_build_fail/packaging/debian/source/format
similarity index 100%
copy from test/data/test_ci_build_source/test_quilt/packaging/debian/source/format
copy to test/data/test_ci_build_source/test_build_fail/packaging/debian/source/format
diff --git a/test/data/test_cmake_parser/test_init b/test/data/test_ci_build_source/test_build_fail/source/README
similarity index 100%
copy from test/data/test_cmake_parser/test_init
copy to test/data/test_ci_build_source/test_build_fail/source/README
diff --git a/test/test_ci_build_source.rb b/test/test_ci_build_source.rb
index 9e8d652..1b2470a 100644
--- a/test/test_ci_build_source.rb
+++ b/test/test_ci_build_source.rb
@@ -72,4 +72,12 @@ class VCSBuilderTest < TestCase
       assert(File.exist?("#{r.name}-#{r.version}/debian/#{r.name}.lintian-overrides"))
     end
   end
+
+  def test_build_fail
+    copy_data
+    s = VcsSourceBuilder.new(release: @release)
+    assert_raise RuntimeError do
+      s.run
+    end
+  end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list