r215298 - Make this test unsupported when there is no real 'env' from a real shell.

Yaron Keren yaron.keren at gmail.com
Sat Aug 9 14:24:04 PDT 2014


Author: yrnkrn
Date: Sat Aug  9 16:24:04 2014
New Revision: 215298

URL: http://llvm.org/viewvc/llvm-project?rev=215298&view=rev
Log:
Make this test unsupported when there is no real 'env' from a real shell.
While the test was already requiring shell-preserves-root (such as the
internal shell), it wasn't aware that the MSYS 1.0 env command knows how
to expand root by itself!

>From cmd.exe try:

  env SDKROOT=/ cmd //c echo %SDKROOT%

And get:

  C:/MINGW/MSYS/1.0
  
To be certain we have a good 'env' program the test now requires a shell.


Modified:
    cfe/trunk/test/Driver/darwin-sdkroot.c

Modified: cfe/trunk/test/Driver/darwin-sdkroot.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-sdkroot.c?rev=215298&r1=215297&r2=215298&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-sdkroot.c (original)
+++ cfe/trunk/test/Driver/darwin-sdkroot.c Sat Aug  9 16:24:04 2014
@@ -33,3 +33,9 @@
 //
 // It doesn't make sense on msys bash.
 // REQUIRES: shell-preserves-root
+// Even running under cmd.exe and not the msys shell, the msys 1.0 env
+// command will *not* preserve root, expanding / into C:/MINGW/MSYS/1.0.
+// To see, from the command prompt of cmd.exe run:
+//   env SDKROOT=/ cmd //c echo %SDKROOT%
+// To be sure we have real env program from a real shell and not the MSYS one:
+// REQUIRES: shell





More information about the cfe-commits mailing list