init.sh: accomodate directory with no .exes
authorEric Blake <eblake@redhat.com>
Fri, 17 Sep 2010 21:27:21 +0000 (15:27 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 17 Sep 2010 21:32:09 +0000 (15:32 -0600)
Cygwin was failing test-vc-list-files-{cvs,git}.sh, because of
spurious output on stderr.

../../tests/test-vc-list-files-cvs.sh (exe_shim): skipping directory: /home/eblake/m4-branch/build-aux

All because build-aux was a directory containing just scripts, and
no .exe extensions.  This fixes it.

* tests/init.sh: Accomodate directory containing only scripts.

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

index 9197250..0f8cbe1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-09-17  Eric Blake  <eblake@redhat.com>
 
+       init.sh: accomodate directory with no .exes
+       * tests/init.sh: Accomodate directory containing only scripts.
+
        tests: avoid compiler warning
        * tests/test-stdlib.c (main): Use the variable.
 
index c5d1961..d655fbb 100644 (file)
@@ -240,6 +240,9 @@ find_exe_basenames_()
   feb_result_=
   feb_sp_=
   for feb_file_ in $feb_dir_/*.exe; do
+    if test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_"; then
+      return 0
+    fi
     case $feb_file_ in
       *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
       *) # Remove leading file name components as well as the .exe suffix.