Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 121 lines (96 sloc) 3.948 kb
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
1 # Default RubySpec/CI settings for JRuby in 1.9 mode.
be03501 @headius Add a config for 1.9 spec runs.
headius authored
2
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
3 # detect windows platform:
3f1e697 @nicksieger Compute both md5 and sha1 hashes, and also add missing require in 1.9's ...
nicksieger authored
4 require 'rbconfig'
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
5 require 'java'
2c8de73 @vvs Enable more specs in 1.9 on Windows (+5K more), sync mspec files.
vvs authored
6 require 'jruby/util'
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
7
8 IKVM = java.lang.System.get_property('java.vm.name') =~ /IKVM\.NET/
19e9416 @headius RbConfig and 1.9 stdlib cleanup.
headius authored
9 WINDOWS = RbConfig::CONFIG['host_os'] =~ /mswin/
3f1e697 @nicksieger Compute both md5 and sha1 hashes, and also add missing require in 1.9's ...
nicksieger authored
10
ce2e7ce @vvs Better mspec configs for JRuby.
vvs authored
11 SPEC_DIR = File.join(File.dirname(__FILE__), 'ruby') unless defined?(SPEC_DIR)
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
12 TAGS_DIR = File.join(File.dirname(__FILE__), 'tags') unless defined?(TAGS_DIR)
be03501 @headius Add a config for 1.9 spec runs.
headius authored
13
14 class MSpecScript
15 # Language features specs
55008dc @headius Tag or exclude all failures in 1.9 mode for :core and :language specs.
headius authored
16 set :language, [
17 SPEC_DIR + '/language',
18 ]
be03501 @headius Add a config for 1.9 spec runs.
headius authored
19
20 # Core library specs
21 set :core, [
ce2e7ce @vvs Better mspec configs for JRuby.
vvs authored
22 SPEC_DIR + '/core',
be03501 @headius Add a config for 1.9 spec runs.
headius authored
23
6663a53 @enebo Tweak some 1.9 specs
enebo authored
24 '^' + SPEC_DIR + '/core/continuation',
25 '^' + SPEC_DIR + '/core/encoding/converter'
be03501 @headius Add a config for 1.9 spec runs.
headius authored
26 ]
27
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
28 # Filter out ObjectSpace specs if ObjectSpace is disabled
29 unless JRuby.objectspace
30 get(:core) << '^' + SPEC_DIR + '/core/objectspace/_id2ref'
31 get(:core) << '^' + SPEC_DIR + '/core/objectspace/each_object'
32 end
33
34 if IKVM
35 # ftype_spec freezes for some reason under IKVM
36 set(:core, get(:core) + ['^' + SPEC_DIR + '/core/file'])
37 # Process.kill spec hangs
38 set(:core, get(:core) + ['^' + SPEC_DIR + '/core/process'])
39 end
40
41 # An ordered list of the directories containing specs to run
42 # as the CI process.
be03501 @headius Add a config for 1.9 spec runs.
headius authored
43 set :library, [
ce2e7ce @vvs Better mspec configs for JRuby.
vvs authored
44 SPEC_DIR + '/library',
be03501 @headius Add a config for 1.9 spec runs.
headius authored
45
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
46 # excluded for some reason, see JRUBY-4020
47 '^' + SPEC_DIR + '/library/drb',
48 '^' + SPEC_DIR + '/library/etc',
49 '^' + SPEC_DIR + '/library/net',
50 '^' + SPEC_DIR + '/library/openssl',
51 '^' + SPEC_DIR + '/library/ping',
52 '^' + SPEC_DIR + '/library/readline',
53
aa7bab3 @vvs Partial fix for JRUBY-4020.
vvs authored
54 # unstable
55 '^' + SPEC_DIR + '/library/socket',
56 '^' + SPEC_DIR + '/library/syslog',
57
be03501 @headius Add a config for 1.9 spec runs.
headius authored
58 # obsolete libraries
ce2e7ce @vvs Better mspec configs for JRuby.
vvs authored
59 '^' + SPEC_DIR + '/library/enumerator',
60 '^' + SPEC_DIR + '/library/ftools',
61 '^' + SPEC_DIR + '/library/generator',
62 '^' + SPEC_DIR + '/library/parsedate',
63 '^' + SPEC_DIR + '/library/ping',
c1a9fe9 @headius Update to latest RubySpecs.
headius authored
64
65 # masked out because of load-time errors that can't be tagged
66 '^' + SPEC_DIR + '/library/net/http',
67 '^' + SPEC_DIR + '/library/yaml'
be03501 @headius Add a config for 1.9 spec runs.
headius authored
68 ]
69
24caafc @vvs Enable command_line specs, upgrade mspec to 1.5.14, latest RubySpecs
vvs authored
70 # Command Line specs
71 set :command_line, [ SPEC_DIR + '/command_line' ]
72
42a0c34 @headius Enable encoding and fiber specs (1.9)
headius authored
73 # Enable features
fce7a31 @headius Enable continuation specs, since we can pass some of them. Tag remaining...
headius authored
74 MSpec.enable_feature :continuation
42a0c34 @headius Enable encoding and fiber specs (1.9)
headius authored
75 MSpec.enable_feature :fiber
9f1b216 @nicksieger More improvements and re-tag fiber specs since core/library split
nicksieger authored
76 MSpec.enable_feature :fiber_library
42a0c34 @headius Enable encoding and fiber specs (1.9)
headius authored
77 MSpec.enable_feature :encoding
3f6b0a3 @enebo disabled feature + spec bug (fixed on master) made us fails String#bytes...
enebo authored
78 MSpec.enable_feature :encoding_transition
fce7a31 @headius Enable continuation specs, since we can pass some of them. Tag remaining...
headius authored
79 MSpec.enable_feature :readline
42a0c34 @headius Enable encoding and fiber specs (1.9)
headius authored
80
c0944a5 @headius Add JVM-specific tag form and tag some Java 5 failures.
headius authored
81 # prepare additional tags for CI
5da34b9 @headius For want of a paren.
headius authored
82 set(:ci_xtags, ["java#{ENV_JAVA['java.specification.version']}"]) # Java version
c0944a5 @headius Add JVM-specific tag form and tag some Java 5 failures.
headius authored
83
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
84 if WINDOWS
2c8de73 @vvs Enable more specs in 1.9 on Windows (+5K more), sync mspec files.
vvs authored
85 # Some specs on Windows will fail in we launch JRuby via
86 # ruby_exe() in-process (see core/argf/gets_spec.rb)
87 JRuby.runtime.instance_config.run_ruby_in_process = false
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
88 # core
2c8de73 @vvs Enable more specs in 1.9 on Windows (+5K more), sync mspec files.
vvs authored
89 get(:core) << '^' + SPEC_DIR + '/core/file/stat' # many failures
be03501 @headius Add a config for 1.9 spec runs.
headius authored
90
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
91 # exclude specs tagged with 'windows' keyword
c0944a5 @headius Add JVM-specific tag form and tag some Java 5 failures.
headius authored
92 get(:ci_xtags) << 'windows'
da7db5f @headius Mask out File#flock specs on Java 5, since it doesn't behave to spec.
headius authored
93 end
94
67c9bad @vvs Make 'ant spec-short' pass on Linux in 1.9 mode, sync 1.8 and 1.9 config...
vvs authored
95 # FIXME: add 1.9 library back at a later date
96 set :ci_files, get(:language) + get(:core) + get(:command_line) #+ get(:library)
be03501 @headius Add a config for 1.9 spec runs.
headius authored
97
98 # Optional library specs
ce2e7ce @vvs Better mspec configs for JRuby.
vvs authored
99 set :ffi, SPEC_DIR + '/optional/ffi'
be03501 @headius Add a config for 1.9 spec runs.
headius authored
100
101 # A list of _all_ optional library specs
102 set :optional, [get(:ffi)]
103
19e9416 @headius RbConfig and 1.9 stdlib cleanup.
headius authored
104 set :target, File.dirname(__FILE__) + '/../bin/' + RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']
be03501 @headius Add a config for 1.9 spec runs.
headius authored
105
106 set :backtrace_filter, /mspec\//
107
108 set :tags_patterns, [
ce2e7ce @vvs Better mspec configs for JRuby.
vvs authored
109 [%r(^.*/language/), TAGS_DIR + '/1.9/ruby/language/'],
110 [%r(^.*/core/), TAGS_DIR + '/1.9/ruby/core/'],
111 [%r(^.*/command_line/), TAGS_DIR + '/1.9/ruby/command_line/'],
112 [%r(^.*/library/), TAGS_DIR + '/1.9/ruby/library/'],
be03501 @headius Add a config for 1.9 spec runs.
headius authored
113 [/_spec.rb$/, '_tags.txt']
114 ]
f2386db @headius [1.9] Disable defined? compilation and add mspec tagging logic to filter...
headius authored
115 # If running specs with jit threshold = 1 or force (AOT) compile, additional tags
116 if JRuby.runtime.instance_config.compile_mode.to_s == "FORCE" ||
117 JRuby.runtime.instance_config.jit_threshold == 1
118 set(:ci_xtags, (get(:ci_xtags) || []) + ['compiler'])
119 end
be03501 @headius Add a config for 1.9 spec runs.
headius authored
120 end
Something went wrong with that request. Please try again.