[DRE-commits] [SCM] ruby-json.git branch, master, updated. upstream/1.5.1-22-g7f09c00

Lucas Nussbaum lucas at lucas-nussbaum.net
Sat Jul 30 06:40:46 UTC 2011


The following commit has been merged in the master branch:
commit 9795ef77dc99dcd0f0df1c7d8c27470f9fa5e3d6
Author: Lucas Nussbaum <lucas at lucas-nussbaum.net>
Date:   Sat Jul 30 08:08:47 2011 +0200

    debian/patches/04-fix-tests-path.patch: Fix load path during tests. Closes: #634438

diff --git a/debian/changelog b/debian/changelog
index 713bcf8..b44322d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 ruby-json (1.5.3-1) unstable; urgency=low
 
   * New upstream release.
+  * debian/patches/04-fix-tests-path.patch: Fix load path during tests.
+    Closes: #634438
 
  -- Lucas Nussbaum <lucas at debian.org>  Sat, 30 Jul 2011 07:52:59 +0200
 
diff --git a/debian/patches/04-fix-tests-path.patch b/debian/patches/04-fix-tests-path.patch
new file mode 100644
index 0000000..8f23e40
--- /dev/null
+++ b/debian/patches/04-fix-tests-path.patch
@@ -0,0 +1,19 @@
+Description: Let debian/ruby-tests.rb handle the test suite loading
+ Was causing FTBFS because ext was loaded.
+Origin: vendor
+Author: Lucas Nussbaum <lucas at debian.org>
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634438
+--- a/tests/setup_variant.rb
++++ b/tests/setup_variant.rb
+@@ -1,11 +1,8 @@
+ case ENV['JSON']
+ when 'pure'
+-  $:.unshift 'lib'
+   require 'json/pure'
+ when 'ext'
+-  $:.unshift 'ext', 'lib'
+   require 'json/ext'
+ else
+-  $:.unshift 'ext', 'lib'
+   require 'json'
+ end
diff --git a/debian/patches/series b/debian/patches/series
index c04c1d7..9ed6307 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 00-icon-path.patch
 02-fix-fuzz.rb-shebang.patch
 03-bin-prettify_json.rb-Set-max_nesting-and-create_addi.patch
+04-fix-tests-path.patch
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
index 9745158..ca7c9f3 100644
--- a/debian/ruby-tests.rb
+++ b/debian/ruby-tests.rb
@@ -1,4 +1,8 @@
+inc = $:.map { |d| "-I#{d}" }.join(' ')
+p inc
 ENV['json'] = 'pure'
-system("#{ENV['RUBY_TEST_BIN']} -Ilib -Iext -I. tests/test_*.rb") or raise
+puts "Pure version of the tests"
+system("#{ENV['RUBY_TEST_BIN']} #{inc} tests/test_*.rb") or raise
 ENV['json'] = 'ext'
-system("#{ENV['RUBY_TEST_BIN']} -Ilib -Iext -I. tests/test_*.rb") or raise
+puts "Ext version of the tests"
+system("#{ENV['RUBY_TEST_BIN']} #{inc} tests/test_*.rb") or raise

-- 
ruby-json.git



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