[SCM] ci-tooling packaging branch, master, updated. caa7c4404b1285995da9b2c1c33e7251adb8b80c
Rohan Garg
rohangarg-guest at moszumanska.debian.org
Fri Jul 17 16:44:36 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=caa7c44
The following commit has been merged in the master branch:
commit caa7c4404b1285995da9b2c1c33e7251adb8b80c
Author: Rohan Garg <rohan at garg.io>
Date: Fri Jul 17 18:44:06 2015 +0200
Fix regex and implement test for empty install files and man pages
---
lib/ci/build_source.rb | 2 +-
.../packaging/debian/changelog | 0
.../packaging/debian/compat | 0
.../packaging/debian/control | 0
.../packaging/debian/copyright | 0
.../test_empty_install/packaging/debian/hello.install | 1 +
.../packaging/debian/rules | 0
.../packaging/debian/rules-old | 0
.../packaging/debian/source/format | 0
.../packaging/debian/watch | 0
test/test_ci_build_source.rb | 15 +++++++++++++++
11 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/lib/ci/build_source.rb b/lib/ci/build_source.rb
index 55ca190..5ffb81b 100644
--- a/lib/ci/build_source.rb
+++ b/lib/ci/build_source.rb
@@ -67,7 +67,7 @@ class VcsSourceBuilder
Dir.glob('debian/*.install').each do |install_file_path|
# Strip localized manpages
# e.g. usr /share /man / * /man 7 /kf5options.7
- subbed = File.open(install_file_path).read.gsub(%r{^.*usr\/share\/man\/(\*|\w+)\/man\d\/.*$/}, '')
+ subbed = File.open(install_file_path).read.gsub(%r{^.*usr\/share\/man\/(\*|\w+)\/man\d\/.*$}, '')
File.open(install_file_path, 'w') do |f|
f << subbed
end
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/changelog b/test/data/test_ci_build_source/test_empty_install/packaging/debian/changelog
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/changelog
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/changelog
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/compat b/test/data/test_ci_build_source/test_empty_install/packaging/debian/compat
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/compat
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/compat
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/control b/test/data/test_ci_build_source/test_empty_install/packaging/debian/control
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/control
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/control
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/copyright b/test/data/test_ci_build_source/test_empty_install/packaging/debian/copyright
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/copyright
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/copyright
diff --git a/test/data/test_ci_build_source/test_empty_install/packaging/debian/hello.install b/test/data/test_ci_build_source/test_empty_install/packaging/debian/hello.install
new file mode 100644
index 0000000..e92c45e
--- /dev/null
+++ b/test/data/test_ci_build_source/test_empty_install/packaging/debian/hello.install
@@ -0,0 +1 @@
+usr/share/man/*/man1/hello.1
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/rules b/test/data/test_ci_build_source/test_empty_install/packaging/debian/rules
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/rules
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/rules
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/rules-old b/test/data/test_ci_build_source/test_empty_install/packaging/debian/rules-old
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/rules-old
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/rules-old
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/source/format b/test/data/test_ci_build_source/test_empty_install/packaging/debian/source/format
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/source/format
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/source/format
diff --git a/test/data/test_ci_build_source/test_native/packaging/debian/watch b/test/data/test_ci_build_source/test_empty_install/packaging/debian/watch
similarity index 100%
copy from test/data/test_ci_build_source/test_native/packaging/debian/watch
copy to test/data/test_ci_build_source/test_empty_install/packaging/debian/watch
diff --git a/test/test_ci_build_source.rb b/test/test_ci_build_source.rb
index a3afbd2..54c251c 100644
--- a/test/test_ci_build_source.rb
+++ b/test/test_ci_build_source.rb
@@ -55,4 +55,19 @@ class VCSBuilderTest < TestCase
assert_equal("2.10+git20150717.1756+#{OS::VERSION_ID}", r.version)
end
end
+
+ def test_empty_install
+ Dir.chdir(data) do
+ s = VcsSourceBuilder.new(release: @release)
+ r = s.run
+ assert_equal(:native, r.type)
+ assert_equal('hello', r.name)
+ assert_equal("2.10+git20150717.1756+#{OS::VERSION_ID}", r.version)
+ Dir.chdir('build/') do
+ system("dpkg-source -x #{r.name}_#{r.version}.dsc")
+ assert(File.exist?("#{r.name}-#{r.version}/debian/#{r.name}.lintian-overrides"))
+ end
+ end
+ end
+
end
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list