Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #87 from jenkinsci/fix-travis-build
Browse files Browse the repository at this point in the history
Fix tests on travis-ci.org
  • Loading branch information
Yamashita, Yuu committed Jul 3, 2013
2 parents fb6dbf2 + e7514cf commit 88c44a5
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 16 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
@@ -1,5 +1,11 @@
language: ruby
jdk:
- openjdk6
- openjdk7
- oraclejdk7
rvm:
- jruby-18mode
- jruby-19mode

script: "rake test"
script:
- "rake test"
- "mvn install -DskipTests -B"
- "mvn test"
6 changes: 5 additions & 1 deletion Rakefile
Expand Up @@ -11,7 +11,11 @@ namespace :test do

desc 'Run the tests for the jenkins.rb CLI'
task :cli do
sh 'cd ruby-tools/cli && bundle install && rake spec cucumber'
if RUBY_PLATFORM == "java"
STDERR.puts("FIXME: Skip running cli tests since some of dependency libraries are not working expectedly on JRuby 1.6/1.7.")
else
sh 'cd ruby-tools/cli && bundle install && rake spec cucumber'
end
end
end

Expand Down
12 changes: 6 additions & 6 deletions java-runtime/pom.xml
Expand Up @@ -87,8 +87,8 @@

<repositories>
<repository>
<id>maven.jenkins-ci.org-releases</id>
<url>http://maven.jenkins-ci.org/content/repositories/releases</url>
<id>jenkins-releases</id>
<url>http://repo.jenkins-ci.org/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
Expand All @@ -97,8 +97,8 @@
</snapshots>
</repository>
<repository>
<id>maven.jenkins-ci.org-snapshots</id>
<url>http://maven.jenkins-ci.org/content/repositories/snapshots</url>
<id>jenkins-snapshots</id>
<url>http://repo.jenkins-ci.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
Expand All @@ -110,8 +110,8 @@

<pluginRepositories>
<pluginRepository>
<id>maven.jenkins-ci.org-releases</id>
<url>http://maven.jenkins-ci.org/content/repositories/releases</url>
<id>jenkins-releases</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

Expand Down
23 changes: 23 additions & 0 deletions pom.xml
Expand Up @@ -14,4 +14,27 @@
<modules>
<module>java-runtime</module>
</modules>

<repositories>
<repository>
<id>jenkins-releases</id>
<url>http://repo.jenkins-ci.org/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jenkins-snapshots</id>
<url>http://repo.jenkins-ci.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
4 changes: 2 additions & 2 deletions ruby-runtime/spec/jenkins/model/build_spec.rb
Expand Up @@ -18,11 +18,11 @@
end

it "can halt" do
expect {@build.halt "stopping"}.should raise_error(Jenkins::Model::Build::Halt, "stopping")
expect {@build.halt "stopping"}.to raise_error(Jenkins::Model::Build::Halt, "stopping")
end

it "can abort" do
expect {@build.abort "aborting"}.should raise_error(Java.hudson.AbortException, "aborting")
expect {@build.abort "aborting"}.to raise_error(Java.hudson.AbortException, "aborting")
end

describe "hash-y interface" do
Expand Down
4 changes: 2 additions & 2 deletions ruby-runtime/spec/jenkins/plugin/proxies_spec.rb
Expand Up @@ -44,7 +44,7 @@ def initialize(plugin, object)

describe "and there is not an appropriate proxy class registered for it" do
it "raises an exception on export" do
expect {@proxies.export(@object)}.should raise_error
expect {@proxies.export(@object)}.to raise_error
end
end
end
Expand Down Expand Up @@ -93,7 +93,7 @@ def initialize(native = nil)
end

it "will fail to create a proxy for the superclass" do
expect {@proxies.export @A.new}.should raise_error(Jenkins::Plugin::ExportError)
expect {@proxies.export @A.new}.to raise_error(Jenkins::Plugin::ExportError)
end
end

Expand Down
4 changes: 2 additions & 2 deletions ruby-runtime/spec/jenkins/plugin/specification_spec.rb
Expand Up @@ -3,7 +3,7 @@
describe Jenkins::Plugin::Specification do
Specification = Jenkins::Plugin::Specification
it "is invalid by default" do
expect {subject.validate!}.should raise_error Jenkins::Plugin::SpecificationError
expect {subject.validate!}.to raise_error Jenkins::Plugin::SpecificationError
end

describe "when name, version and desc are set" do
Expand Down Expand Up @@ -32,7 +32,7 @@
Specification.find!(Pathname(__FILE__).dirname.to_s).name.should eql "the-name"
end
it "raises an exception if one cannot be found" do
expect {Specification.find!('..')}.should raise_error Jenkins::Plugin::SpecificationNotFound
expect {Specification.find!('..')}.to raise_error Jenkins::Plugin::SpecificationNotFound
end
end
end
1 change: 1 addition & 0 deletions ruby-tools/jpi/features/create-new-plugin.feature
Expand Up @@ -10,5 +10,6 @@ Scenario: The directory skeleton is generated
"""
[-] cuke-plugin
| Gemfile
| README.md
| cuke.pluginspec
"""
5 changes: 5 additions & 0 deletions ruby-tools/jpi/features/support/env.rb
@@ -1 +1,6 @@
require 'aruba/cucumber'

Before do
# Default timeout (3 sec) is too short to run JRuby on travis-ci.org
@aruba_timeout_seconds = 10
end

0 comments on commit 88c44a5

Please sign in to comment.