Skip to content

Commit

Permalink
add tasks and mspec definitions to run cext specs on the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Jul 17, 2010
1 parent c1d9a72 commit d448f9e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@
<target name="spec:ci_all" depends="install-gems"><rake task="spec:ci_all"/></target>
<target name="spec:ci_latest" depends="install-gems"><rake task="spec:ci_latest"/></target>
<target name="spec:ci_latest_19" depends="install-gems"><rake task="spec:ci_latest_19"/></target>
<target name="spec:ci_cext" depends="install-gems"><rake task="spec:ci_cext"/></target>

<!-- Old compatibility targets which call to newer Rake-based ones -->
<target name="spec" depends="spec:ci_18"/>
Expand All @@ -1110,6 +1111,7 @@
<!-- latest, unstable specs -->
<target name="spec-latest-all" depends="spec:ci_all"/>
<target name="spec-latest" depends="spec:ci_latest"/>
<target name="spec-cext" depends="spec:ci_cext"/>

<target name="update-excludes">
<java classname="org.jruby.Main" fork="true" maxmemory="${jruby.launch.memory}" failonerror="false" dir="${spec.dir}">
Expand Down
1 change: 1 addition & 0 deletions default.build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dest.lib.dir=${lib.dir}
spec.dir=${base.dir}/spec
ruby18.mspec.file=${spec.dir}/jruby.1.8.mspec
ruby19.mspec.file=${spec.dir}/jruby.1.9.mspec
cext.mspec.file=${spec.dir}/jruby.cext.mspec
rubyspec.git.repo=git://github.com/rubyspec/rubyspec.git
rubyspec.dir=${spec.dir}/ruby
rubyspec.tar.file=${build.dir}/rubyspec.tgz
Expand Down
6 changes: 6 additions & 0 deletions rakelib/spec.rake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ namespace :spec do
desc "Run rubyspecs expected to pass (against latest rubyspec version)"
task :ci_latest_19 => ['spec:fast_forward_to_rubyspec_head', 'spec:tagged_19']

desc "Run optional C API rubyspecs"
task :ci_cext => ['spec:fast_forward_to_rubyspec_head'] do
mspec :spec_config => CEXT_MSPEC_FILE
fail "One or more Ruby spec runs have failed" if spec_run_error
end

# Note: For this point below it is your reponsibility to make sure specs
# are checked out.

Expand Down
34 changes: 34 additions & 0 deletions spec/jruby.cext.mspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Default RubySpec/CI settings for JRuby.

# detect windows platform:
require 'rbconfig'
require 'java'
require 'jruby/util'

IKVM = java.lang.System.get_property('java.vm.name') =~ /IKVM\.NET/
WINDOWS = Config::CONFIG['host_os'] =~ /mswin/

SPEC_DIR = File.join(File.dirname(__FILE__), 'ruby') unless defined?(SPEC_DIR)
TAGS_DIR = File.join(File.dirname(__FILE__), 'tags') unless defined?(TAGS_DIR)

class MSpecScript
# An ordered list of the directories containing specs to run
# as the CI process.
set :ci_files, [
SPEC_DIR + '/optional/capi',
]

# The default implementation to run the specs.
set :target, File.dirname(__FILE__) + '/../bin/' + Config::CONFIG['ruby_install_name'] + Config::CONFIG['EXEEXT']

set :backtrace_filter, /mspec\//

# Disable features (not currently supported)
MSpec.disable_feature :continuation
MSpec.disable_feature :fork

# Enable features
MSpec.enable_feature :readline
# These are encoding-aware methods backported to 1.8.7+ (eg String#bytes)
MSpec.enable_feature :encoding_transition
end

0 comments on commit d448f9e

Please sign in to comment.