[MERGE] win32-related selftest fixes
Alexander Belchenko
bialix at ukr.net
Sat Feb 3 07:49:01 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel пишет:
> John Arbash Meinel wrote:
>> John Arbash Meinel has voted -0.
>> Status is now: Approved
>> Comment:
>> The tests should only be skipped on old branch formats.
>
>> If they are failing on new branch formats, we have a bug that needs to
>> be fixed.
>
>> The whole *point* of this test was to make sure that we support funky
>> file ids on windows with all formats newer that Weaves.
>
>
> Just to follow up on this a bit. There are probably some
> inter-repository combinations that this test should be skipped for. (If
> the source format is Weave or earlier). But we need to be a little
> careful that we don't skip just because we are failing. As it may be a
> sign that we are really failing.
>
> So +1 to skipping if you provide more safety checks about when things
> are going to be skipped.
>
> Maybe we need a field on repository formats with
> "supports_funky_file_ids" which defaults to True, but we could
> explicitly set to False for Weave formats.
>
> I personally would probably also be okay with an explicit
> isintance(source_repo, (RepositoryFormat5, RepositoryFormat6,
> WeaveMetaDirRepository)):
>
I add this explicit check:
def check_repo_format_for_funky_id_on_win32(repo):
if sys.platform == 'win32':
if isinstance(repo, (repository.AllInOneRepository,
repository.WeaveMetaDirRepository)):
raise TestSkipped("funky chars does not permitted"
" on this platform in repository"
" %s" % repo.__class__.__name__)
Does this good enough?
After such check I have:
C:\work\Bazaar\sandbox\selftest.fixes>python bzr --no-plugins selftest -v test_fetch_funky_file_id
bzr: C:/work/Bazaar/sandbox/selftest.fixes/bzr
bzrlib: C:\work\Bazaar\sandbox\selftest.fixes\bzrlib
running 5 tests...
...terrepository.TestInterRepository.test_fetch_funky_file_id(InterSameDataRepository) SKIP
328ms
Format Bazaar-NG branch, format 0.0.4 is not initializable.
...s.test_interrepository.TestInterRepository.test_fetch_funky_file_id(InterWeaveRepo) SKIP
547ms
funky chars does not permitted on this platform in repository WeaveMetaDirRepository
...ns.test_interrepository.TestInterRepository.test_fetch_funky_file_id(InterKnitRepo) OK
2625ms
....test_interrepository.TestInterRepository.test_fetch_funky_file_id(InterModel1and2) SKIP
157ms
funky chars does not permitted on this platform in repository AllInOneRepository
...s.test_interrepository.TestInterRepository.test_fetch_funky_file_id(InterKnit1and2) OK
1875ms
- ----------------------------------------------------------------------
Ran 5 tests in 5.579s
OK
tests passed
C:\work\Bazaar\sandbox\selftest.fixes>python bzr --no-plugins selftest -v
test_fetch_no_inventory_revision
bzr: C:/work/Bazaar/sandbox/selftest.fixes/bzr
bzrlib: C:\work\Bazaar\sandbox\selftest.fixes\bzrlib
bzr: C:/work/Bazaar/sandbox/selftest.fixes/bzr
bzrlib: C:\work\Bazaar\sandbox\selftest.fixes\bzrlib
running 5 tests...
...itory.TestInterRepository.test_fetch_no_inventory_revision(InterSameDataRepository) SKIP
437ms
Format Bazaar-NG branch, format 0.0.4 is not initializable.
...nterrepository.TestInterRepository.test_fetch_no_inventory_revision(InterWeaveRepo) SKIP
953ms
funky chars does not permitted on this platform in repository WeaveMetaDirRepository
...interrepository.TestInterRepository.test_fetch_no_inventory_revision(InterKnitRepo) OK
2203ms
...terrepository.TestInterRepository.test_fetch_no_inventory_revision(InterModel1and2) SKIP
155ms
funky chars does not permitted on this platform in repository AllInOneRepository
...nterrepository.TestInterRepository.test_fetch_no_inventory_revision(InterKnit1and2) OK
1782ms
- ----------------------------------------------------------------------
Ran 5 tests in 5.547s
OK
New bundle is attached.
- --
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFxD5tzYr338mxwCURAtnAAJ9bWFge1LE+OCE7G+EBFiH/33KQbwCdFhXj
5Fcs59wUkuhLt2yOPG4Md5s=
=KAmP
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: selftest.fixes.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070203/e2b4ad17/attachment-0001.diff
More information about the bazaar
mailing list