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(dir) { `git log --pretty=oneline -1`[0..7] }
68 sh "git add spec/frozen/"
69 sh "git commit -m 'Updated RubySpec source to #{version}.' spec/frozen"
72 desc "Switch to the rubyspec commiter URL"
74 Dir.chdir spec_ruby do
75 sh "git config remote.origin.url git@github.com:brixen/rubyspec.git"
77 puts "\nYou're now accessing rubyspec via the committer URL."
80 desc "Switch to the rubyspec anonymous URL"
82 Dir.chdir spec_ruby do
83 sh "git config remote.origin.url git://github.com/brixen/rubyspec.git"
85 puts "\nYou're now accessing rubyspec via the anonymous URL."
88 desc "Run all rubyspecs under MatzRuby"
90 sh "bin/mspec -t ruby #{spec_ruby}"
93 desc "Run continuous integration examples"
96 sh "bin/mspec ci -t #{spec_target}"
99 desc "Run continuous integration examples including stdlib"
100 task :full => :build do
102 sh "bin/mspec ci -t #{spec_target} -B full.mspec"
105 desc "Run continuous integration examples including stdlib on multiple processors"
106 task :multi => :build do
108 sh "bin/mspec ci -j -t #{spec_target} -B full.mspec"
111 spec_targets = %w(compiler core language library parser rubinius)
112 # Build a spec:<task_name> for each group of Rubinius specs
113 spec_targets.each do |group|
114 desc "Run #{group} examples"
116 sh "bin/mspec spec/#{group}"
120 desc "Run subtend (Rubinius C API) examples"
121 task :subtend => "spec:setup:subtend" do
122 sh "bin/mspec spec/rubinius/subtend"
125 # Specdiffs to make it easier to see what your changes have affected :)
126 desc 'Run specs and produce a diff against current base'
127 task :diff => 'diff:run'
130 desc 'Run specs and produce a diff against current base'
132 system 'bin/mspec -f ci -o spec/reports/specdiff.txt spec'
133 system 'diff -u spec/reports/base.txt spec/reports/specdiff.txt'
134 system 'rm spec/reports/specdiff.txt'
137 desc 'Replace the base spec file with a new one'
139 system 'bin/mspec -f ci -o spec/reports/base.txt spec'
143 desc "Run the rspec specs for mspec"
145 # Use the rspec spec runner (see mspec/README; gem install rspec)
146 sh 'spec ./mspec/spec'