[macruby-changes] [4146] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue May 25 02:36:01 PDT 2010


Revision: 4146
          http://trac.macosforge.org/projects/ruby/changeset/4146
Author:   eloy.de.enige at gmail.com
Date:     2010-05-25 02:35:59 -0700 (Tue, 25 May 2010)
Log Message:
-----------
Added rake tasks to run the specs that we pass on MRI (1.9.2). rake spec:1.9 etc.

Modified Paths:
--------------
    MacRuby/trunk/rakelib/spec.rake
    MacRuby/trunk/spec/macruby.mspec

Modified: MacRuby/trunk/rakelib/spec.rake
===================================================================
--- MacRuby/trunk/rakelib/spec.rake	2010-05-25 08:24:44 UTC (rev 4145)
+++ MacRuby/trunk/rakelib/spec.rake	2010-05-25 09:35:59 UTC (rev 4146)
@@ -2,9 +2,9 @@
   MACRUBY_MSPEC = "./spec/macruby.mspec"
   DEFAULT_OPTIONS = "-B #{MACRUBY_MSPEC}"
   
-  def mspec(type, options)
+  def mspec(type, options, env = nil)
     rm_rf 'rubyspec_temp'
-    sh "./mspec/bin/mspec #{type} #{DEFAULT_OPTIONS} #{ENV['opts']} #{options}"
+    sh "#{"env '#{env}' " if env}./mspec/bin/mspec #{type} #{DEFAULT_OPTIONS} #{ENV['opts']} #{options}"
   end
   
   desc "Run all continuous integration examples (all known good examples)"
@@ -70,6 +70,41 @@
     end
   end
   
+  desc "Run all continuous integration examples (all known good examples) (1.9)"
+  task :"1.9" => "spec:1.9:ci"
+  
+  namespace :"1.9" do
+    desc "Run all continuous integration examples (all known good examples) (1.9)"
+    task :ci do
+      mspec :ci, ":rubyspec", "RUN_WITH_MRI_19=true"
+    end
+    
+    desc "Run all Language-only specs (1.9)"
+    task :language do
+      mspec :ci, ":language", "RUN_WITH_MRI_19=true"
+    end
+    
+    desc "Run all Core-only specs (1.9)"
+    task :core do
+      mspec :ci, ":core", "RUN_WITH_MRI_19=true"
+    end
+    
+    desc "Run all Library-only specs (1.9)"
+    task :library do
+      mspec :ci, ":library", "RUN_WITH_MRI_19=true"
+    end
+    
+    desc "Run language examples that are known to fail (1.9)"
+    task :fails do
+      mspec :run, "-g fails :rubyspec", "RUN_WITH_MRI_19=true"
+    end
+    
+    desc "Run all continuous integration examples and report the stats (all known good examples) (1.9)"
+    task :stats do
+      mspec :ci, ":rubyspec -f macruby", "RUN_WITH_MRI_19=true"
+    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,

Modified: MacRuby/trunk/spec/macruby.mspec
===================================================================
--- MacRuby/trunk/spec/macruby.mspec	2010-05-25 08:24:44 UTC (rev 4145)
+++ MacRuby/trunk/spec/macruby.mspec	2010-05-25 09:35:59 UTC (rev 4146)
@@ -61,19 +61,19 @@
   # A list of _all_ optional library specs
   set :optional, [get(:ffi)]
   
-  # All setup needed to run the specs from the macruby source root.
-  #
-  #
-  # Make the macruby binary look for the framework in the source root
-  source_root = File.expand_path('../../', __FILE__)
-  ENV['DYLD_LIBRARY_PATH'] = source_root
-  # Setup the proper load paths for lib and extensions
-  load_paths = %w{ -I. -I./lib -I./ext }
-  load_paths.concat Dir.glob('./ext/**/*.bundle').map { |filename| "-I#{File.dirname(filename)}" }.uniq
-  load_paths.concat(get(:flags)) if get(:flags)
-  set :flags, load_paths
-  # The default implementation to run the specs.
-  set :target, File.join(source_root, 'macruby')
+  # Don't run with macruby if this env var is set
+  unless ENV['RUN_WITH_MRI_19']
+    # Make the macruby binary look for the framework in the source root
+    source_root = File.expand_path('../../', __FILE__)
+    ENV['DYLD_LIBRARY_PATH'] = source_root
+    # Setup the proper load paths for lib and extensions
+    load_paths = %w{ -I. -I./lib -I./ext }
+    load_paths.concat Dir.glob('./ext/**/*.bundle').map { |filename| "-I#{File.dirname(filename)}" }.uniq
+    load_paths.concat(get(:flags)) if get(:flags)
+    set :flags, load_paths
+    # The default implementation to run the specs.
+    set :target, File.join(source_root, 'macruby')
+  end
   
   set :tags_patterns, [
                         [%r(language/), 'tags/macruby/language/'],
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100525/149b75c6/attachment-0001.html>


More information about the macruby-changes mailing list