Package: rake / 13.0.1-4~bpo10+1

0001-test-helper-adapt-to-test-installed-package.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Antonio Terceiro <terceiro@debian.org>
Date: Tue, 27 Jun 2017 18:11:53 -0300
Subject: test/helper: adapt to test installed package

These changes are necessary to run under Debian's autopkgtest, which is
supposed to test the installed package (as opposed to testing the code
in a source code checkout)
---
 test/helper.rb | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

--- a/test/helper.rb
+++ b/test/helper.rb
@@ -36,9 +36,15 @@
     @verbose = ENV["VERBOSE"]
 
     @rake_root = File.expand_path "../../", __FILE__
-    @rake_exec = File.join @rake_root, "exe", "rake"
-    @rake_lib  = File.join @rake_root, "lib"
-    @ruby_options = ["-I#{@rake_lib}", "-I."]
+    if ENV['ADTTMP']
+      @rake_exec = '/usr/bin/rake'
+      @rake_lib  = '/usr/lib/ruby/vendor_ruby'
+      @ruby_options = []
+    else
+      @rake_exec = File.join @rake_root, "exe", "rake"
+      @rake_lib  = File.join @rake_root, "lib"
+      @ruby_options = ["-I#{@rake_lib}", "-I."]
+    end
 
     @orig_pwd = Dir.pwd
     @orig_appdata      = ENV["APPDATA"]