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

[PATCH] Improve free drive letter detection for windows tests

From: Stefan <luke1410_at_posteo.de>
Date: Sun, 31 Jul 2016 14:17:37 +0200


the current test code causes two test failures on my machine (Windows,
python 64-bit, drives G-J HDDs, drive K dvd drive - tested with SVN
1.9.4 and trunk).
The issue seems to be that the fallback detection code incorrectly
concludes that drive K is a free drive letter, if there's no disc in the
drive. This then results in two test failures for me:

- checkout #14
- update #31

Full details available here [1].

The attached patch resolves the issue by replacing the current code
detecting free drive letters by using the ctypes library instead of the
win32api library.

As far as I understand things, this is backwards compatible with Python
>= 2.5 [2]. Since SVN 1.9/trunk require Python >= 2.7, I don't see any
compatibility concern for this change.

Resolve test failures on Windows when running with Python 64-bit.

* subversion/tests/cmdline/checkout_tests.py
  (checkout_wc_from_drive): replace the win32api-dependent drive letter
                            detection code with the an approach using
the more
                            portable ctypes library and direct call to the
                            kernel32's GetLogicalDrives() function
* subversion/tests/cmdline/update_tests.py
  (update_wc_on_windows_drive): the same

[1] http://www.luke1410.de:8090/browse/MAXSVN-65
[2] http://python.net/crew/theller/ctypes/


Received on 2016-07-31 14:18:02 CEST

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