[macruby-changes] [1796] MacRuby/branches/experimental
source_changes at macosforge.org
source_changes at macosforge.org
Sun Jun 7 06:15:50 PDT 2009
Revision: 1796
http://trac.macosforge.org/projects/ruby/changeset/1796
Author: eloy.de.enige at gmail.com
Date: 2009-06-07 06:15:49 -0700 (Sun, 07 Jun 2009)
Log Message:
-----------
Removed all specfic specs that are to be run from the rake tasks and moved everything to the macruby.mspec script. We can now use pseudo dirs: :macruby, :language, :core
Modified Paths:
--------------
MacRuby/branches/experimental/rakelib/builder.rake
MacRuby/branches/experimental/rakelib/spec.rake
MacRuby/branches/experimental/spec/macruby.mspec
Modified: MacRuby/branches/experimental/rakelib/builder.rake
===================================================================
--- MacRuby/branches/experimental/rakelib/builder.rake 2009-06-07 03:49:40 UTC (rev 1795)
+++ MacRuby/branches/experimental/rakelib/builder.rake 2009-06-07 13:15:49 UTC (rev 1796)
@@ -20,7 +20,7 @@
To change any of the default build options, use the rake build task
of choice with any of these following option-value pairs:
- Usage: $ rake [task] [option=value, …]
+ Usage: $ rake [task] [option=value, ...]
#{'Option:'.ljust(30)} Default value:
Modified: MacRuby/branches/experimental/rakelib/spec.rake
===================================================================
--- MacRuby/branches/experimental/rakelib/spec.rake 2009-06-07 03:49:40 UTC (rev 1795)
+++ MacRuby/branches/experimental/rakelib/spec.rake 2009-06-07 13:15:49 UTC (rev 1796)
@@ -1,49 +1,4 @@
namespace :spec do
- CI_DIRS = %w{
- spec/frozen/language
- spec/frozen/core/argf
- spec/frozen/core/array
- spec/frozen/core/basicobject
- spec/frozen/core/bignum
- spec/frozen/core/binding
- spec/frozen/core/builtin_constants
- spec/frozen/core/class
- spec/frozen/core/comparable
- spec/frozen/core/dir
- spec/frozen/core/encoding
- spec/frozen/core/enumerable
- spec/frozen/core/env
- spec/frozen/core/exception
- spec/frozen/core/false
- spec/frozen/core/fiber
- spec/frozen/core/file
- spec/frozen/core/filetest
- spec/frozen/core/fixnum
- spec/frozen/core/float
- spec/frozen/core/gc
- spec/frozen/core/hash
- spec/frozen/core/integer
- spec/frozen/core/io
- spec/frozen/core/kernel
- spec/frozen/core/matchdata
- spec/frozen/core/math
- spec/frozen/core/method
- spec/frozen/core/module
- spec/frozen/core/nil
- spec/frozen/core/numeric
- spec/frozen/core/object
- spec/frozen/core/range
- spec/frozen/core/regexp
- spec/frozen/core/signal
- spec/frozen/core/string
- spec/frozen/core/struct
- spec/frozen/core/symbol
- spec/frozen/core/systemexit
- spec/frozen/core/time
- spec/frozen/core/true
- spec/frozen/core/unboundmethod
- }.join(' ')
-
MACRUBY_MSPEC = "./spec/macruby.mspec"
DEFAULT_OPTIONS = "-I./lib -B #{MACRUBY_MSPEC}"
@@ -53,33 +8,29 @@
desc "Run continuous integration language examples (all known good examples)"
task :ci do
- mspec :ci, "./spec/macruby #{CI_DIRS}"
+ mspec :ci, ":full"
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 #{DEFAULT_OPTIONS} #{CI_DIRS}"
+ sh "/usr/bin/arch -arch i386 ./miniruby ./mspec/bin/mspec-ci #{DEFAULT_OPTIONS} :full"
end
desc "Run all MacRuby-only specs"
task :macruby do
- mspec :ci, "./spec/macruby"
+ mspec :ci, ":macruby"
end
- task :todo do
- p(Dir.glob('spec/frozen/core/*') - CI_DIRS.split(' '))
- end
-
desc "Run language examples that are known to fail"
task :fails do
- mspec :run, "-g fails #{CI_DIRS}"
+ mspec :run, "-g fails :full"
end
namespace :fails do
task :verbose do
desc "Run language examples that are known to fail with spec and verbose output"
task :fails do
- mspec :run, "-V -f s -g fails #{CI_DIRS}"
+ mspec :run, "-V -f s -g fails :full"
end
end
end
@@ -87,7 +38,7 @@
namespace :tag do
desc "Removed fail tags for examples which actually pass. (FIXME)"
task :remove do
- mspec :tag, "-g fails --del fails #{CI_DIRS}"
+ mspec :tag, "-g fails --del fails :full"
end
desc "Tags failing examples in spec/core, specify the class to tag with the env variable `class'"
@@ -126,14 +77,14 @@
# 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}"
+ sh "./mspec/bin/mspec tag --list #{tag} -B ./spec/frozen/ruby.1.9.mspec :full"
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}"
+ sh "./mspec/bin/mspec run -g #{tag} -B ./spec/frozen/ruby.1.9.mspec :full"
end
end
end
Modified: MacRuby/branches/experimental/spec/macruby.mspec
===================================================================
--- MacRuby/branches/experimental/spec/macruby.mspec 2009-06-07 03:49:40 UTC (rev 1795)
+++ MacRuby/branches/experimental/spec/macruby.mspec 2009-06-07 13:15:49 UTC (rev 1796)
@@ -1,13 +1,47 @@
-# TODO: This doesn't work correctly yet.
-# load File.expand_path('../frozen/ruby.1.9.mspec', __FILE__)
-load "spec/frozen/ruby.1.9.mspec"
-
class MSpecScript
+ # TODO: This doesn't work correctly yet.
+ # load File.expand_path('../frozen/ruby.1.9.mspec', __FILE__)
+
+ FROZEN_PREFIX = 'spec/frozen'
+ load File.join(FROZEN_PREFIX, 'ruby.1.9.mspec')
+
+ # Core library specs
+ set :core, [
+ 'core',
+
+ # obsolete in 1.9
+ '^core/continuation',
+
+ # Currently not working on MacRuby
+ '^core/marshal',
+ '^core/objectspace',
+ '^core/precision',
+ '^core/proc',
+ '^core/process',
+ '^core/thread',
+ '^core/threadgroup'
+ ]
+
+ # Prepend the paths with the proper prefix
+ [:language, :core].each do |pseudo_dir|
+ set(pseudo_dir, get(pseudo_dir).map do |path|
+ if path[0,1] == '^'
+ "^#{File.join(FROZEN_PREFIX, path[1..-1])}"
+ else
+ File.join(FROZEN_PREFIX, path)
+ end
+ end)
+ end
+
+ set :macruby, ['spec/macruby']
+
+ set :full, get(:macruby) + get(:language) + get(:core)
+
# The default implementation to run the specs.
# TODO: this needs to be more sophisticated since the
# executable is not consistently named.
set :target, './miniruby'
-
+
set :tags_patterns, [
[%r(language/), 'tags/macruby/language/'],
[%r(core/), 'tags/macruby/core/'],
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090607/19ae0314/attachment.html>
More information about the macruby-changes
mailing list