Android Patch: Allow absolute paths for ctest's -x.
am: 9c7bcc3e1c
Change-Id: Iad0cc6166ec1ef9e87e6f42c1cd3804ceb1bf963
diff --git a/icu4c/source/tools/ctestfw/ctest.c b/icu4c/source/tools/ctestfw/ctest.c
index ec840e9..54a248d 100644
--- a/icu4c/source/tools/ctestfw/ctest.c
+++ b/icu4c/source/tools/ctestfw/ctest.c
@@ -1113,6 +1113,7 @@
int i;
int doList = FALSE;
int subtreeOptionSeen = FALSE;
+ int skipNext = FALSE;
int errorCount = 0;
@@ -1124,6 +1125,11 @@
for( i=1; i<argc; i++)
{
+ if (skipNext) {
+ skipNext = FALSE;
+ continue;
+ }
+
if ( argv[i][0] == '/' )
{
printf("Selecting subtree '%s'\n", argv[i]);
@@ -1155,6 +1161,10 @@
subtreeOptionSeen=FALSE;
} else if (strcmp( argv[i], "-l") == 0) {
doList = TRUE;
+ } else if (strcmp( argv[i], "-x") == 0) {
+ // Need to skip the next argument since it will be wrongly
+ // identified as a test filter if it is an absolute path.
+ skipNext = TRUE;
}
/* else option already handled by initArgs */
}