Author: jcorvel
Date: Wed Jun 13 19:09:41 2012
New Revision: 1349993
URL: http://svn.apache.org/viewvc?rev=1349993&view=rev
Log:
With help of rhuijben, make dirent_uri-test.exe#32 work on Windows systems
without a D: drive.
* subversion/tests/libsvn_subr/dirent_uri-test.c
(test_dirent_condense_targets): If a path that is going to be "condensed"
is on a D: drive, first test if a D: drive actually exists, and skip
it if there is no such drive (otherwise, our call to apr_filepath_merge
will error out with APR_EBADPATH making the test fail).
Modified:
subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
Modified: subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1349993&r1=1349992&r2=1349993&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c Wed Jun 13
19:09:41 2012
@@ -2019,15 +2019,34 @@ test_dirent_condense_targets(apr_pool_t
const char* common;
apr_array_header_t *hdr = apr_array_make(pool, 8, sizeof(const char*));
apr_array_header_t *condensed;
+ svn_boolean_t skip = FALSE;
for (j = 0; j < COUNT_OF(tests[i].paths); j++)
{
if (tests[i].paths[j] != NULL)
- APR_ARRAY_PUSH(hdr, const char*) = tests[i].paths[j];
+ {
+ APR_ARRAY_PUSH(hdr, const char*) = tests[i].paths[j];
+#ifdef SVN_USE_DOS_PATHS
+ /* For tests that are referencing a D: drive, specifically test
+ if such a drive exists on the system. If not, skip the test
+ (svn_dirent_condense_targets will fail, because
+ apr_filepath_merge will produce an APR_EBADPATH error). */
+ if (strncmp(tests[i].paths[j], "D:", 2) == 0
+ && GetDriveType("D:\\") == DRIVE_NO_ROOT_DIR)
+ {
+ /* There is no D: drive, skip this. */
+ skip = TRUE;
+ break;
+ }
+#endif
+ }
else
break;
}
+ if (skip)
+ continue;
+
SVN_ERR(svn_dirent_condense_targets(&common, &condensed, hdr,
FALSE, pool, pool));