Skip to content
This repository
Newer
Older
100644 62 lines (47 sloc) 1.483 kb
092e0081 »
2007-12-05 Added support for autotest.
1 # -*- ruby -*-
2
76b39356 »
2008-01-26 Fixed autotest support (needs latest version of zentest).
3 $q = true
4
092e0081 »
2007-12-05 Added support for autotest.
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
76b39356 »
2008-01-26 Fixed autotest support (needs latest version of zentest).
14 "bin/ci"
092e0081 »
2007-12-05 Added support for autotest.
15 end
16
17 def make_test_cmd files_to_test
76b39356 »
2008-01-26 Fixed autotest support (needs latest version of zentest).
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(' ')
20 "#{ruby} #{classes} | #{unit_diff}"
092e0081 »
2007-12-05 Added support for autotest.
21 end
22 end
23
24 Autotest.add_hook :initialize do |at|
76b39356 »
2008-01-26 Fixed autotest support (needs latest version of zentest).
25 at.order = :natural
26
4d5a52d5 »
2008-01-22 Added extra exceptions and removed all-exclude.txt~ generator since t…
27 at.add_exception(/\.rbc$/)
28 at.add_exception(/\.txt$/)
29 at.add_exception(/fixtures/)
76b39356 »
2008-01-26 Fixed autotest support (needs latest version of zentest).
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')
092e0081 »
2007-12-05 Added support for autotest.
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.