Commit Graph

84 Commits

Author SHA1 Message Date
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
Hans Wennborg 70850d83dc Turn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,
and add a new option --driver-mode= to control it explicitly.

The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there
are currently really three modes that Clang can run in: gcc, g++
or cpp, so it makes sense to represent them as an enum.

Having a command line flag to control it helps testing.

llvm-svn: 186605
2013-07-18 20:29:38 +00:00
David Dean 9b9c78a929 Add the ability to use guarded malloc when running clang's lit tests.
llvm-svn: 186135
2013-07-11 23:37:50 +00:00
NAKAMURA Takumi 77fcfe70be clang/test/lit.cfg: Improve is_filesystem_case_insensitive() to work properly on cygwin.
Cygwin does not accept the form /CYGDRIVE/X/PATH/TO/FILE against /cygdrive/X/PATH/TO/FILE.
"cygdrive" must be lower-cased.

llvm-svn: 185323
2013-07-01 09:51:55 +00:00
NAKAMURA Takumi 8e85e6a919 clang/test/lit.cfg: Tweak getClangBuiltinIncludeDir() not to expose dosish path separator on MSYS bash.exe, since r184774.
$ bin/clang.exe -print-file-name=include
    e:/path/to/build/bin\..\lib\clang\3.4\include

llvm-svn: 184930
2013-06-26 10:45:20 +00:00
Michael Gottesman 6ef6e142c7 [clang-lit] Added the run_long_tests param option/long_tests feature to toggle execution of long running FileCheck tests.
This will allow for longer running FileCheck based tests to be committed to
clang for use on buildbots, preventing the normal make-check cycle from
increasing in time significantly.

This is a necessary change in order to commit the end-to-end arm neon intrinsic
tests since FileCheck takes ~20 seconds to run said test due to the large amount
of neon intrinsics.

To force a test to run only when --param run_long_tests=true is passed in use
the following requires statement:

// REQUIRES: long_tests

llvm-svn: 184385
2013-06-19 23:23:49 +00:00
Eric Christopher 01c5f028ff Revert r179671 and just pass a triple to the test for a platform with known
TLS support.

llvm-svn: 179692
2013-04-17 17:27:51 +00:00
Eric Christopher 6ddf14db89 Add a bit of a hack to deal with a failing testcase on darwin10 bots.
We currently emit an error message when you try to use thread local
storage on targets that don't support it and testing C++11 thread
locals will trip this. We don't want to xfail the test for all darwin
hosts so add a quick hack to check for darwin10 and disable the
test based on that. Only checking darwin10 because anything earlier
is really old and I don't have a list of what other hosts don't
support tls handy.

Alternate suggestions welcome!

llvm-svn: 179671
2013-04-17 07:19:56 +00:00
Eric Christopher ddc6923a12 Remove dead option.
llvm-svn: 179670
2013-04-17 07:19:52 +00:00
Reid Kleckner 0675f85ef2 Use lit's internal shell runner on Windows for Clang tests
The behavior can be overridden by setting LIT_USE_INTERNAL_SHELL=0 in
the environment.

This fixes issues with /dev/null for me and brings the test suite time
down to 30s.  =D

llvm-svn: 179283
2013-04-11 13:34:18 +00:00
Alexey Samsonov c01f4f0d4d Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors.
llvm-svn: 178750
2013-04-04 07:41:20 +00:00
Evgeniy Stepanov 8d7d1b5377 Disable ASan/MSan symbolization of reports in tests.
It was using an instrumented symbolizer binary, which is a potential fork bomb.

llvm-svn: 178140
2013-03-27 13:11:46 +00:00
Alexey Samsonov 55b688f062 Add asan/msan to the list of available features in LIT test runner. Mark ASan-unfriendly test as XFAIL.
llvm-svn: 177995
2013-03-26 08:28:18 +00:00
Alexey Samsonov efb4168330 Fixup for r176934. More careful setup of path to llvm-symbolizer
llvm-svn: 177145
2013-03-15 07:29:58 +00:00
Evgeniy Stepanov 05826ed8a0 Set symbolizer path in the test environment.
This is needed to get symbolized stack traces when running Clang tests under (A|M)San.

llvm-svn: 176934
2013-03-13 07:10:36 +00:00
NAKAMURA Takumi 6c8127cc73 clang/test/Driver/darwin-sdkroot.c: Suppress this on msys bash, to introduce the feature "shell-preserves-root".
MSYS transforms '/' to 'X:/mingwroot/'.

llvm-svn: 172598
2013-01-16 06:10:16 +00:00
NAKAMURA Takumi 556d713c70 clang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not used.
It is not set at targetting cygming. See PR12920.

llvm-svn: 169824
2012-12-11 07:06:09 +00:00
NAKAMURA Takumi eb360a0d4f clang/test/lit.cfg: Disable dev-fd-fs on cygwin for now.
open("/dev/fd/1-foobar") fails with EEXIST on cygwin.

llvm-svn: 168676
2012-11-27 05:25:41 +00:00
NAKAMURA Takumi a95099ebd3 Revert r168132, "clang/test/lit.cfg: Suppress the feature 'dev-fd-fs' for now." I missed Daniel's r168095 by my accident.
llvm-svn: 168134
2012-11-16 03:50:55 +00:00
NAKAMURA Takumi 0e551c191c clang/test/lit.cfg: Suppress the feature 'dev-fd-fs' for now.
None of my buildhost (centos6 x86-64 and cygwin) is passing. Investigating.

llvm-svn: 168132
2012-11-16 03:28:51 +00:00
Daniel Dunbar 523855929b tests: Add a test for reading from named pipes.
- Realized I could use the /dev/fd filesystem to make a simple portable test.

llvm-svn: 168079
2012-11-15 20:06:10 +00:00
Argyrios Kyrtzidis d6bdafc858 [lit] For the "case-insensitive-filesystem" make sure to create the test temporary file
in the test output directory.

llvm-svn: 167193
2012-11-01 00:59:15 +00:00
Argyrios Kyrtzidis d7c16b2543 [PCH] Remove the stat cache from the PCH file.
The stat cache became essentially useless ever since we started
validating all file entries in the PCH.
But the motivating reason for removing it now is that it also affected
correctness in this situation:

-You have a header without include guards (using "#pragma once" or #import)
-When creating the PCH:
  -The same header is referenced in an #include with different filename cases.
  -In the PCH, of course, we record only one file entry for the header file
  -But we cache in the PCH file the stat info for both filename cases

-Then the source files are updated and the header file is updated in a way that
 its size and modification time are the same but its inode changes

-When using the PCH:
  -We validate the headers, we check that header file and we create a file entry with its current inode
  -There's another #include with a filename with different case than the previously created file entry
  -In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode
  -because of the different inodes, we think they are different files so we go ahead and include its contents.

Removing the stat cache will potentially break clients that are attempting to use the stat cache
as a way of avoiding having the actual input files available. If that use case is important, patches are welcome
to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with
literal strings, line/column computations, etc.).

This fixes rdar://5502805

llvm-svn: 167172
2012-10-31 20:59:50 +00:00
Rafael Espindola 84619411eb In the past "production" clang builds would not be used for c++, and
we had the -ccc-clang-cxx and -ccc-no-clang-cxx options to force them
on or off for testing.

Clang c++ support is now production quality and these options are dead.

llvm-svn: 166986
2012-10-30 00:13:16 +00:00
Daniel Dunbar fc6bd5cbda tests: Stop mangling '-vg' into the triple, we don't use this currently.
- Also, lit is going to get a valgrind feature, instead.

llvm-svn: 166301
2012-10-19 20:11:46 +00:00
Alexander Potapenko b4f819086a Disable source fortification on Darwin with AddressSanitizer.
ASan doesn't play well with -D_FORTIFY_SOURCE, which is enabled by default starting at OS X 10.7

llvm-svn: 164299
2012-09-20 10:10:01 +00:00
NAKAMURA Takumi fcd16e36c8 clang/test: [PR8833] Introduce the feature "LP64" to suppress LLP64-incompatible tests.
I think some of them could be rewritten to fit also LLP64.

llvm-svn: 163699
2012-09-12 10:45:40 +00:00
NAKAMURA Takumi 6bbc981d37 clang/test/lit.cfg: Fix a typo in comment.
llvm-svn: 163696
2012-09-12 10:38:03 +00:00
Dmitri Gribenko 740c0fbe0e libclang API for comment-to-xml conversion.
The implementation also includes a Relax NG schema and tests for the schema
itself.  The schema is used in c-index-test to verify that XML documents we
produce are valid.  In order to do the validation, we add an optional libxml2
dependency for c-index-test.

Credits for CMake part go to Doug Gregor.  Credits for Autoconf part go to Eric
Christopher.  Thanks!

llvm-svn: 161431
2012-08-07 17:54:38 +00:00
NAKAMURA Takumi b59973e6cd clang/test/Misc/diag-template-diffing-color.cpp: Introduce the feature 'ansi-escape-sequences'.
llvm-svn: 160043
2012-07-11 11:44:00 +00:00
NAKAMURA Takumi c4d558a43e test/lit.cfg: Please pass %INCLUDE% to clang.exe on Win32. MS-compatible clang may refer to %INCLUDE%. It fixes r154188.
llvm-svn: 154240
2012-04-07 01:02:53 +00:00
Jordy Rose 0e09facb85 Clear environment variables that might affect Clang before running tests.
llvm-svn: 154188
2012-04-06 18:14:01 +00:00
Jim Grosbach 576452b830 Have the driver pass CPU and target feature information to cc1as.
When creating the MCSubtargetInfo, the assembler driver uses the CPU and
feature string to construct a more accurate model of what instructions
are and are not legal.

rdar://10840476

llvm-svn: 150273
2012-02-10 20:37:10 +00:00
NAKAMURA Takumi cd9c3d6647 test/lit.cfg: Enhance getRegisteredTargets() to retrieve +Asserts.
- s/getRegisteredTargets/get_llc_props/g
  - get_llc_props() returns dict {"set_of_targets", "enable_assertions"}
  - Enable the feature "asserts".
    test/Driver/darwin-verify-debug.c had expected it.

llvm-svn: 145231
2011-11-28 05:09:42 +00:00
Chandler Carruth a62ba81682 Rip out one of the features I added for the driver-include-management.
We don't actually need a separate flag for non-sysrooted paths as the
driver has to manage the sysroot anyways. The driver is not infrequently
adding paths to the header search based on their existence on the
filesystem. For that, it has to add the sysroot anyways, we should pass
it on down to CC1 already joined. More importantly, the driver cannot in
all cases distinguish between sysrooted paths and paths that are
relative to the Clang binary's installation directory. Essentially, we
always need to ignore the system root for these internal header search
options. It turns out in most of the places we were already providing
the system root in the driver, and then another one in CC1 so this fixes
several bugs.

llvm-svn: 143917
2011-11-07 09:17:31 +00:00
Chandler Carruth 34146d8ca7 Switch Lit to directly query the driver for the builtin inclue path.
Thanks to Peter for pointing out how easy this is to do. I'm now much
happier with this solution.

llvm-svn: 143842
2011-11-05 23:29:28 +00:00
Chandler Carruth 2837f667e0 Teach lit to ask the Clang it is running what version string to use
rather than presuming that it is 3.0. This is extra important as the
version should be 3.1, but CMake hasn't caught up with the times.
That'll be fixed in a separate commit.

llvm-svn: 143823
2011-11-05 20:55:50 +00:00
Chandler Carruth afd2441f60 Compute the path properly on different platforms. Specifically, compute
it the exact same way that the Clang code computes this path.

Hopefully with this, the MSVC bots will actually come back to life.

llvm-svn: 143807
2011-11-05 10:41:42 +00:00
Chandler Carruth c0b1b86ff4 Teach Lit to pass the CC1 invocation the builtin include directory. This
is a pretty gross hack, but I don't have any significantly cleaner ideas
for this. There are several things obviously gross about it:

1) Lit shouldn't know that Clang needs this. This really that bad, as
   Lit already knows about CC1 and other internal details.
2) This hard codes the '3.0' version number, which is pretty lame.
3) This hard codes every other aspect of the resource dir structure
   which is less lame than the version number, but still not great.

However, it should bring the MSVC tests back to life, and it should
unblock the rest of the move from Frontend to Driver, so I think it's
worth a bit of grossness that is isolated in our testing infrastructure
while we figure out the best long term approach. I have the following
ideas, some of which only solve part of the problem (and thus might need
to be combined with other ideas):

a) Create a symlink or other convenience path instead of a version
   number.
b) Run 'clang' directly in the lit.cfg, look at its resource dir, and use
   that.
c) Switch all the tests to use the driver instead of CC1.
d) Hack the frontend to synthesize builtin include directories when none
   are provided by the driver.

I don't like (d) because it feels very hackish and likely to break. We
can only solve a small part of the problem with (a). I wanted to vote
for (c), but lots of the tests in this bucket are really heavily using
internal-only flags like -verify and -triple. I'm loath to complicate
them with the full driver layer. Also, switching them to the driver adds
more than just builtin headers, but all of the rest of the system
headers!

This leaves me with (b). If others like (b), I'll switch to it, but it
felt a bit icky. Nothing concrete, and the other options look
significantly worse, but I felt icky enough that I wanted to start with
a more brain-dead patch to stop the bleeding, and gauge others' feelings
here.

llvm-svn: 143804
2011-11-05 10:15:27 +00:00
Andrew Trick 3df2824c59 FreeBSD (apparently) does not support crash-recovery tests.
These tests have been failing since the beginning of buildbot time:
crash-recovery-code-complete.c
crash-recovery-reparse.c
crash-recovery.c

llvm-svn: 138672
2011-08-26 22:46:31 +00:00
NAKAMURA Takumi fbd46b0736 test/lit.cfg: Enable "crash-recovery" tests on Win32 hosts. CrashRecoveryContext supports Win32 since r138199.
FIXME: Shall we eliminate the feature "crash-recovery"?
llvm-svn: 138201
2011-08-20 07:09:20 +00:00
Galina Kistanova b38fd263bd Added registered targets for in-test dependency declarations.
llvm-svn: 132571
2011-06-03 18:36:30 +00:00
NAKAMURA Takumi 70f5be634a test/lit.cfg: bash is available on MSYS.
llvm-svn: 127080
2011-03-05 11:16:06 +00:00