Skip to content

Commit

Permalink
[build] split some runs to ensure nothing hangs
Browse files Browse the repository at this point in the history
to setup the jruby-complete tests some mvn runs got split up.
for the ScriptingContainer tests they get their own travis run
and got removed from -Pmain and -Pjruby-jars maven profile.

Sponsored by Lookout Inc.
  • Loading branch information
mkristian committed Nov 20, 2014
1 parent e537cdc commit 069a1b8
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ matrix:
# these profile do no need to run for all JDKs
- env: TARGET='test-jruby-jars'
jdk: openjdk7
- env: TARGET='jruby-jars-extended'
jdk: oraclejdk7
- env: TARGET='main-extended'
jdk: oraclejdk8

branches:
only:
Expand Down
34 changes: 22 additions & 12 deletions antlib/extra.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@
<target name='mvn'>
<exec executable='mvn' vmlauncher='false'>
<arg line='-q'/>
<arg line='-Ptest,bootstrap,main'/>
<arg line='-Ptest,bootstrap'/>
<arg line='-DskipTests'/>
</exec>
<echo>
build jruby maven artifact
</echo>
<exec executable='mvn' vmlauncher='false'>
<arg line='-q'/>
<arg line='-Pmain'/>
</exec>
<echo>
build jruby-complete.jar
</echo>
<exec executable='mvn' vmlauncher='false'>
<arg line='-q'/>
<arg line='-Pcomplete'/>
</exec>
</target>
<target name='test-jruby-jars-jruby.1.9' depends='mvn'>
<target name='test-jruby-jars-jruby.1.9'>
<exec executable='java' failonerror='true' vmlauncher='false'>
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
Expand Down Expand Up @@ -118,10 +128,10 @@
<arg value='test/test_instantiating_interfaces.rb'/>
<arg value='test/test_openssl.rb'/>
<arg value='test/test_tempfile_cleanup.rb'/>
<arg value='-v'/>
<!--arg value='-v'/-->
</exec>
</target>
<target name='test-jruby-complete-slow' depends='mvn'>
<target name='test-jruby-complete-slow'>
<exec executable='java' failonerror='true' vmlauncher='false'>
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
Expand All @@ -134,10 +144,10 @@
<arg value='lib/ruby/gems/shared/gems/rake-10.1.0/lib/rake/rake_test_loader.rb'/>
<arg value='test/test_command_line_switches.rb'/>
<arg value='test/test_launching_by_shell_script.rb'/>
<arg value='-v'/>
<!--arg value='-v'/-->
</exec>
</target>
<target name='test-jruby-jars-objectspace' depends='mvn'>
<target name='test-jruby-jars-objectspace'>
<exec executable='java' failonerror='true' vmlauncher='false'>
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
Expand All @@ -150,10 +160,10 @@
<arg value='lib/ruby/gems/shared/gems/rake-10.1.0/lib/rake/rake_test_loader.rb'/>
<arg value='test/test_objectspace.rb'/>
<arg value='test/test_cache_map_leak.rb'/>
<arg value='-v'/>
<!--arg value='-v'/-->
</exec>
</target>
<target name='test-jruby-jars-mri.1.9' depends='mvn'>
<target name='test-jruby-jars-mri.1.9'>
<exec executable='java' failonerror='true' vmlauncher='false'>
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
Expand Down Expand Up @@ -442,10 +452,10 @@
<arg value='test/externals/ruby1.9/ruby/enc/test_utf16.rb'/>
<arg value='test/externals/ruby1.9/ruby/enc/test_utf32.rb'/>
<arg value='test/externals/ruby1.9/ruby/enc/test_windows_1251.rb'/>
<arg value='-v'/>
<!--arg value='-v'/-->
</exec>
</target>
<target name='test-jruby-complete-rubicon.1.9' depends='mvn'>
<target name='test-jruby-complete-rubicon.1.9'>
<exec executable='java' failonerror='true' vmlauncher='false'>
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
Expand Down Expand Up @@ -501,7 +511,7 @@
<arg value='test/rubicon/test_symbol.rb'/>
<arg value='test/rubicon/test_thread_group.rb'/>
<arg value='test/rubicon/test_true_class.rb'/>
<arg value='-v'/>
<!--arg value='-v'/-->
</exec>
</target>
<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='test-jruby-jars-jruby.1.9,test-jruby-complete-slow,test-jruby-jars-objectspace,test-jruby-jars-mri.1.9,test-jruby-complete-rubicon.1.9'/></project>
<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='mvn,test-jruby-jars-jruby.1.9,test-jruby-complete-slow,test-jruby-jars-objectspace,test-jruby-jars-mri.1.9,test-jruby-complete-rubicon.1.9'/></project>
18 changes: 15 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,13 @@

<target name="jruby-jars" description="Create the jruby-jars GEM">
<exec executable="mvn" failonerror="true">
<arg line="-Pjruby-jars,test"/>
<arg line="-Pjruby-jars -Dinvoker.skip=false"/>
</exec>
</target>

<target name="jruby-jars-extended" description="extended tests of the jruby-jars">
<exec executable="mvn" failonerror="true">
<arg line="-Pjruby-jars,test -Dinvoker.test=extended"/>
</exec>
</target>

Expand All @@ -483,13 +489,19 @@

<target name="complete" description="Create the jruby-complete.jar">
<exec executable="mvn" failonerror="true">
<arg line="-Pcomplete,test"/>
<arg line="-Pcomplete -Dinvoker.skip=false"/>
</exec>
</target>

<target name="main" description="Create the jruby maven artifacts">
<exec executable="mvn" failonerror="true">
<arg line="-Pmain,test"/>
<arg line="-Pmain -Dinvoker.skip=false"/>
</exec>
</target>

<target name="main-extended" description="extended tests for the jruby maven artifacts">
<exec executable="mvn" failonerror="true">
<arg line="-Pmain,test -Dinvoker.test=extended"/>
</exec>
</target>
</project>
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<pomExcludes>
<pomExclude>extended/pom.xml</pomExclude>
<pomExclude>${its.j2ee}</pomExclude>
<pomExclude>${its.osgi}</pomExclude>
</pomExcludes>
Expand Down
4 changes: 2 additions & 2 deletions test/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def create_target( name, complete )
jars = "lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-#{@version}.jar"
end
@names << name + ","
@targets << "<target name='#{name}' depends='mvn'>\n<exec executable='java' failonerror='true' vmlauncher='false'>\n<env key='GEM_PATH' value='lib/ruby/gems/shared'/>\n<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>\n<arg value='-cp'/>\n<arg value='core/target/test-classes:test/target/test-classes:#{jars}'/>\n<arg value='org.jruby.Main'/>\n<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>\n<arg value='-r./test/ruby19_env.rb'/>\n<arg value='-rminitest/excludes'/>\n<arg value='#{@rake}'/>\n#{files}<!--arg value='-v'/-->\n</exec>\n</target>\n"
@targets << "<target name='#{name}'>\n<exec executable='java' failonerror='true' vmlauncher='false'>\n<env key='GEM_PATH' value='lib/ruby/gems/shared'/>\n<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>\n<arg value='-cp'/>\n<arg value='core/target/test-classes:test/target/test-classes:#{jars}'/>\n<arg value='org.jruby.Main'/>\n<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>\n<arg value='-r./test/ruby19_env.rb'/>\n<arg value='-rminitest/excludes'/>\n<arg value='#{@rake}'/>\n#{files}<!--arg value='-v'/-->\n</exec>\n</target>\n"
end
end

Expand Down Expand Up @@ -149,6 +149,6 @@ def create_target( name, complete )
builder.create_target( 'mri.1.9', false )
builder.create_target( 'rubicon.1.9', true )

File.write(File.join(basedir, '..', 'antlib', 'extra.xml'), "<project basedir='..'>\n<target name='mvn'>\n<exec executable='mvn' vmlauncher='false'>\n<arg line='-q'/>\n<arg line='-Ptest,bootstrap,main'/>\n<arg line='-DskipTests'/>\n</exec>\n<exec executable='mvn' vmlauncher='false'>\n<arg line='-q'/>\n<arg line='-Pcomplete'/>\n</exec>\n</target>\n#{builder.targets}<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='#{builder.names}'/></project>")
File.write(File.join(basedir, '..', 'antlib', 'extra.xml'), "<project basedir='..'>\n<target name='mvn'>\n<exec executable='mvn' vmlauncher='false'>\n<arg line='-q'/>\n<arg line='-Ptest,bootstrap'/>\n<arg line='-DskipTests'/>\n</exec>\n<echo>\nbuild jruby maven artifact\n</echo>\n<exec executable='mvn' vmlauncher='false'>\n<arg line='-q'/>\n<arg line='-Pmain'/>\n</exec>\n<echo>\nbuild jruby-complete.jar\n</echo>\n<exec executable='mvn' vmlauncher='false'>\n<arg line='-q'/>\n<arg line='-Pcomplete'/>\n</exec>\n</target>\n#{builder.targets}<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='mvn,#{builder.names}'/></project>")

end

0 comments on commit 069a1b8

Please sign in to comment.