[DRE-commits] [rake] 06/07: Run DEP-8 tests

Antonio Terceiro terceiro at moszumanska.debian.org
Mon Feb 17 13:48:33 UTC 2014


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

terceiro pushed a commit to branch master
in repository rake.

commit 1ff47bf4ba476a2af0c4b5476291a5c8a1d0b3cb
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Feb 15 16:55:57 2014 -0300

    Run DEP-8 tests
---
 debian/control                   |  1 +
 debian/patches/autopkgtest.patch | 25 +++++++++++++++++++++++++
 debian/patches/series            |  1 +
 debian/tests/control             |  5 +++--
 debian/tests/testsuite           |  7 +++++++
 5 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 8003d58..9b82fb3 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,7 @@ Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/rake.git
 Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/rake.git;a=summary
 Homepage: http://rake.rubyforge.org
 XS-Ruby-Versions: all
+XS-Testsuite: autopkgtest
 
 Package: rake
 Architecture: all
diff --git a/debian/patches/autopkgtest.patch b/debian/patches/autopkgtest.patch
new file mode 100644
index 0000000..8f0a715
--- /dev/null
+++ b/debian/patches/autopkgtest.patch
@@ -0,0 +1,25 @@
+Description: support as-installed tests
+ When running tests with autopkgtest, don't try to load files from the source
+ package.
+Author: Antonio Terceiro <terceiro at debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/test/helper.rb
++++ b/test/helper.rb
+@@ -43,8 +43,13 @@ class Rake::TestCase < MiniTest::Unit::T
+     @verbose = ENV['VERBOSE']
+ 
+     @rake_exec = File.join @rake_root, 'bin', 'rake'
+-    @rake_lib  = File.join @rake_root, 'lib'
+-    @ruby_options = ["-I#{@rake_lib}", "-I."]
++    if ENV['ADTTMP']
++      @rake_lib  = '/usr/lib/ruby/vendor_ruby'
++      @ruby_options = []
++    else
++      @rake_lib  = File.join @rake_root, 'lib'
++      @ruby_options = ["-I#{@rake_lib}", "-I."]
++    end
+ 
+     @orig_pwd = Dir.pwd
+     @orig_appdata      = ENV['APPDATA']
diff --git a/debian/patches/series b/debian/patches/series
index 50ff42c..4d4a1b2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-remove_rubygems.patch
 skip_permission_test.patch
+autopkgtest.patch
diff --git a/debian/tests/control b/debian/tests/control
index dfa5a97..ef6c541 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,3 @@
-Tests: rdoctask
-Depends: @, ruby1.8
+Tests: testsuite
+Depends: @, @builddeps@
+Restrictions: rw-build-tree allow-stderr
diff --git a/debian/tests/testsuite b/debian/tests/testsuite
new file mode 100755
index 0000000..48f6f1c
--- /dev/null
+++ b/debian/tests/testsuite
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+mv lib lib.off
+/usr/bin/rake
+status=$?
+mv lib.off lib
+exit $status

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rake.git



More information about the Pkg-ruby-extras-commits mailing list