[macruby-changes] [1191] MacRuby/branches/experimental

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 26 17:24:58 PDT 2009


Revision: 1191
          http://trac.macosforge.org/projects/ruby/changeset/1191
Author:   eloy.de.enige at gmail.com
Date:     2009-03-26 17:24:58 -0700 (Thu, 26 Mar 2009)
Log Message:
-----------
Cleaned and refactored spec rake tasks and added a few such as spec:list:fails, spec:list:critical, spec:1.9:fails, spec:1.9:critical. The last few will run the macruby specs that are tagged as fails and critical against Ruby 1.9, this is to check for any 1.8 only specs and or other incompatibilities.

Modified Paths:
--------------
    MacRuby/branches/experimental/rakelib/spec.rake
    MacRuby/branches/experimental/spec/frozen/ruby.1.9.mspec

Modified: MacRuby/branches/experimental/rakelib/spec.rake
===================================================================
--- MacRuby/branches/experimental/rakelib/spec.rake	2009-03-27 00:03:49 UTC (rev 1190)
+++ MacRuby/branches/experimental/rakelib/spec.rake	2009-03-27 00:24:58 UTC (rev 1191)
@@ -45,37 +45,40 @@
     yield
   }
   
-  MSPEC_RUN = "./miniruby -v -I./mspec/lib -I./lib ./mspec/bin/mspec-run"
+  KNOWN_GOOD_AND_PARTIALLY_GOOD_FILES =
+    FileList["spec/frozen/language/{#{(KNOWN_GOOD + KNOWN_PARTIALLY_GOOD).join(',')}}_spec.rb"]
   
-  desc "Run all spec files that should be fully green (known good)"
+  desc "Run all language known good spec files which should be fully green"
   task :green do
-    sh "#{MSPEC_RUN} #{FileList["spec/frozen/language/{#{KNOWN_GOOD.join(',')}}_spec.rb"].join(' ')}"
+    files = 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
-    files = FileList["spec/frozen/language/{#{(KNOWN_GOOD + KNOWN_PARTIALLY_GOOD).join(',')}}_spec.rb"]
-    sh "./mspec/bin/mspec ci -B ./spec/frozen/macruby.mspec #{files.join(' ')}"
+    sh "./mspec/bin/mspec ci -B ./spec/frozen/macruby.mspec #{KNOWN_GOOD_AND_PARTIALLY_GOOD_FILES.join(' ')}"
   end
   
   desc "Run language examples that are known to fail"
   task :fails do
-    files = FileList["spec/frozen/language/*_spec.rb"]
-    files -= files.grep(/\/(#{KNOWN_GOOD.join('|')})_spec\.rb$/)
-    files.each do |spec|
-      sh "./miniruby -v -I./mspec/lib -I./lib ./mspec/bin/mspec-run --format spec #{spec}" rescue nil
-    end
+    sh "./mspec/bin/mspec run -g fails -B ./spec/frozen/macruby.mspec #{KNOWN_GOOD_AND_PARTIALLY_GOOD_FILES.join(' ')}"
   end
   
-  desc "Run language examples"
-  task :language do
-    sh "./mspec/bin/mspec ci --format spec -B ./spec/frozen/macruby.mspec spec/frozen/language"
-  end
-  
-  namespace :"1.9" do
-    desc "Run Ruby 1.9 language examples"
-    task :language do
-      sh "./mspec/bin/mspec ci -B spec/frozen/ruby.1.9.mspec spec/frozen/language"
+  %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 spec/frozen/language"
+      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 #{KNOWN_GOOD_AND_PARTIALLY_GOOD_FILES.join(' ')}"
+      end
+    end
   end
 end

Modified: MacRuby/branches/experimental/spec/frozen/ruby.1.9.mspec
===================================================================
--- MacRuby/branches/experimental/spec/frozen/ruby.1.9.mspec	2009-03-27 00:03:49 UTC (rev 1190)
+++ MacRuby/branches/experimental/spec/frozen/ruby.1.9.mspec	2009-03-27 00:24:58 UTC (rev 1191)
@@ -49,10 +49,19 @@
   # executable is not consistently named.
   set :target, 'ruby1.9'
 
+  # MacRuby TODO: For now we run the macruby tags.
+  #
+  # set :tags_patterns, [
+  #                       [%r(language/), 'tags/1.9/language/'],
+  #                       [%r(core/),     'tags/1.9/core/'],
+  #                       [%r(library/),  'tags/1.9/library/'],
+  #                       [/_spec.rb$/,   '_tags.txt']
+  #                     ]
+
   set :tags_patterns, [
-                        [%r(language/), 'tags/1.9/language/'],
-                        [%r(core/),     'tags/1.9/core/'],
-                        [%r(library/),  'tags/1.9/library/'],
+                        [%r(language/), 'tags/macruby/language/'],
+                        [%r(core/),     'tags/macruby/core/'],
+                        [%r(library/),  'tags/macruby/library/'],
                         [/_spec.rb$/,   '_tags.txt']
                       ]
 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090326/d1ec9d0d/attachment.html>


More information about the macruby-changes mailing list