test_external_diffest_external_diff fails when run with py2exe build

Bug #673114 reported by Gary van der Merwe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

If you run bzr selftest with the py2exe created bzr.exe, test_external_diffest_external_diff fails

FAIL: blackbox.test_diff.TestExternalDiff.test_external_diffest_external_diff
    Text attachment: log
------------
218.174 creating config parent directory: 'C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp/xternalDiff.test_external_diff/home/bazaar'
218.174 creating config directory: 'C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp/xternalDiff.test_external_diff/home/bazaar/2.0'
218.214 creating repository in file:///C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp/xternalDiff.test_external_diff/work/.bzr/.
218.234 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x06BC6530> in file:///C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp/xternal
Diff.test_external_diff/work/
218.274 opening working tree 'C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp/xternalDiff.test_external_diff/work'
218.334 preparing to commit
    INFO Committing to: C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp/xternalDiff.test_external_diff/work/
218.334 Selecting files for commit with filter None
    INFO added hello
    INFO Committed revision 1.
218.494 Committed revid <email address hidden> as revno 1.
218.534 preparing to commit
    INFO Committing to: C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp/xternalDiff.test_external_diff/work/
218.544 Selecting files for commit with filter None
    INFO added goodbye
    INFO Committed revision 2.
218.674 Committed revid <email address hidden> as revno 2.
220.056 opening working tree 'C:/docume~1/garyvdm/locals~1/temp/testbzr-k2kcqv.tmp'
------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "testtools\runtest.pyo", line 144, in _run_user
  File "testtools\testcase.pyo", line 487, in _run_test_method
  File "bzrlib\tests\blackbox\test_diff.pyo", line 396, in test_external_diff
AssertionError: not equal:
a = ''
b = 'bzr: ERROR: [Error 2] The system cannot find the file specified\n'

------------

tags: added: selftest-in-py2exe
Revision history for this message
John A Meinel (jameinel) wrote :

This depends on whether or not it can find a "diff" program to run. If you have one it passes, if you don't it fails. Regardless of the standalone installer or not.

What is really weird is that on my machine I get:
$ bzr selftest -s bb.test_diff.TestExternalDiff
bzr selftest: C:/Users/jameinel/dev/bzr/bzr.dev/bzr
   C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib
   bzr-2.3.0dev4 python-2.6.4 Windows-Vista-6.0.6002-SP2

----------------------------------------------------------------------
Ran 2 tests in 4.352s

OK
Missing feature 'diff executable' skipped 1 tests.

Which says that it does check for "diff" being runnable and skips the test. So the real question is why does it think you have a 'diff' that it can run, but it fails to run it.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

I hit this too running selftest under wine:

Traceback (most recent call last):
  File "Z:\home\mbp\lib\python\testtools\runtest.py", line 144, in _run_user
    return fn(*args)
  File "Z:\home\mbp\lib\python\testtools\testcase.py", line 465, in _run_test_method
    testMethod()
  File "Z:\home\mbp\bzr\trunk\bzrlib\tests\blackbox\test_diff.py", line 398, in test_external_diff
    self.assertEqual('', err)
AssertionError: not equal:
a = ''
b = 'bzr: ERROR: [Error 2] File not found\n'

Changed in bzr:
importance: Low → Medium
tags: added: selftest wine
Martin Pool (mbp)
tags: added: test-failure
Revision history for this message
Martin Pool (mbp) wrote :

There is another, possibly similar, failure:

Traceback (most recent call last):
  File "Z:\home\mbp\lib\python\testtools\runtest.py", line 144, in _run_user
    return fn(*args)
  File "Z:\home\mbp\lib\python\testtools\testcase.py", line 465, in _run_test_method
    testMethod()
  File "Z:\home\mbp\bzr\trunk\bzrlib\tests\per_merger.py", line 343, in test_can_access_this_other_and_base_versions
    conflicts = builder.merge(self.merge_type)
  File "Z:\home\mbp\bzr\trunk\bzrlib\tests\test_merge_core.py", line 80, in merge
    merger.do_merge()
  File "Z:\home\mbp\bzr\trunk\bzrlib\merge.py", line 830, in do_merge
    operation.run()
  File "Z:\home\mbp\bzr\trunk\bzrlib\cleanup.py", line 131, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "Z:\home\mbp\bzr\trunk\bzrlib\cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "Z:\home\mbp\bzr\trunk\bzrlib\merge.py", line 835, in _do_merge
    self._compute_transform()
  File "Z:\home\mbp\bzr\trunk\bzrlib\merge.py", line 873, in _compute_transform
    file_status = self._do_merge_contents(file_id)
  File "Z:\home\mbp\bzr\trunk\bzrlib\merge.py", line 1377, in _do_merge_contents
    hook_status, lines = hook.merge_contents(params)
  File "Z:\home\mbp\bzr\trunk\bzrlib\merge.py", line 1465, in merge_contents
    merge_hook_params.trans_id)
  File "Z:\home\mbp\bzr\trunk\bzrlib\merge.py", line 1750, in text_merge
    status = bzrlib.patch.diff3(new_file, this, base, other)
  File "Z:\home\mbp\bzr\trunk\bzrlib\patch.py", line 93, in diff3
    raise NoDiff3
NoDiff3: Diff3 is not installed on this machine.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.