Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 62 lines (47 sloc) 1.492 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(/\.txt$/)
29 at.add_exception(/fixtures/)
76b3935 @zenspider Fixed autotest support (needs latest version of zentest).
zenspider authored
30 at.add_exception(/\/data\//)
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',
36 'spec/parser')
092e008 @zenspider Added support for autotest.
zenspider authored
37
38 at.add_mapping %r%^spec/.*_spec\.rb$% do |filename, _|
39 filename
40 end
41
42 at.add_mapping %r%^kernel/(.*)/(.*).rb$% do |_, m|
43 Dir["spec/#{m[1]}/#{m[2]}/*_spec.rb"]
44 end
45
46 at.add_mapping %r%^kernel/(.*)/(.*).rb$% do |_, m|
47 Dir["spec/#{m[1]}/#{m[2]}/*_spec.rb"]
48 end
49
50 at.add_mapping %r%^compiler/(bytecode|sexp|translation)/*.rb$% do |_, m|
51 Dir["spec/compiler/rubinius/*_spec.rb"] + Dir["spec/language/*_spec.rb"]
52 end
53
54 at.add_mapping %r%^lib/(.*).rb% do |_, m|
55 Dir["spec/library/#{m[1]}*_spec.rb"]
56 end
57
58 at.add_mapping %r%^shotgun/lib/subtend/ruby.c$% do |_, m|
59 Dir["spec/rubinius|spec/rubinius/subtend/*_spec.rb"]
60 end
61 end
Something went wrong with that request. Please try again.