tests: avoid failing coreutils tests on cygwin
authorEric Blake <eblake@redhat.com>
Fri, 31 Dec 2010 16:44:58 +0000 (09:44 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 31 Dec 2010 16:44:58 +0000 (09:44 -0700)
* tests/init.sh (find_exe_basenames_): Exempt [.exe.
(create_exe_shims_): Return 0 when skipping.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
tests/init.sh

index 885aa84..5eff45b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-31  Eric Blake  <eblake@redhat.com>
+
+       tests: avoid failing coreutils tests on cygwin
+       * tests/init.sh (find_exe_basenames_): Exempt [.exe.
+       (create_exe_shims_): Return 0 when skipping.
+
 2010-12-31  Bruno Haible  <bruno@clisp.org>
 
        sys_select: Avoid warning about missing memset declaration on HP-UX 11.
index 22ba236..e537b6c 100644 (file)
@@ -245,6 +245,9 @@ find_exe_basenames_()
     # below, just skip it.
     test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \
       && continue
+    # Exempt [.exe, since we can't create a function by that name, yet
+    # we can't invoke [ by PATH search anyways due to shell builtins.
+    test "x$feb_file_" = "x$feb_dir_/[.exe" && continue
     case $feb_file_ in
       *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
       *) # Remove leading file name components as well as the .exe suffix.
@@ -272,7 +275,7 @@ create_exe_shims_()
   esac
 
   base_names_=`find_exe_basenames_ $1` \
-    || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 1; }
+    || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; }
 
   if test -n "$base_names_"; then
     for base_ in $base_names_; do