Commit Graph

126 Commits

Author SHA1 Message Date
Rafael Espindola 234d3bce01 Remove local handling of ASAN_OPTIONS and UBSAN_OPTIONS.
They are now forwarded by TestingConfig.py.

llvm-svn: 221200
2014-11-03 23:09:25 +00:00
Filipe Cabecinhas aa363024a6 New round of fixes for "Always compile debuginfo-tests for the host triple"
clang tests were breaking, at least when compiling clang only, from an
installed llvm. Make the lit.cfg script deal with the case when we don't
have a host_triple available.

llvm-svn: 220148
2014-10-18 23:36:12 +00:00
Filipe Cabecinhas 0f5735965d Append the %itanium_abi_host_triple substitution unconditionally
We will fail if it's not set, even if we don't substitute.

llvm-svn: 220114
2014-10-18 00:05:26 +00:00
Filipe Cabecinhas 3514242a66 Appease the buildbots with the special case for non-set variables
llvm-svn: 219994
2014-10-16 23:54:26 +00:00
Filipe Cabecinhas e02eca7a42 Added %itanium_abi_host_triple to fix debuginfo-tests when clang is a cross-compiler by default
llvm-svn: 219989
2014-10-16 23:41:40 +00:00
Bob Wilson 43ec870a73 Remove support for the IOS_SIMULATOR_DEPLOYMENT_TARGET env var.
It turns out that this was never used. Instead we just use the
IPHONEOS_DEPLOYMENT_TARGET variable for both iOS devices and simulator.
rdar://problem/18596744

llvm-svn: 219467
2014-10-10 03:12:15 +00:00
Justin Bogner fa9df7af07 test: Disable standard system includes in %clang_cc1
This adds -nostdsysteminc to the %clang_cc1 expansion, which should
make it harder to accidentally write tests that depend on headers in
/usr/include. It also updates a few tests that use -isysroot <x> and a
darwin triple to omit the triple and use -isystem <x>/usr/include
instead, making them a little bit more general.

Incidentally, this fixes a test failure I'm seeing on darwin in
Modules/stddef.c, that happens because my system finds a stddef.h in
/usr/include.

llvm-svn: 219030
2014-10-03 22:18:49 +00:00
Scott Douglass df914d55eb pass environment when invoking llvm-config and clang from lit.cfg
Use the same environment when invoking llvm-config from lit.cfg as
will be used when running tests, so that ASAN_OPTIONS, INCLUDE, etc.
are present.

llvm-svn: 218404
2014-09-24 18:37:52 +00:00
Alexey Samsonov 3205b51673 Add ubsan/not_ubsan features to Clang lit tests and use
them to exclude tests with large stack usage from UBSan bootstrap.

llvm-svn: 217064
2014-09-03 19:46:32 +00:00
Alexey Samsonov 4ee2675dfe Introduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified version of LLVM/Clang.
I've fixed most of the simple bugs and currently "check-llvm" test suite
has 26 failures, and "check-clang" suite has 5 failures.

llvm-svn: 216701
2014-08-29 00:50:36 +00:00
Alp Toker a3c494f0db Revert "clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes. [PR20321]"
We've decided to make the core rewriter class and PP rewriters mandatory.
They're only a few hundred lines of code in total and not worth supporting as a
distinct build configuration, especially since doing so disables key compiler
features.

This reverts commit r213150.

Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter."

This reverts commit r213148.

Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/"

This reverts commit r213146.

llvm-svn: 213159
2014-07-16 15:12:48 +00:00
NAKAMURA Takumi 692d6bb544 clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.
llvm-svn: 213148
2014-07-16 13:36:39 +00:00
NAKAMURA Takumi 1fb02cb62e clang/test: Introduce the feature "staticanalyzer" for --enable-clang-static-analyzer.
llvm-svn: 213140
2014-07-16 12:05:45 +00:00
Alexander Potapenko 14f8ac04e3 Add detection of OS X relocatable SDK to compiler-rt as a lit.util function
Clang's lit cfg already detects the currently selected SDK via
"xcrun --show-sdk-path". The same thing should be done for compiler-rt tests,
to make them work on recent OS X versions. Instead of duplicating the detection
code, this patch extracts the detection function into a lit.util method.

Patch by Kuba Brecka (kuba.brecka@gmail.com),
reviewed at http://reviews.llvm.org/D4072

llvm-svn: 210534
2014-06-10 14:22:00 +00:00
Alp Toker ee77934c17 Update lit.cfg to support the clang-interpreter test from r207950
Performs behind-the-scenes RUN line substitution similarly to what's done with
clang-check and clang-format to ensure the executable is found.

llvm-svn: 207951
2014-05-05 06:42:07 +00:00
Chandler Carruth 0702f8eefa [sanitizers] Propagate the sanitizer options through to the lit context.
This makes it *really* easy to debug leaks FYI:

ASAN_OPTIONS=detect_leaks=1 ./bin/llvm-lit -v <path to test>

llvm-svn: 207873
2014-05-02 21:46:39 +00:00
Andrea Di Biagio e653811af2 Add test case for revision 207575 to verify that on Windows, clang doesn't
crash with an assertion failure when 'nul' is passed in input.

Modified clang/test/lit.py to add feature 'system-windows' if
`platform.system()` returns 'Windows'.

llvm-svn: 207576
2014-04-29 20:19:13 +00:00
Paul Robinson 5df175cec8 Recommit r204493 with a fix to look in both clang and llvm directories.
Hopefully addresses r204539.

Make clang/test/lit.cfg pre-scan the RUN line looking for tool names,
and substitute fully qualified path names pointing to the build
directory.  This ensures we're testing the just-built tools.

llvm-svn: 204831
2014-03-26 16:40:43 +00:00
NAKAMURA Takumi 06246f10cd Revert r204493, "Make clang/test/lit.cfg pre-scan the RUN line looking for tool names,"
It was incompatible to standlalone clang build.

llvm-svn: 204539
2014-03-22 04:46:59 +00:00
Paul Robinson bf8d3a00d3 Make clang/test/lit.cfg pre-scan the RUN line looking for tool names,
and substitute fully qualified path names pointing to the build
directory.  This ensures we're testing the just-built tools.

llvm-svn: 204493
2014-03-21 18:13:35 +00:00
Daniel Jasper 5c77e39f2d Don't verify module inclusions in assembler files.
llvm-svn: 203929
2014-03-14 14:53:17 +00:00
Justin Bogner a4fb799d00 test: Fix feature test for "native" in lit.cfg
Checking if the host arch is in the triple isn't quite correct. Change
the feature test to match llvm's, which made the same change in r193459.

llvm-svn: 203540
2014-03-11 04:34:17 +00:00
Adrian Prantl 0e79c0002e Clarify comment.
llvm-svn: 201807
2014-02-20 19:51:46 +00:00
Adrian Prantl 259c617888 add a comment.
llvm-svn: 201801
2014-02-20 17:57:37 +00:00
Adrian Prantl 4e2292eb1e Revert "Remove dead option."
Some tests in debuginfo-tests require the system-darwin feature.

This reverts commit 179670.

llvm-svn: 201800
2014-02-20 17:53:17 +00:00
NAKAMURA Takumi 0884887775 check-clang: Introduce the feature "non-ms-sdk" to suppress Driver/nostdincxx.cpp on msvc.
llvm-svn: 201484
2014-02-16 10:15:57 +00:00
NAKAMURA Takumi d7a60046d3 check-clang: Introduce the feature "dw2" to suppress CodeGenCXX/debug-info-namespace.cpp with *-win32.
FIXME: Could we add itanium triple here?
llvm-svn: 201483
2014-02-16 10:15:46 +00:00
NAKAMURA Takumi 23c767102a Introduce the feature "can-remove-opened-file" to suppress tests. [PR18856]
llvm-svn: 201482
2014-02-16 10:15:34 +00:00
NAKAMURA Takumi 0c81c716eb check-clang: Introduce the feature "utf8-capable-terminal".
clang/test/FixIt/fixit-unicode-with-utf8-output.c has begun complained since LLVM r200885.
Although it is changes for StringRef, it brought LLVM_ON_WIN32 to Support/Locale.cpp.

Before r200885, LLVM_ON_WIN32 was undefined in Locale.cpp!

FIXME: We should consider i18n on win32.
llvm-svn: 200909
2014-02-06 07:15:59 +00:00
Alexey Samsonov b80effdfe1 Fix this test and don't run it in ASan bootstrap
llvm-svn: 200291
2014-01-28 06:59:32 +00:00
Adrian Prantl 8ae19f74c3 Rumors of test_debuginfo's death are slightly exaggerated.
Revert "Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line.""

This reverts commit r200145.

llvm-svn: 200258
2014-01-27 22:50:20 +00:00
NAKAMURA Takumi 36ec246114 Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line."
This feature has been unused anymore.

llvm-svn: 200145
2014-01-26 12:34:54 +00:00
Hans Wennborg 1e76cbaebb lit.cfg: Don't expand %ms_abi_triple to non-X86 triples
This is a follow-up to r199260. On ARM hosts, we were attempting to run
tests with triples such as armv7l-unknown-win32. This expands that fix to
cover all non-x86 targets since we only support MS ABI on x86.

llvm-svn: 199280
2014-01-15 01:08:42 +00:00
Reid Kleckner 9e6e67c2ef Use i686 as the ISA in %microsoft_abi_triple on ARM
Long term we should make -triple arm7l-*-win32 do something sensible,
but for now it's broken and untested.

llvm-svn: 199260
2014-01-14 22:36:02 +00:00
Hans Wennborg c9bd88e681 Remove the -cxx-abi command-line flag.
This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples,
Itanium otherwise. It's no longer possible to do weird combinations.

To be able to run a test with a specific ABI without constraining it to a
specific triple, new substitutions are added to lit: %itanium_abi_triple and
%ms_abi_triple can be used to get the current target triple adjusted to the
desired ABI. For example, if the test suite is running with the i686-pc-win32
target, %itanium_abi_triple will expand to i686-pc-mingw32.

Differential Revision: http://llvm-reviews.chandlerc.com/D2545

llvm-svn: 199250
2014-01-14 19:35:09 +00:00
Alp Toker 120dd1afaf Add tests for clang plugins
Somehow the entire plugin infrastructure went wholly untested until now.

The only plugins available for use in testing are the examples, so plugin tests
will only be run if CLANG_BUILD_EXAMPLES is enabled in the build.

(The examples should really be enabled by default, not just to aid testing but
also to prevent bitrot in some key user-facing code. I'll propose that
shortly.)

Requires supporting changes in LLVM r198746.

llvm-svn: 198747
2014-01-08 11:38:47 +00:00
NAKAMURA Takumi 462ba80fda check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from llvm.
llvm-svn: 197576
2013-12-18 15:08:56 +00:00
NAKAMURA Takumi d0bf77dacd clang/test/lit.cfg: Remove get_llc_props. check-clang itself no longer invokes llc.
Only a few tests depend on llc yet.

llvm-svn: 196797
2013-12-09 19:04:14 +00:00
NAKAMURA Takumi 67eade63fd check-clang: Introduce get_llvm_config_props in clang/test/lit.cfg.
In trunk, we can use features as below:

  aarch64-registered-target
  hexagon-registered-target
  msp430-registered-target
  r600-registered-target
  systemz-registered-target
  xcore-registered-target

Each of them, as below, implies corresponding subtargets:

  arm-registered-target   -- arm, thumb
  mips-registered-target  -- mips, mips64, mips64el, mipsel
  nvptx-registered-target -- nvptx, nvptx64
  sparc-registered-target -- sparc, sparcv9
  x86-registered-target   -- x86, x86-64

They will be renamed:

  cppbackend-registered-target -- was "cpp". Unused in trunk.
  powerpc-registered-target -- was "ppc32", "ppc64" and "ppc64le".

The feature "asserts" is also taken from llvm-config.

llvm-svn: 196347
2013-12-04 03:40:56 +00:00
Alp Toker 9c5ae47c94 Ignore test Inputs globally and remove redundant lit.local.cfg files
By adding a default config.excludes pattern we can avoid individual
suppressions in subdirectories.

This matches LLVM's lit.cfg which also excludes a few other common non-test
filenames for consistency.

llvm-svn: 194814
2013-11-15 13:37:49 +00:00
Joerg Sonnenberger 7a1ae9f1a1 PR 17916: Don't fail if xcrun is not present.
llvm-svn: 194745
2013-11-14 23:18:08 +00:00
Daniel Dunbar 184687b9bc [build] Update runtime library and tests to work with relocatable SDKs on OS X 10.9.
llvm-svn: 194168
2013-11-06 21:44:54 +00:00
Amaury de la Vieuville 7681afdff0 Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests
Patch by Artyom Skrobov!

llvm-svn: 190681
2013-09-13 11:02:31 +00:00
Daniel Dunbar eff4a95e4b [tests] Reapply r188354, ensure subsitution string is ascii.
- Now fixed to ensure substitution value isn't of unicode type on Python 2.6-7.

llvm-svn: 188384
2013-08-14 16:32:20 +00:00
NAKAMURA Takumi c04548f8b3 Revert r188354, "[tests] Ensure subsitution string is ascii."
It caused "shell parser error" on win32 internal shell. ShParser doesn't expect unicode, but str.

llvm-svn: 188373
2013-08-14 14:57:01 +00:00
Daniel Dunbar a4a8efee50 [tests] Ensure subsitution string is ascii.
llvm-svn: 188354
2013-08-14 05:05:39 +00:00
Daniel Dunbar 94ec6cc110 [tests] Update to use lit_config and lit package, as appropriate.
llvm-svn: 188072
2013-08-09 14:43:04 +00:00
Daniel Dunbar 368baeda22 [tests] Make string encoding issues explicit.
llvm-svn: 188042
2013-08-09 00:45:18 +00:00
Hans Wennborg dffe59932b lit.cfg: better check for MSYS
When running the tests under Cygwin using non-Cygwin python,
the platform would be Windows and there would be bash on the path,
so this check for MSYS would not work correctly.

llvm-svn: 187737
2013-08-05 20:14:43 +00:00
Hans Wennborg e4b031ca03 Add a cl.exe compatible driver mode
The mode doesn't actually do anything yet, but this provides a
way to get into it.

llvm-svn: 186720
2013-07-19 20:33:20 +00:00