summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Landaeta <nomadium@debian.org>2019-02-26 10:24:15 +0100
committerAndrej Shadura <andrewsh@debian.org>2019-02-26 10:24:15 +0100
commit8d32371a30907d4b5fef9da6cd41b2093f0af784 (patch)
treeeadca42fe92faf297d2e1549ef27a1013f6b9002
parent9dd83224d62687eae29d56a33982c5d4cea21a0e (diff)
Configure unit tests setup for Debian builds
Forwarded: no Last-Update: 2017-02-10 Gbp-Pq: Name 0008-Configure-unit-tests-to-run-at-build-time.patch
-rwxr-xr-xbin/rake38
-rw-r--r--rakelib/rspec.rake5
-rw-r--r--rakelib/test.rake1
3 files changed, 26 insertions, 18 deletions
diff --git a/bin/rake b/bin/rake
index bb5b395d5..1327a2195 100755
--- a/bin/rake
+++ b/bin/rake
@@ -6,22 +6,28 @@
# this file is here to facilitate running it.
#
-require 'rubygems'
+# require 'rubygems'
+#
+# version = ">= 0.a"
+#
+# if ARGV.first
+# str = ARGV.first
+# str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+# if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+# version = $1
+# ARGV.shift
+# end
+# end
+#
+# if Gem.respond_to?(:activate_bin_path)
+# load Gem.activate_bin_path('rake', 'rake', version)
+# else
+# gem "rake", version
+# load Gem.bin_path("rake", "rake", version)
+# end
-version = ">= 0.a"
+$LOAD_PATH << '/usr/lib/ruby/vendor_ruby'
-if ARGV.first
- str = ARGV.first
- str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
- if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
- version = $1
- ARGV.shift
- end
-end
+require 'rake'
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('rake', 'rake', version)
-else
-gem "rake", version
-load Gem.bin_path("rake", "rake", version)
-end
+Rake.application.run
diff --git a/rakelib/rspec.rake b/rakelib/rspec.rake
index a8e314368..c77692e59 100644
--- a/rakelib/rspec.rake
+++ b/rakelib/rspec.rake
@@ -15,8 +15,9 @@
namespace :spec do
# Put Rake on the load path for JI specs without requiring rubygems
- rake_location = File.join(Gem.loaded_specs['rake'].full_gem_path, "lib")
- gem 'rspec'
+ # rake_location = File.join(Gem.loaded_specs['rake'].full_gem_path, "lib")
+ # gem 'rspec'
+ rake_location = '/usr/lib/ruby/vendor_ruby/rake.rb'
require 'rspec/core/rake_task'
compile_flags = {
diff --git a/rakelib/test.rake b/rakelib/test.rake
index 2841d6b22..5daaf5883 100644
--- a/rakelib/test.rake
+++ b/rakelib/test.rake
@@ -123,6 +123,7 @@ namespace :test do
t.verbose = true
t.ruby_opts << '-Xaot.loadClasses=true' # disabled by default now
t.ruby_opts << '-I.'
+ t.ruby_opts << '-I/usr/lib/ruby/vendor_ruby'
t.ruby_opts << '-J-ea'
t.ruby_opts << '--headless'
classpath = %w[test test/target/test-classes core/target/test-classes].join(File::PATH_SEPARATOR)