[compiler-rt] r244837 - [windows] Always use the lit shell on Windows, even if bash is present

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 16:49:53 PDT 2015


Author: rnk
Date: Wed Aug 12 18:49:52 2015
New Revision: 244837

URL: http://llvm.org/viewvc/llvm-project?rev=244837&view=rev
Log:
[windows] Always use the lit shell on Windows, even if bash is present

Summary:
This is consistent with LLVM and Clang. The lit shell isn't a complete
bash implementation, but its behavior is more easily reproducible.  This
fixes some ubsan test failures.

One ubsan test requires a shell currently, so I added "REQUIRES: shell",
and the other doesn't work on Windows because it prints a stack trace
and uses a linker that doesn't support DWARF. We can fix it eventually
through other means.

Reviewers: samsonov, pcc

Subscribers: yaron.keren, filcab, llvm-commits

Differential Revision: http://reviews.llvm.org/D11960

Modified:
    compiler-rt/trunk/test/asan/lit.cfg
    compiler-rt/trunk/test/lit.common.cfg
    compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc
    compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp

Modified: compiler-rt/trunk/test/asan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=244837&r1=244836&r2=244837&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/lit.cfg (original)
+++ compiler-rt/trunk/test/asan/lit.cfg Wed Aug 12 18:49:52 2015
@@ -35,10 +35,6 @@ if config.host_os == 'Darwin':
   # much slower. Let's override this and run lit tests with 'abort_on_error=0'.
   config.environment['ASAN_OPTIONS'] = 'abort_on_error=0'
 
-# testFormat: The test format to use to interpret tests.
-external_bash = (not sys.platform in ['win32'])
-config.test_format = lit.formats.ShTest(external_bash)
-
 # Setup source root.
 config.test_source_root = os.path.dirname(__file__)
 

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=244837&r1=244836&r2=244837&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Wed Aug 12 18:49:52 2015
@@ -11,10 +11,11 @@ import subprocess
 import lit.formats
 import lit.util
 
-# Setup test format
-execute_external = (platform.system() != 'Windows'
-                    or lit_config.getBashPath() not in [None, ""])
+# Setup test format. Use bash on Unix and the lit shell on Windows.
+execute_external = (not sys.platform in ['win32'])
 config.test_format = lit.formats.ShTest(execute_external)
+if execute_external:
+  config.available_features.add('shell')
 
 # Setup clang binary.
 compiler_path = getattr(config, 'clang', None)

Modified: compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc?rev=244837&r1=244836&r2=244837&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc Wed Aug 12 18:49:52 2015
@@ -1,5 +1,8 @@
 // Test various levels of coverage
 //
+// FIXME: Port the environment variable logic below for the lit shell.
+// REQUIRES: shell
+//
 // RUN: mkdir -p %T/coverage-levels
 // RUN: OPT=coverage=1:verbosity=1:coverage_dir=%T/coverage-levels
 // RUN: %clangxx -fsanitize=shift                        -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func  %s -o %t

Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp?rev=244837&r1=244836&r2=244837&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp Wed Aug 12 18:49:52 2015
@@ -1,3 +1,7 @@
+// FIXME: This test currently fails on Windows because we use the MSVC linker,
+// which throws away DWARF debug info.
+// XFAIL: win32
+//
 // RUN: %clangxx -fsanitize=alignment -g %s -O3 -o %t
 // RUN: %run %t l0 && %run %t s0 && %run %t r0 && %run %t m0 && %run %t f0 && %run %t n0 && %run %t u0
 // RUN: %run %t l1 2>&1 | FileCheck %s --check-prefix=CHECK-LOAD --strict-whitespace




More information about the llvm-commits mailing list