4 "#{RUBINIUS_BASE}/spec/ruby"
7 Rsync_options = "-avP --delete --exclude '*svn*' --exclude '*swp' --exclude '*rbc' --exclude '*.rej' --exclude '*.orig'"
10 sh "rsync #{Rsync_options} #{left} #{right}"
13 desc "Run all 'known good' specs (task alias for spec:ci)"
14 task :spec => 'spec:ci'
18 # Setup for 'Subtend' specs. No need to call this yourself.
20 Dir["spec/subtend/**/Rakefile"].each do |rakefile|
21 sh "rake -f #{rakefile}"
26 desc "Initialize #{spec_ruby} with a rubyspec clone"
28 unless is_git_dir spec_ruby
29 sh "git clone git://github.com/brixen/rubyspec.git #{spec_ruby}"
33 desc "Update rubyspec"
34 task :update => :init do
35 puts "\nUpdating rubyspec repository..."
36 Dir.chdir spec_ruby do
41 desc "Commit changes to rubyspec sources"
43 puts "\nCommitting changes to rubyspec sources..."
44 Dir.chdir spec_ruby do
49 desc "Push changes to the rubyspec repository"
50 task :push => :update do
51 puts "\nPushing changes to the rubyspec repository..."
52 Dir.chdir spec_ruby do
57 desc "Synchronize spec/frozen with a current checkout"
59 dir = ENV['DIR'] || "spec/ruby"
61 unless is_git_dir(dir)
62 raise "#{dir} isn't a rubyspec checkout. Use spec:init to get it."
65 rsync dir + "/*", "spec/frozen"
67 version = Dir.chdir(ENV['DIR']) { `git log --pretty=oneline -1`[0..7] }
68 sh "git commit -m 'Updated RubySpec source to #{version}.' spec/frozen"
71 desc "Switch to the rubyspec commiter URL"
73 Dir.chdir spec_ruby do
74 sh "git config remote.origin.url git@github.com:brixen/rubyspec.git"
76 puts "\nYou're now accessing rubyspec via the committer URL."
79 desc "Switch to the rubyspec anonymous URL"
81 Dir.chdir spec_ruby do
82 sh "git config remote.origin.url git://github.com/brixen/rubyspec.git"
84 puts "\nYou're now accessing rubyspec via the anonymous URL."
87 desc "Run all rubyspecs under MatzRuby"
89 sh "bin/mspec -t ruby #{spec_ruby}"
92 desc "Run continuous integration examples"
95 sh "bin/mspec ci -t #{spec_target}"
98 desc "Run continuous integration examples including stdlib"
99 task :full => :build do
101 sh "bin/mspec ci -t #{spec_target} -B full.mspec"
104 desc "Run continuous integration examples including stdlib on multiple processors"
105 task :multi => :build do
107 sh "bin/mspec ci -j -t #{spec_target} -B full.mspec"
110 spec_targets = %w(compiler core language library parser rubinius)
111 # Build a spec:<task_name> for each group of Rubinius specs
112 spec_targets.each do |group|
113 desc "Run #{group} examples"
115 sh "bin/mspec spec/#{group}"
119 desc "Run subtend (Rubinius C API) examples"
120 task :subtend => "spec:setup:subtend" do
121 sh "bin/mspec spec/rubinius/subtend"
124 # Specdiffs to make it easier to see what your changes have affected :)
125 desc 'Run specs and produce a diff against current base'
126 task :diff => 'diff:run'
129 desc 'Run specs and produce a diff against current base'
131 system 'bin/mspec -f ci -o spec/reports/specdiff.txt spec'
132 system 'diff -u spec/reports/base.txt spec/reports/specdiff.txt'
133 system 'rm spec/reports/specdiff.txt'
136 desc 'Replace the base spec file with a new one'
138 system 'bin/mspec -f ci -o spec/reports/base.txt spec'
142 desc "Run the rspec specs for mspec"
144 # Use the rspec spec runner (see mspec/README; gem install rspec)
145 sh 'spec ./mspec/spec'