[jruby] 01/03: Enable tests

Miguel Landaeta nomadium at moszumanska.debian.org
Sat May 30 04:43:04 UTC 2015


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

nomadium pushed a commit to branch experimental
in repository jruby.

commit d7f8b5bfcf97da558bbffc3e961f580e52b1cfa3
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Fri May 29 22:02:49 2015 -0300

    Enable tests
---
 debian/changelog                                   |  5 +-
 debian/control                                     |  4 ++
 debian/jruby.poms                                  |  1 +
 debian/maven.ignoreRules                           |  2 +
 debian/maven3.mk                                   |  1 -
 ...e-debian-versions-for-plugins-in-pom-test.patch | 31 ++++++++++
 .../0005-Disable-openssl-usage-in-tests.patch      | 41 +++++++++++++
 debian/patches/0007-Enable-mri19-test-suite.patch  | 54 +++++++++++++++++
 ...sable-some-failing-user-tests-in-pbuilder.patch | 68 ++++++++++++++++++++++
 debian/patches/series                              |  4 ++
 debian/rules                                       | 16 ++++-
 11 files changed, 223 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7a17bbd..71fd34c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,9 @@ jruby (1.7.19-1) UNRELEASED; urgency=medium
     - Replace libasm3-java with libasm4-java.
     - Add libjnr-x86asm-java.
     - Update libjnr-netdb-java to (>= 1.1.4~).
+    - Add liblivetribe-jsr223-java.
+    - Add ruby-rspec and ruby-minitest.
+    - Add locales-all.
   * Update copyright file.
   * Remove unnecessary preinst and postinst scripts.
   * Update package description.
@@ -47,7 +50,7 @@ jruby (1.7.19-1) UNRELEASED; urgency=medium
     minified copy. This is to avoid lintian warnings, during build time
     a link symbolic to libjs-jquery is deployed.
 
- -- Miguel Landaeta <nomadium at debian.org>  Thu, 28 May 2015 20:11:15 -0300
+ -- Miguel Landaeta <nomadium at debian.org>  Fri, 29 May 2015 21:13:30 -0300
 
 jruby (1.5.6-10) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index be9bbbe..1fd3345 100644
--- a/debian/control
+++ b/debian/control
@@ -29,6 +29,7 @@ Build-Depends: ant-optional,
                libjnr-x86asm-java (>= 1.0.2~),
                libjoda-time-java,
                libjruby-joni-java,
+               liblivetribe-jsr223-java,
                libmaven-antrun-plugin-java,
                libmaven-assembly-plugin-java,
                libmaven-bundle-plugin-java,
@@ -41,12 +42,15 @@ Build-Depends: ant-optional,
                libunsafe-mock-java,
                libyaml-snake-java,
                libyecht-java (>= 1.0~),
+               locales-all,
                maven,
                maven-debian-helper,
                maven-repo-helper,
                nailgun (>= 0.9.1~),
                netbase,
                openjdk-8-jdk,
+               ruby-minitest,
+               ruby-rspec,
                yydebug
 Standards-Version: 3.9.6
 Homepage: http://jruby.org/
diff --git a/debian/jruby.poms b/debian/jruby.poms
index e477279..d07085a 100644
--- a/debian/jruby.poms
+++ b/debian/jruby.poms
@@ -4,3 +4,4 @@ lib/pom.xml
 maven/jruby-stdlib/pom.xml
 ext/readline/pom.xml
 maven/jruby-dist/pom.xml
+test/pom.xml
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index 6885593..87e8393 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -7,3 +7,5 @@ org.jruby joda-timezones * * * *
 com.headius coro-mock * * * *
 com.headius jsr292-mock * * * *
 com.github.jnr jffi jar * native *
+
+rubygems * * * * *
diff --git a/debian/maven3.mk b/debian/maven3.mk
index 4e83ef0..f2bc0b2 100644
--- a/debian/maven3.mk
+++ b/debian/maven3.mk
@@ -3,7 +3,6 @@ DEB_BUILDDIR = .
 JAVACMD = $(JAVA_HOME)/bin/java
 DEB_MAVEN_REPO := $(CURDIR)/debian/maven-repo
 MAVEN_HOME = /usr/share/maven
-DEB_MAVEN_ARGS := -Pdist
 DEB_CLASSPATH = $(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar
 DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -classpath $(DEB_CLASSPATH) \
                  $(JAVA_OPTS) -Dclassworlds.conf=$(CURDIR)/debian/m2.conf \
diff --git a/debian/patches/0004-Use-debian-versions-for-plugins-in-pom-test.patch b/debian/patches/0004-Use-debian-versions-for-plugins-in-pom-test.patch
new file mode 100644
index 0000000..0dd338d
--- /dev/null
+++ b/debian/patches/0004-Use-debian-versions-for-plugins-in-pom-test.patch
@@ -0,0 +1,31 @@
+diff --git a/test/pom.xml b/test/pom.xml
+index 64cdc98..7ee87db 100644
+--- a/test/pom.xml
++++ b/test/pom.xml
+@@ -179,7 +179,7 @@
+                 <artifactItem>
+                   <groupId>junit</groupId>
+                   <artifactId>junit</artifactId>
+-                  <version>4.11</version>
++                  <version>4.x</version>
+                   <type>jar</type>
+                   <overWrite>false</overWrite>
+                   <outputDirectory>target</outputDirectory>
+@@ -188,7 +188,7 @@
+                 <artifactItem>
+                   <groupId>com.googlecode.jarjar</groupId>
+                   <artifactId>jarjar</artifactId>
+-                  <version>1.1</version>
++                  <version>debian</version>
+                   <type>jar</type>
+                   <overWrite>false</overWrite>
+                   <outputDirectory>target</outputDirectory>
+@@ -197,7 +197,7 @@
+                 <artifactItem>
+                   <groupId>bsf</groupId>
+                   <artifactId>bsf</artifactId>
+-                  <version>2.4.0</version>
++                  <version></version>
+                   <type>jar</type>
+                   <overWrite>false</overWrite>
+                   <outputDirectory>target</outputDirectory>
diff --git a/debian/patches/0005-Disable-openssl-usage-in-tests.patch b/debian/patches/0005-Disable-openssl-usage-in-tests.patch
new file mode 100644
index 0000000..a70ae18
--- /dev/null
+++ b/debian/patches/0005-Disable-openssl-usage-in-tests.patch
@@ -0,0 +1,41 @@
+diff --git a/spec/ruby/core/marshal/fixtures/marshal_data.rb b/spec/ruby/core/marshal/fixtures/marshal_data.rb
+index c665e1d..3533d80 100644
+--- a/spec/ruby/core/marshal/fixtures/marshal_data.rb
++++ b/spec/ruby/core/marshal/fixtures/marshal_data.rb
+@@ -126,21 +126,21 @@ end
+ class UserString < String
+ end
+ 
+-require 'openssl'
+-
+-class UserData < OpenSSL::X509::Name
+-  alias _dump_data to_a
+-
+-  def _load_data entries
+-    entries.each do |entry|
+-      add_entry(*entry)
+-    end
+-  end
+-end
+-
+-class UserDataUnloadable < UserData
+-  undef _load_data
+-end
++#require 'openssl'
++#
++#class UserData < OpenSSL::X509::Name
++#  alias _dump_data to_a
++#
++#  def _load_data entries
++#    entries.each do |entry|
++#      add_entry(*entry)
++#    end
++#  end
++#end
++
++#class UserDataUnloadable < UserData
++#  undef _load_data
++#end
+ 
+ module Meths
+   def meths_method() end
diff --git a/debian/patches/0007-Enable-mri19-test-suite.patch b/debian/patches/0007-Enable-mri19-test-suite.patch
new file mode 100644
index 0000000..9764ec4
--- /dev/null
+++ b/debian/patches/0007-Enable-mri19-test-suite.patch
@@ -0,0 +1,54 @@
+From: Miguel Landaeta <nomadium at debian.org>
+Date: Thu, 28 May 2015 21:14:25 -0300
+Subject: Disable rake and rspec load through gems
+Forwarded: no
+
+diff --git a/rakelib/rspec.rake b/rakelib/rspec.rake
+index dfdf655..fddd1ca 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 = './lib/ruby/1.9/rake.rb'
+   require 'rspec/core/rake_task'
+ 
+   compile_flags = {
+diff --git a/rakelib/test.rake b/rakelib/test.rake
+index 6765a3b..9890c6a 100644
+--- a/rakelib/test.rake
++++ b/rakelib/test.rake
+@@ -113,7 +113,8 @@ namespace :test do
+     t.ruby_opts << '-I test/externals/ruby1.9'
+     t.ruby_opts << '-I test/externals/ruby1.9/ruby'
+     t.ruby_opts << '-r ./test/ruby19_env.rb'
+-    t.ruby_opts << '-r minitest/excludes'
++    # minitest-excludes gem must be packaged first!
++    #t.ruby_opts << '-r minitest/excludes'
+   end
+   
+   permute_tests(:mri, compile_flags) do |t|
+--- a/bin/rake
++++ b/bin/rake
+@@ -19,5 +19,14 @@
+   end
+ end
+ 
+-gem 'rake', version
+-load Gem.bin_path('rake', 'rake', version)
++begin
++  gem 'rake', version
++  load Gem.bin_path('rake', 'rake', version)
++rescue NameError => e # --disable-gems
++  raise unless e.name == :gem
++rescue Gem::LoadError, LoadError
++end
++
++require 'rake'
++
++Rake.application.run
diff --git a/debian/patches/0008-Disable-some-failing-user-tests-in-pbuilder.patch b/debian/patches/0008-Disable-some-failing-user-tests-in-pbuilder.patch
new file mode 100644
index 0000000..59ab8d3
--- /dev/null
+++ b/debian/patches/0008-Disable-some-failing-user-tests-in-pbuilder.patch
@@ -0,0 +1,68 @@
+From: Miguel Landaeta <nomadium at debian.org>
+Date: Fri, 29 May 2015 21:11:16 -0300
+Subject: Disable tests with unexpected results when jruby is built inside a pbuilder chroot
+Forwarded: no
+
+diff --git a/spec/ruby/core/dir/home_spec.rb b/spec/ruby/core/dir/home_spec.rb
+index 23307c8..a1da921 100644
+--- a/spec/ruby/core/dir/home_spec.rb
++++ b/spec/ruby/core/dir/home_spec.rb
+@@ -15,9 +15,9 @@ ruby_version_is "1.9" do
+       Dir.home.should == home_directory
+     end
+ 
+-    it "returns the named user's home directory as a string if called with an argument" do
+-      Dir.home(ENV['USER']).should == home_directory
+-    end
++    #it "returns the named user's home directory as a string if called with an argument" do
++    #  Dir.home(ENV['USER']).should == home_directory
++    #end
+ 
+     it "raises an ArgumentError if the named user doesn't exist" do
+       lambda { Dir.home('geuw2n288dh2k') }.should raise_error(ArgumentError)
+diff --git a/spec/ruby/core/file/expand_path_spec.rb b/spec/ruby/core/file/expand_path_spec.rb
+index 4fa6855..4c8b164 100644
+--- a/spec/ruby/core/file/expand_path_spec.rb
++++ b/spec/ruby/core/file/expand_path_spec.rb
+@@ -130,10 +130,10 @@ describe "File.expand_path" do
+       lambda { File.expand_path("~a_not_existing_user") }.should raise_error(ArgumentError)
+     end
+ 
+-    it "expands ~ENV['USER'] to the user's home directory" do
+-      File.expand_path("~#{ENV['USER']}").should == ENV['HOME']
+-      File.expand_path("~#{ENV['USER']}/a").should == "#{ENV['HOME']}/a"
+-    end
++    #it "expands ~ENV['USER'] to the user's home directory" do
++    #  File.expand_path("~#{ENV['USER']}").should == ENV['HOME']
++    #  File.expand_path("~#{ENV['USER']}/a").should == "#{ENV['HOME']}/a"
++    #end
+ 
+     it "does not expand ~ENV['USER'] when it's not at the start" do
+       File.expand_path("/~#{ENV['USER']}/a").should == "/~#{ENV['USER']}/a"
+diff --git a/spec/ruby/library/etc/getlogin_spec.rb b/spec/ruby/library/etc/getlogin_spec.rb
+index a217ae1..914e16c 100644
+--- a/spec/ruby/library/etc/getlogin_spec.rb
++++ b/spec/ruby/library/etc/getlogin_spec.rb
+@@ -2,13 +2,13 @@ require File.expand_path('../../../spec_helper', __FILE__)
+ require 'etc'
+ 
+ describe "Etc.getlogin" do
+-  it "returns the name of the user who runs this process" do
+-    if Etc.getlogin
+-      Etc.getlogin.should == username
+-    else
+-      # Etc.getlogin may return nil if the login name is not set
+-      # because of chroot or sudo or something.
+-      Etc.getlogin.should be_nil
+-    end
+-  end
++  #it "returns the name of the user who runs this process" do
++  #  if Etc.getlogin
++  #    Etc.getlogin.should == username
++  #  else
++  #    # Etc.getlogin may return nil if the login name is not set
++  #    # because of chroot or sudo or something.
++  #    Etc.getlogin.should be_nil
++  #  end
++  #end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 7a8656e..121d516 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,7 @@
 0001-Fix-shebang-lines.patch
 0003-Add-usr-lib-ruby-vendor-ruby-to-load-path.patch
+0004-Use-debian-versions-for-plugins-in-pom-test.patch
+0005-Disable-openssl-usage-in-tests.patch
 0006-Allow-rdoc-to-run-without-gems.patch
+#0007-Enable-mri19-test-suite.patch
+0008-Disable-some-failing-user-tests-in-pbuilder.patch
diff --git a/debian/rules b/debian/rules
index 02a0436..2bb231d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,7 @@ include /usr/share/dpkg/default.mk
 # upstream code directly from git repo builds with openjdk-7-jdk
 # I have to find out how/why
 JAVA_HOME := /usr/lib/jvm/java-8-openjdk-$(DEB_BUILD_ARCH)
+export LC_ALL=en_US.UTF-8
 
 include $(CURDIR)/debian/maven3.mk
 
@@ -13,7 +14,7 @@ include $(CURDIR)/debian/maven3.mk
 	dh $@
 
 override_dh_auto_clean:
-	-$(DEB_MAVEN_INVOKE) clean
+	-$(DEB_MAVEN_INVOKE) -Pdist clean
 	dh_clean
 	mh_unpatchpoms -pjruby
 	mh_clean
@@ -21,6 +22,8 @@ override_dh_auto_clean:
 	for subp in stdlib dist; do \
 		rm -rf ./maven/jruby-$$subp/target ; \
 	done
+	rm -rf ./test/target/
+	rm -rf -- ./rubyspec_temp/
 	rm -rf -- "$(DEB_MAVEN_REPO)"
 
 override_dh_auto_configure:
@@ -30,7 +33,7 @@ override_dh_auto_configure:
 
 override_dh_auto_build:
 	mkdir -p lib/jni
-	$(DEB_MAVEN_INVOKE) package
+	$(DEB_MAVEN_INVOKE) -Pdist package
 
 override_dh_auto_install:
 	mkdir -p target/package
@@ -43,3 +46,12 @@ override_dh_auto_install:
 	cd target/package/lib/ruby/gems/shared/ && mkdir -p cache gems specifications
 	mh_installpom -pjruby --no-parent core/pom.xml
 	mh_installjar -pjruby --java-lib  core/pom.xml target/package/lib/jruby.jar
+
+override_dh_auto_test:
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	$(DEB_MAVEN_INVOKE) -Ptest test
+	./bin/jruby spec/mspec/bin/mspec ci
+	# enable it when jruby-openssl and minitest-excludes are available in the archive
+	#./bin/jruby -S ./bin/rake test:mri19
+	#./bin/jruby -S ./bin/rake test:extended
+endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby.git



More information about the pkg-java-commits mailing list