[macruby-changes] [2062] MacRuby/branches/experimental/rakelib/spec.rake

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 23 19:23:43 PDT 2009


Revision: 2062
          http://trac.macosforge.org/projects/ruby/changeset/2062
Author:   lsansonetti at apple.com
Date:     2009-07-23 19:23:43 -0700 (Thu, 23 Jul 2009)
Log Message:
-----------
added spec:library to run the library specs + make sure we configure DYLD_LIBRARY_PATH before starting mspec since we rely on libmacruby now

Modified Paths:
--------------
    MacRuby/branches/experimental/rakelib/spec.rake

Modified: MacRuby/branches/experimental/rakelib/spec.rake
===================================================================
--- MacRuby/branches/experimental/rakelib/spec.rake	2009-07-24 02:22:44 UTC (rev 2061)
+++ MacRuby/branches/experimental/rakelib/spec.rake	2009-07-24 02:23:43 UTC (rev 2062)
@@ -3,7 +3,15 @@
   DEFAULT_OPTIONS = "-I./lib -B #{MACRUBY_MSPEC}"
   
   def mspec(type, options)
-    sh "./mspec/bin/mspec #{type} #{DEFAULT_OPTIONS} #{ENV['opts']} #{options}"
+    old_path = ENV['DYLD_LIBRARY_PATH']
+    new_path = '.'
+    new_path << ":#{old_path}" if old_path
+    begin
+      ENV['DYLD_LIBRARY_PATH'] = new_path
+      sh "./mspec/bin/mspec #{type} #{DEFAULT_OPTIONS} #{ENV['opts']} #{options}"
+    ensure
+      ENV['DYLD_LIBRARY_PATH']  = old_path
+    end
   end
   
   desc "Run continuous integration language examples (all known good examples)"
@@ -20,6 +28,11 @@
   task :macruby do
     mspec :ci, ":macruby"
   end
+
+  desc "Run all Library-only specs"
+  task :library do
+    mspec :ci, ":library"
+  end
   
   desc "Run language examples that are known to fail"
   task :fails do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090723/6c245bee/attachment.html>


More information about the macruby-changes mailing list