[macruby-changes] [1726] MacRuby/branches/experimental/rakelib/spec.rake
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jun 4 15:59:16 PDT 2009
Revision: 1726
http://trac.macosforge.org/projects/ruby/changeset/1726
Author: eloy.de.enige at gmail.com
Date: 2009-06-04 15:59:16 -0700 (Thu, 04 Jun 2009)
Log Message:
-----------
Cleaned up spec.rake
Modified Paths:
--------------
MacRuby/branches/experimental/rakelib/spec.rake
Modified: MacRuby/branches/experimental/rakelib/spec.rake
===================================================================
--- MacRuby/branches/experimental/rakelib/spec.rake 2009-06-04 22:59:08 UTC (rev 1725)
+++ MacRuby/branches/experimental/rakelib/spec.rake 2009-06-04 22:59:16 UTC (rev 1726)
@@ -1,58 +1,4 @@
namespace :spec do
- KNOWN_GOOD = %w{
- and
- array
- case
- catch
- class
- class_variable
- defined
- else
- execution
- file
- hash
- if
- line
- module
- numbers
- not
- or
- order
- precedence
- redo
- retry
- string
- super
- symbol
- unless
- until
- yield
- while
- }
-
- KNOWN_GOOD_CORE_IO = %w{
- binmode
- closed
- constants
- each_byte
- fileno
- fsync
- flush
- getc
- io
- inspect
- initialize_copy
- putc
- readchar
- sync
- tell
- to_i
- to_io
- write
- }
-
- KNOWN_GOOD_CORE_IO_FILES = FileList["spec/frozen/core/io/{#{KNOWN_GOOD_CORE_IO.join(',')}}_spec.rb"]
-
CI_DIRS = %w{
spec/frozen/language
spec/frozen/core/argf
@@ -89,49 +35,50 @@
}.join(' ')
MACRUBY_MSPEC = "./spec/macruby.mspec"
+ DEFAULT_OPTIONS = "-I./lib -B #{MACRUBY_MSPEC}"
- desc "Run all language known good spec files which should be fully green (does not use tags)"
- task :green do
- files = FileList["spec/frozen/language/{#{KNOWN_GOOD.join(',')}}_spec.rb"]
- sh "./miniruby -v -I./mspec/lib -I./lib ./mspec/bin/mspec-run #{files.join(' ')}"
+ def mspec(type, options)
+ sh "./mspec/bin/mspec #{type} #{DEFAULT_OPTIONS} #{ENV['opts']} #{options}"
end
- desc "Run all partially good language spec files which are not yet fully green (does not use tags)"
- task :partially_green do
- files = Dir["spec/frozen/language/*_spec.rb"] - FileList["spec/frozen/language/{#{KNOWN_GOOD.join(',')}}_spec.rb"]
- sh "./miniruby -v -I./mspec/lib -I./lib ./mspec/bin/mspec-run #{files.join(' ')}"
- end
-
desc "Run continuous integration language examples (all known good examples)"
task :ci do
- sh "./mspec/bin/mspec ci -I./lib -B #{MACRUBY_MSPEC} spec/macruby #{CI_DIRS}"
+ mspec :ci, "./spec/macruby #{CI_DIRS}"
end
desc "Run continuous integration language examples (all known good examples) (32 bit mode)"
task :ci32 do
- sh "/usr/bin/arch -arch i386 ./miniruby ./mspec/bin/mspec-ci -I./lib -B #{MACRUBY_MSPEC} #{CI_DIRS}"
+ sh "/usr/bin/arch -arch i386 ./miniruby ./mspec/bin/mspec-ci #{DEFAULT_OPTIONS} #{CI_DIRS}"
end
- desc "Run IO test with GDB enabled"
- task :gdbio do
- sh "gdb --args ./miniruby -v -I./mspec/lib -I./lib ./mspec/bin/mspec-run #{KNOWN_GOOD_CORE_IO_FILES.join(' ')}"
- end
-
- desc "Run the IO tests that pass"
- task :io do
- sh "./miniruby -v -I./mspec/lib -I./lib ./mspec/bin/mspec-run #{KNOWN_GOOD_CORE_IO_FILES.join(' ')}"
- end
-
desc "Run all MacRuby-only specs"
task :macruby do
- sh "./mspec/bin/mspec ci -B #{MACRUBY_MSPEC} ./spec/macruby"
+ mspec :ci, "./spec/macruby"
end
desc "Run language examples that are known to fail"
task :fails do
- sh "./mspec/bin/mspec run -V -f s -g fails -B #{MACRUBY_MSPEC} #{CI_DIRS}"
+ mspec :run, "-V -f s -g fails #{CI_DIRS}"
end
+ %w{ fails critical }.each do |tag|
+ namespace :list do
+ # We cheat by using the fact that currently the ruby.1.9.mspec script uses the macruby tags,
+ # otherwise macruby fails halfway because apperantly the spec files are loaded when listing tagged specs...
+ desc "List all specs that are tagged as `#{tag}'"
+ task tag do
+ sh "./mspec/bin/mspec tag --list #{tag} -B ./spec/frozen/ruby.1.9.mspec #{CI_DIRS}"
+ end
+ end
+
+ namespace :"1.9" do
+ desc "Run roxor language specs tagged `#{tag}' against Ruby 1.9 (use this to look for possible 1.8/1.9 incompatibility bugs)"
+ task tag do
+ sh "./mspec/bin/mspec run -g #{tag} -B ./spec/frozen/ruby.1.9.mspec #{CI_DIRS}"
+ end
+ end
+ end
+
desc "Tags failing examples in spec/core, specify the class to tag with the env variable `class'"
task :tag_failing do
klass = ENV['class']
@@ -160,22 +107,4 @@
end
end
end
-
- %w{ fails critical }.each do |tag|
- namespace :list do
- # We cheat by using the fact that currently the ruby.1.9.mspec script uses the macruby tags,
- # otherwise macruby fails halfway because apperantly the spec files are loaded when listing tagged specs...
- desc "List all specs that are tagged as `#{tag}'"
- task tag do
- sh "./mspec/bin/mspec tag --list #{tag} -B ./spec/frozen/ruby.1.9.mspec #{CI_DIRS}"
- end
- end
-
- namespace :"1.9" do
- desc "Run roxor language specs tagged `#{tag}' against Ruby 1.9 (use this to look for possible 1.8/1.9 incompatibility bugs)"
- task tag do
- sh "./mspec/bin/mspec run -g #{tag} -B ./spec/frozen/ruby.1.9.mspec #{CI_DIRS}"
- end
- end
- end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090604/8c888b67/attachment.html>
More information about the macruby-changes
mailing list