Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

114 lines (91 sloc) 3.676 kb
# Default RubySpec/CI settings for JRuby in 1.9 mode.
# 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
# Language features specs
set :language, [
SPEC_DIR + '/language',
]
# Core library specs
set :core, [
SPEC_DIR + '/core',
'^' + SPEC_DIR + '/core/continuation',
'^' + SPEC_DIR + '/core/encoding/converter'
]
# Filter out ObjectSpace specs if ObjectSpace is disabled
unless JRuby.objectspace
get(:core) << '^' + SPEC_DIR + '/core/objectspace/_id2ref'
get(:core) << '^' + SPEC_DIR + '/core/objectspace/each_object'
end
if IKVM
# ftype_spec freezes for some reason under IKVM
set(:core, get(:core) + ['^' + SPEC_DIR + '/core/file'])
# Process.kill spec hangs
set(:core, get(:core) + ['^' + SPEC_DIR + '/core/process'])
end
# An ordered list of the directories containing specs to run
# as the CI process.
set :library, [
SPEC_DIR + '/library',
# excluded for some reason, see JRUBY-4020
'^' + SPEC_DIR + '/library/drb',
'^' + SPEC_DIR + '/library/etc',
'^' + SPEC_DIR + '/library/net',
'^' + SPEC_DIR + '/library/openssl',
'^' + SPEC_DIR + '/library/ping',
'^' + SPEC_DIR + '/library/readline',
# unstable
'^' + SPEC_DIR + '/library/socket',
'^' + SPEC_DIR + '/library/syslog',
# obsolete libraries
'^' + SPEC_DIR + '/library/enumerator',
'^' + SPEC_DIR + '/library/ftools',
'^' + SPEC_DIR + '/library/generator',
'^' + SPEC_DIR + '/library/parsedate',
'^' + SPEC_DIR + '/library/ping',
]
# Command Line specs
set :command_line, [ SPEC_DIR + '/command_line' ]
# Enable features
MSpec.enable_feature :continuation
MSpec.enable_feature :fiber
MSpec.enable_feature :fiber_library
MSpec.enable_feature :encoding
MSpec.enable_feature :encoding_transition
MSpec.enable_feature :readline
if WINDOWS
# Some specs on Windows will fail in we launch JRuby via
# ruby_exe() in-process (see core/argf/gets_spec.rb)
JRuby.runtime.instance_config.run_ruby_in_process = false
# core
get(:core) << '^' + SPEC_DIR + '/core/file/stat' # many failures
# exclude specs tagged with 'windows' keyword
set :ci_xtags, ['windows']
end
# FIXME: add 1.9 library back at a later date
set :ci_files, get(:language) + get(:core) + get(:command_line) #+ get(:library)
# Optional library specs
set :ffi, SPEC_DIR + '/optional/ffi'
# A list of _all_ optional library specs
set :optional, [get(:ffi)]
set :target, File.dirname(__FILE__) + '/../bin/' + Config::CONFIG['ruby_install_name'] + Config::CONFIG['EXEEXT']
set :backtrace_filter, /mspec\//
set :tags_patterns, [
[%r(^.*/language/), TAGS_DIR + '/1.9/ruby/language/'],
[%r(^.*/core/), TAGS_DIR + '/1.9/ruby/core/'],
[%r(^.*/command_line/), TAGS_DIR + '/1.9/ruby/command_line/'],
[%r(^.*/library/), TAGS_DIR + '/1.9/ruby/library/'],
[/_spec.rb$/, '_tags.txt']
]
# If running specs with jit threshold = 1 or force (AOT) compile, additional tags
if JRuby.runtime.instance_config.compile_mode.to_s == "FORCE" ||
JRuby.runtime.instance_config.jit_threshold == 1
set(:ci_xtags, (get(:ci_xtags) || []) + ['compiler'])
end
end
Jump to Line
Something went wrong with that request. Please try again.