[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Status report for Ruby bindings on Windows

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-02-02 08:39:28 CET

Hi,

On 1/31/07, Joe Swatosh <joe.swatosh@gmail.com> wrote:
> Hi,
>
> On 1/31/07, Kouhei Sutou <kou@cozmixng.org> wrote:
> > Hi,
> >

> D:\SVN\src-trunk\subversion\bindings\swig\ruby>ruby test\run-test.rb
> Loaded suite test
> Started
> .....F.F...................FF..............F.F..........................................F.......F......................................F...
> Finished in 424.474 seconds.
>
> 1) Failure:
> test_authentication(SvnClientTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1657]:
> <"source\r\n"> expected but was
> <"source\r\r\n">.
>
> 2) Failure:
> test_cat(SvnClientTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1288]:
> <"source1\r\n"> expected but was
> <"source1\r\r\n">.
>
> 3) Failure:
> test_merge(SvnClientTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:843]:
> <"sample\r\n"> expected but was
> <"sample\r\r\n">.
>
> 4) Failure:
> test_merge_peg(SvnClientTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:890]:
> <"sample\r\n"> expected but was
> <"sample\r\r\n">.
>
> 5) Failure:
> test_simple_provider(SvnClientTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1689]:
> <"source\r\n"> expected but was
> <"source\r\r\n">.
>
> 6) Failure:
> test_switch(SvnClientTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1584]:
> <"trunk source\r\n"> expected but was
> <"trunk source\r\r\n">.
>
> 7) Failure:
> test_delta(SvnFsTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_fs.rb:317]:
> <"A\n\n\n\nE\n"> expected but was
> <"<<<<<<< .mine\nA\nb\nc\nd\nE\n=======\na\n\n\n\ne\n>>>>>>> .r2\n">.
>
> 8) Failure:
> test_diff(SvnInfoTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_info.rb:202]:
> <2> expected but was
> <1>.
>
> 9) Failure:
> test_translated_file(SvnWcTest)
> [D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_wc.rb:417:in
> `test_translated_file'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/wc.rb:94:in `_open'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/wc.rb:73:in `open'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_wc.rb:409:in
> `test_translated_file']:
> <"a\r\n"> expected but was
> <"a\n">.
>
> 139 tests, 872 assertions, 9 failures, 0 errors
>

test_info wasn't hard to get passing, just more line endings:

Index: subversion/bindings/swig/ruby/test/test_info.rb
===================================================================
--- subversion/bindings/swig/ruby/test/test_info.rb (revision 23326)
+++ subversion/bindings/swig/ruby/test/test_info.rb (working copy)
@@ -159,7 +159,7 @@
     file1_prop_key = "AAA"
     file1_prop_value = "BBB"
     FileUtils.touch(file1_path)
- File.open(file2_path, "w") {|f| f.puts "changed"}
+ File.open(file2_path, "wb") {|f| f.puts "changed"}
     FileUtils.touch(file3_path)

     ctx.add(file1_path)
@@ -175,8 +175,8 @@
     file5_path = File.join(@wc_path, file5)
     file4_prop_key = "XXX"
     file4_prop_value = "YYY"
- File.open(file1_path, "w") {|f| f.puts "changed"}
- File.open(file2_path, "w") {|f| f.puts "removed\nadded"}
+ File.open(file1_path, "wb") {|f| f.puts "changed"}
+ File.open(file2_path, "wb") {|f| f.puts "removed\nadded"}
     FileUtils.touch(file4_path)
     ctx.add(file4_path)
     ctx.propdel(file1_prop_key, file1_path)

===================================================================

This makes test_fs pass

Index: subversion/bindings/swig/ruby/test/test_fs.rb
===================================================================
--- subversion/bindings/swig/ruby/test/test_fs.rb (revision 23326)
+++ subversion/bindings/swig/ruby/test/test_fs.rb (working copy)
@@ -302,11 +302,11 @@

     ctx = make_context(log)

- File.open(path, "w") {|f| f.print(src)}
+ File.open(path, "wb") {|f| f.print(src)}
     ctx.add(path)
     rev1 = ctx.ci(@wc_path).revision

- File.open(path, "w") {|f| f.print(modified)}
+ File.open(path, "wb") {|f| f.print(modified)}
     @fs.transaction do |txn|
       checksum = MD5.new(result).hexdigest
       stream = txn.root.apply_text(path_in_repos, checksum)
@@ -324,10 +324,10 @@
     stream.each{|w| data << w.new_data}
     assert_equal(expected, data)

- File.open(path, "w") {|f| f.print(src)}
+ File.open(path, "wb") {|f| f.print(src)}
     rev3 = ctx.ci(@wc_path).revision

- File.open(path, "w") {|f| f.print(modified)}
+ File.open(path, "wb") {|f| f.print(modified)}
     @fs.transaction do |txn|
       base_checksum = MD5.new(src).hexdigest
       checksum = MD5.new(result).hexdigest

===================================================================

But the teardown fails

===================================================================
D:\SVN\src-trunk\subversion\bindings\swig\ruby>ruby -Itest -I.ext
test\test_fs.rb -n test_delta
Loaded suite test/test_fs
Started
E
Finished in 4.709 seconds.

  1) Error:
test_delta(SvnFsTest):
Svn::Error::SvnError:
D:\SVN\src-trunk\subversion\libsvn_subr\io.c:1801 Can't remove
'test\repos\db\revs\1'
Can't set file 'test\repos\db\revs\1' read-write: Access is denied.
    ./svn/util.rb:68:in `svn_repos_delete'
    ./svn/util.rb:68:in `delete'
    ./test/util.rb:103:in `teardown_repository'
    ./test/util.rb:40:in `teardown_basic'
    test/test_fs.rb:19:in `teardown'

1 tests, 3 assertions, 0 failures, 1 errors

===================================================================

Looks like an apr_pool leak (possibly in file_delta_stream?)

--
Joe
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 2 08:39:44 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.