Merge lp:~bialix/bzr/bzr.exe-path-in-test into lp:~bzr/bzr/trunk-old

Proposed by Alexander Belchenko
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~bialix/bzr/bzr.exe-path-in-test
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 17 lines
To merge this branch: bzr merge lp:~bialix/bzr/bzr.exe-path-in-test
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+9364@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexander Belchenko (bialix) wrote :

Running test suite for QBzr I've noticed wrong path to bzr.exe shown, see below:

C:\work\Bazaar\plugins\qbzr>make test
bzr selftest -s bp.qbzr
testing: C:/work/Bazaar/plugins/qbzr/bzr <<<<<<<<<<<<< this is wrong
   C:\Program Files\Bazaar\lib\library.zip\bzrlib (1.17 python2.5.4)

This patch fixes the problem.

Revision history for this message
Robert Collins (lifeless) wrote :

 merge approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/__init__.py'
2--- bzrlib/tests/__init__.py 2009-08-14 13:55:30 +0000
3+++ bzrlib/tests/__init__.py 2009-08-15 00:37:45 +0000
4@@ -226,8 +226,12 @@
5 self._recordTestStartTime()
6
7 def startTests(self):
8+ if getattr(sys, 'frozen', None) is None:
9+ bzr_path = osutils.realpath(sys.argv[0])
10+ else:
11+ bzr_path = sys.executable
12 self.stream.write(
13- 'testing: %s\n' % (osutils.realpath(sys.argv[0]),))
14+ 'testing: %s\n' % (bzr_path,))
15 self.stream.write(
16 ' %s (%s python%s)\n' % (
17 bzrlib.__path__[0],