Changeset: 0dde244aefbb for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0dde244aefbb Modified Files: clients/ruby/Tests/gemtest.rb clients/ruby/Tests/rubytest.rb.in Branch: default Log Message:
rubytest: (hopefully) make require_relative als work on Windows: Mtest.py executes test in TSTTRGDIR, not in TSTSRCDIR; hence, the MonetDB.rb is not located in relative path ../lib/MonetDB. On unixes this used to work, because we symlink tests to TSTTRGDIR and ruby's "require_relative" detects this and uses the relative path from the physical location of the rubytest.rb in TSTSRCDIR. Since we copy the test from TSTSRCDIR to TSTRGDIR on Windows (lacking symlinks ...), we need to use the relative path from TSTTRGDIR to TSTSRCDIR, i.e., RELSRCDIR . diffs (28 lines): diff --git a/clients/ruby/Tests/gemtest.rb b/clients/ruby/Tests/gemtest.rb --- a/clients/ruby/Tests/gemtest.rb +++ b/clients/ruby/Tests/gemtest.rb @@ -1,8 +1,8 @@ # tests rubytest.rb & gemtest.rb are (and shoudl be kept!) identical, # except the following two lines: -#require_relative '../lib/MonetDB' # rubytest.rb - require 'MonetDB' # gemtest.rb +#require_relative '$RELSRCDIR/../lib/MonetDB' # rubytest.rb.in + require 'MonetDB' # gemtest.rb class MapiRubyInterfaceTestCase diff --git a/clients/ruby/Tests/rubytest.rb.in b/clients/ruby/Tests/rubytest.rb.in --- a/clients/ruby/Tests/rubytest.rb.in +++ b/clients/ruby/Tests/rubytest.rb.in @@ -1,8 +1,8 @@ # tests rubytest.rb & gemtest.rb are (and shoudl be kept!) identical, # except the following two lines: - require_relative '../lib/MonetDB' # rubytest.rb -#require 'MonetDB' # gemtest.rb + require_relative '$RELSRCDIR/../lib/MonetDB' # rubytest.rb.in +#require 'MonetDB' # gemtest.rb class MapiRubyInterfaceTestCase _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list