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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue May 5 08:16:22 UTC 2015


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

The following commit has been merged in the master branch:
commit 763a96679fc89e19e34b79169783350a182b3cac
Author: Harald Sitter <sitter at kde.org>
Date:   Tue May 5 09:37:38 2015 +0200

    test the version suffix so that it doesn't get broken again
    
    also repair test isolation broken in the os-release porting by fixing
    the test to override OS and define all used variables
---
 test/test_ci_build_version.rb | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/test/test_ci_build_version.rb b/test/test_ci_build_version.rb
index 449429c..08cb32a 100644
--- a/test/test_ci_build_version.rb
+++ b/test/test_ci_build_version.rb
@@ -5,17 +5,32 @@ require_relative 'lib/testcase'
 # Test ci/build_version
 class CIBuildVersionTest < TestCase
   def setup
-    LSB.instance_variable_set(:@hash, DISTRIB_RELEASE: '15.04')
+    OS.instance_variable_set(:@hash, VERSION_ID: '15.04', ID: 'ubuntu')
+    CI::BuildVersion.send(:alias_method, :__time_orig, :time)
+    CI::BuildVersion.send(:define_method, :time) { '20150505.0505' }
   end
 
   def teardown
-    LSB.reset
+    CI::BuildVersion.send(:undef_method, :time)
+    CI::BuildVersion.send(:alias_method, :time, :__time_orig)
+    OS.reset
   end
 
   def test_all
     c = Changelog.new(data)
     v = CI::BuildVersion.new(c)
     suffix = v.send(:instance_variable_get, :@suffix)
+
+    # Suffix must be comprised of a date and a distribution identifier such
+    # that uploads created at the same time for different targets do not
+    # conflict one another.
+    parts = suffix.split('+')
+    assert_empty(parts[0])
+    assert_equal("git#{v.time}", parts[1])
+    assert_equal(OS::VERSION_ID, parts[2])
+    assert_equal("+git#{v.time}+#{OS::VERSION_ID}", suffix)
+
+    # Check actual versions.
     assert_equal("4:5.2.2#{suffix}", v.base)
     assert_equal("5.2.2#{suffix}", v.tar)
     assert_equal("4:5.2.2#{suffix}-0ubuntu0", v.full)

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list