Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 83 lines (63 sloc) 2.085 kB
092e008 @zenspider Added support for autotest.
zenspider authored
1 # -*- ruby -*-
2
76b3935 @zenspider Fixed autotest support (needs latest version of zentest).
zenspider authored
3 $q = true
4
092e008 @zenspider Added support for autotest.
zenspider authored
5 Autotest.add_hook :run_command do |at|
6 system "rake"
7 end
8
9 class Autotest
10 alias :old_ruby :ruby
11 alias :old_make_test_cmd :make_test_cmd
12
13 def ruby
76b3935 @zenspider Fixed autotest support (needs latest version of zentest).
zenspider authored
14 "bin/ci"
092e008 @zenspider Added support for autotest.
zenspider authored
15 end
16
17 def make_test_cmd files_to_test
76b3935 @zenspider Fixed autotest support (needs latest version of zentest).
zenspider authored
18 # until bin/ci and bin/mspec allow for regexps, run the whole file again
19 classes = reorder(files_to_test).map { |k,v| k }.join(' ')
dfb772f @zenspider Activate pp only if $PRETTY set.
zenspider authored
20 "PRETTY=1 #{ruby} #{classes} | #{unit_diff}"
092e008 @zenspider Added support for autotest.
zenspider authored
21 end
22 end
23
24 Autotest.add_hook :initialize do |at|
76b3935 @zenspider Fixed autotest support (needs latest version of zentest).
zenspider authored
25 at.order = :natural
26
4d5a52d @zenspider Added extra exceptions and removed all-exclude.txt~ generator since t…
zenspider authored
27 at.add_exception(/\.rbc$/)
28 at.add_exception(/fixtures/)
45f2d6d @zenspider Added more brains to .autotest. Removed bad files that it pointed out
zenspider authored
29 at.add_exception(/README/)
30 at.add_exception(/spec.data.critical.txt/)
76b3935 @zenspider Fixed autotest support (needs latest version of zentest).
zenspider authored
31
32 at.test_directories.clear
33 at.test_directories.push('spec/ruby/1.8/core',
34 'spec/ruby/1.8/language',
35 'spec/compiler',
45f2d6d @zenspider Added more brains to .autotest. Removed bad files that it pointed out
zenspider authored
36 'spec/data',
76b3935 @zenspider Fixed autotest support (needs latest version of zentest).
zenspider authored
37 'spec/parser')
092e008 @zenspider Added support for autotest.
zenspider authored
38
45f2d6d @zenspider Added more brains to .autotest. Removed bad files that it pointed out
zenspider authored
39 at.add_mapping %r%^spec/data/(.*)_excludes.txt$% do |_, m|
40 Dir["spec/#{m[1]}_spec.rb"]
41 end
42
43 at.add_mapping %r%^spec/(.*)/shared/% do |_, m|
44 at.files_matching(%r%^spec/#{m[1]}/.*_spec.rb$%)
45 end
46
47 at.add_mapping %r%^spec/spec_helper.rb% do
48 at.files_matching(%r%^spec/.*_spec.rb$%)
49 end
50
51 at.add_mapping %r%^spec/compiler/spec_helper.rb% do
52 at.files_matching(%r%^spec/compiler/.*_spec.rb$%)
53 end
54
55 at.add_mapping %r%^spec/parser/sexp_expectations.rb% do
56 at.files_matching(%r%^spec/parser/.*_spec.rb$%)
57 end
58
092e008 @zenspider Added support for autotest.
zenspider authored
59 at.add_mapping %r%^spec/.*_spec\.rb$% do |filename, _|
60 filename
61 end
62
63 at.add_mapping %r%^kernel/(.*)/(.*).rb$% do |_, m|
64 Dir["spec/#{m[1]}/#{m[2]}/*_spec.rb"]
65 end
66
67 at.add_mapping %r%^kernel/(.*)/(.*).rb$% do |_, m|
68 Dir["spec/#{m[1]}/#{m[2]}/*_spec.rb"]
69 end
70
71 at.add_mapping %r%^compiler/(bytecode|sexp|translation)/*.rb$% do |_, m|
72 Dir["spec/compiler/rubinius/*_spec.rb"] + Dir["spec/language/*_spec.rb"]
73 end
74
75 at.add_mapping %r%^lib/(.*).rb% do |_, m|
76 Dir["spec/library/#{m[1]}*_spec.rb"]
77 end
78
79 at.add_mapping %r%^shotgun/lib/subtend/ruby.c$% do |_, m|
80 Dir["spec/rubinius|spec/rubinius/subtend/*_spec.rb"]
81 end
82 end
Something went wrong with that request. Please try again.