]> Savannah Git Hosting - gnulib.git/commitdiff
exec*e tests: Avoid test failures on Cygwin.
authorBruno Haible <bruno@clisp.org>
Wed, 20 Jan 2021 08:39:55 +0000 (09:39 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 20 Jan 2021 08:39:55 +0000 (09:39 +0100)
* tests/test-execle-main.c (main): On Cygwin, add /bin to the new PATH.
* tests/test-execve-main.c (main): Likewise.
* tests/test-execvpe-main.c (main): Likewise.

ChangeLog
tests/test-execle-main.c
tests/test-execve-main.c
tests/test-execvpe-main.c

index 6a88e605649b90944456f24d32201977b436d532..92db4972ced4303e03cce037d6134034e4b1d49e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-20  Bruno Haible  <bruno@clisp.org>
+
+       exec*e tests: Avoid test failures on Cygwin.
+       * tests/test-execle-main.c (main): On Cygwin, add /bin to the new PATH.
+       * tests/test-execve-main.c (main): Likewise.
+       * tests/test-execvpe-main.c (main): Likewise.
+
 2021-01-20  Bruno Haible  <bruno@clisp.org>
 
        canonicalize-lgpl: Work around a Cygwin bug.
index 1b1f33bdfe1716dcdb090fdff11eb8fb22cb3091..2c085f630784f7a2180b45fdd0188f302813d172 100644 (file)
@@ -30,7 +30,17 @@ int
 main ()
 {
   const char *progname = "./test-exec-child";
-  const char *env[3] = { "PATH=.", "Hommingberg=Gepardenforelle", NULL };
+  const char *env[3] =
+    {
+      #ifdef __CYGWIN__
+      /* The Cygwin DLLs needed by the program are in /bin.  */
+      "PATH=.:/bin",
+      #else
+      "PATH=.",
+      #endif
+      "Hommingberg=Gepardenforelle",
+      NULL
+    };
   execle (progname,
           progname,
           "abc def",
index 88d7a7e1662b85c5213ffae3fe8724bccff8283d..970372da18a3f510924a3b3e2901d284c628c587 100644 (file)
@@ -30,7 +30,17 @@ int
 main ()
 {
   const char *progname = "./test-exec-child";
-  const char *env[3] = { "PATH=.", "Hommingberg=Gepardenforelle", NULL };
+  const char *env[3] =
+    {
+      #ifdef __CYGWIN__
+      /* The Cygwin DLLs needed by the program are in /bin.  */
+      "PATH=.:/bin",
+      #else
+      "PATH=.",
+      #endif
+      "Hommingberg=Gepardenforelle",
+      NULL
+    };
   const char *argv[12] =
     {
       progname,
index 9b4eca28a7f0986bdce59eb5ca44653da9f28bb4..560ae8e690dc226f538d79e7d20a58af255dbf85 100644 (file)
@@ -30,7 +30,17 @@ int
 main ()
 {
   const char *progname = "test-exec-child";
-  const char *env[3] = { "PATH=.", "Hommingberg=Gepardenforelle", NULL };
+  const char *env[3] =
+    {
+      #ifdef __CYGWIN__
+      /* The Cygwin DLLs needed by the program are in /bin.  */
+      "PATH=.:/bin",
+      #else
+      "PATH=.",
+      #endif
+      "Hommingberg=Gepardenforelle",
+      NULL
+    };
   const char *argv[12] =
     {
       progname,