[macruby-changes] [1857] MacRuby/branches/experimental
source_changes at macosforge.org
source_changes at macosforge.org
Sun Jun 14 12:01:52 PDT 2009
Revision: 1857
http://trac.macosforge.org/projects/ruby/changeset/1857
Author: eloy.de.enige at gmail.com
Date: 2009-06-14 12:01:51 -0700 (Sun, 14 Jun 2009)
Log Message:
-----------
Added :ffi task to macruby.mspec script. However, they won't run as there are constants missing which are used in the spec_helper.rb file.
Modified Paths:
--------------
MacRuby/branches/experimental/.gitignore
MacRuby/branches/experimental/spec/frozen/optional/ffi/spec_helper.rb
MacRuby/branches/experimental/spec/macruby.mspec
Modified: MacRuby/branches/experimental/.gitignore
===================================================================
--- MacRuby/branches/experimental/.gitignore 2009-06-14 19:01:34 UTC (rev 1856)
+++ MacRuby/branches/experimental/.gitignore 2009-06-14 19:01:51 UTC (rev 1857)
@@ -13,4 +13,5 @@
spec/ruby
spec/frozen/upstream_patches
mspec_upstream
-mspec/upstream_patches
\ No newline at end of file
+mspec/upstream_patches
+spec/frozen/optional/ffi/fixtures/build
\ No newline at end of file
Modified: MacRuby/branches/experimental/spec/frozen/optional/ffi/spec_helper.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/optional/ffi/spec_helper.rb 2009-06-14 19:01:34 UTC (rev 1856)
+++ MacRuby/branches/experimental/spec/frozen/optional/ffi/spec_helper.rb 2009-06-14 19:01:51 UTC (rev 1857)
@@ -10,11 +10,15 @@
module FFISpecs
include FFI
+ # The FFI::Platform constant doesn't exist on MacRuby, but the raised ConstMissing exception
+ # isn't catched and instead of exiting MacRuby continues. Same goes for other missing constants.
LongSize = FFI::Platform::LONG_SIZE / 8
FIXTURE_DIR = File.expand_path("../fixtures", __FILE__)
- LIBRARY = File.join(FIXTURE_DIR, "build/libtest/libtest.#{FFI::Platform::LIBSUFFIX}")
+ # LIBRARY = File.join(FIXTURE_DIR, "build/libtest/libtest.#{FFI::Platform::LIBSUFFIX}")
+ LIBRARY = File.join(FIXTURE_DIR, "build/libtest/libtest.dylib")
+
def self.need_to_compile_fixtures?
!File.exist?(LIBRARY) or Dir.glob(File.join(FIXTURE_DIR, "*.c")).any? { |f| File.mtime(f) > File.mtime(LIBRARY) }
end
Modified: MacRuby/branches/experimental/spec/macruby.mspec
===================================================================
--- MacRuby/branches/experimental/spec/macruby.mspec 2009-06-14 19:01:34 UTC (rev 1856)
+++ MacRuby/branches/experimental/spec/macruby.mspec 2009-06-14 19:01:51 UTC (rev 1857)
@@ -37,6 +37,12 @@
set :full, get(:macruby) + get(:language) + get(:core)
+ # Optional library specs
+ set :ffi, File.join(FROZEN_PREFIX, 'optional/ffi')
+
+ # A list of _all_ optional library specs
+ set :optional, [get(:ffi)]
+
# The default implementation to run the specs.
# TODO: this needs to be more sophisticated since the
# executable is not consistently named.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090614/59ba1c5d/attachment.html>
More information about the macruby-changes
mailing list