1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

25 Commits

Author SHA1 Message Date
Zachary Turner
8e4d247b07 [lit] Clean output directories before running tests.
Presently lit leaks files in the tests' output directories.
Specifically, if a test creates output files, lit makes no
effort to remove them prior to the next test run.  This is
problematic because it leads to false positives whenever a
test passes because stale  files were present.  In general
it is a source of flakiness that should be removed.

This patch addresses this by building the list of all test
directories that are part of the current run set, and then
deleting those directories and recreating them anew.  This
gives each test a clean baseline to start from.

Differential Revision: https://reviews.llvm.org/D34732

llvm-svn: 306832
2017-06-30 16:01:30 +00:00
Andrew Ng
9644c1e9e7 [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows.
This patch propogates the environment variable SYSTEMDRIVE on Windows when
running the unit tests. This prevents the creation of a directory named
"%SystemDrive%" when running the unit tests from FileSystemTest that use the
function llvm::sys::fs::remove_directories which in turn uses SHFileOperationW.
It is within SHFileOperationW that this environment variable may be used and if
undefined causes the creation of a "%SystemDrive%" directory in the current
directory.

Differential Revision: https://reviews.llvm.org/D32910

llvm-svn: 302409
2017-05-08 08:55:38 +00:00
Alex Denisov
9fcc64726a Replace hardcoded comment at 'lit.site.cfg.in'
At the moment almost every lit.site.cfg.in contains two lines comment:

## Autogenerated by LLVM/Clang configuration.
# Do not edit!

The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from 
configure_lit_site_cfg with the note and some useful information.

llvm-svn: 266515
2016-04-16 06:47:41 +00:00
Chandler Carruth
a33398e005 [lit] Hack lit to allow a test suite to request that it is run "early".
This lets us for example start running the unit test suite early. For
'check-llvm' on my machine, this drops the tim e from 44s to 32s!!!!!

It's pretty ugly. I barely know how to write Python, so feel free to
just tell me how I should write it instead. =D Thanks to Filipe and
others for help.

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

llvm-svn: 263329
2016-03-12 03:03:31 +00:00
NAKAMURA Takumi
9b069eaf92 Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.
This makes unittests run with BUILD_SHARED_LIBS on DLL platforms.

llvm-svn: 212316
2014-07-04 05:11:55 +00:00
Rafael Espindola
28ea255db4 With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore.
llvm-svn: 202510
2014-02-28 16:16:51 +00:00
Daniel Dunbar
b46c740f23 [tests] Update to use lit_config and lit package, as appropriate.
llvm-svn: 188076
2013-08-09 16:22:05 +00:00
Daniel Dunbar
8eaee7acc3 [tests] Avoid deprecated except syntax.
llvm-svn: 187928
2013-08-07 23:09:10 +00:00
Alexey Samsonov
9e33512a49 Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors.
llvm-svn: 178749
2013-04-04 07:41:00 +00:00
Evgeniy Stepanov
7077ad37ab Disable ASan/MSan symbolization of reports in tests.
It was using an instrumented symbolizer binary, which is a potential fork bomb.

llvm-svn: 178139
2013-03-27 13:11:12 +00:00
Alexey Samsonov
2b83cbf9ab Fixup for r176933: more careful setup of path to llvm-symbolizer
llvm-svn: 177144
2013-03-15 07:27:49 +00:00
Evgeniy Stepanov
e8857c7379 Set symbolizer path in the test environment.
This is needed to get symbolized stack traces when running LLVM tests under (A|M)San.

llvm-svn: 176933
2013-03-13 06:58:09 +00:00
Daniel Dunbar
9ca0ee457c tests: Rip out a bunch of now unused test code relating to use of llvm-gcc in LLVM tests.
llvm-svn: 143143
2011-10-27 20:59:26 +00:00
Daniel Dunbar
4e9906ba6f test/Unit: Fix enable shared test to follow check that we have actually loaded
the site config.

llvm-svn: 133641
2011-06-22 20:41:53 +00:00
Michael J. Spencer
4c0dfbd472 Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath defaults to \Windows\.
If I typed anything else it would just decline into cursing.

llvm-svn: 121095
2010-12-07 01:23:49 +00:00
NAKAMURA Takumi
7352ce8225 test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin.
llvm-svn: 120274
2010-11-29 00:20:21 +00:00
NAKAMURA Takumi
a1049dbd9a CMake: lit(check.vcproj) can run with multiple configurations on Visual Studio.
Unittests need LLVM_BUILD_MODE to pick up each test.

Confirmed on CentOS5, Mingw, MSYS, and with possible configurations on VS8 and VS10.

llvm-svn: 120212
2010-11-27 13:10:11 +00:00
Jeffrey Yasskin
f073920691 Try r96559 for the third time. This time the shared library is only built if
--enable-shared is passed to configure.

llvm-svn: 97119
2010-02-25 06:34:33 +00:00
Jeffrey Yasskin
82c2f2fd24 Roll back r96959 again.
llvm-svn: 96981
2010-02-23 20:53:37 +00:00
Jeffrey Yasskin
e653785a3d Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of
the examples shared to make sure the shared library keeps working.

llvm-svn: 96959
2010-02-23 18:10:07 +00:00
Jeffrey Yasskin
e4b750f830 Roll back the shared library, r96559. It broke two darwins and arm, mysteriously.
llvm-svn: 96569
2010-02-18 04:43:02 +00:00
Jeffrey Yasskin
64b33dd9b7 Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add an
--enable-shared configure flag to have the tools linked shared. (2.7svn is just
$(LLVMVersion) so it'll change to "2.7" in the release.)  Always link the
example programs shared to test that the shared library keeps working.

On my mac laptop, Debug libLLVM2.7svn.dylib is 39MB, and opt (for example) is
16M static vs 440K shared.

Two things are less than ideal here:
1) The library doesn't include any version information. Since we expect to break
the ABI with every release, this shouldn't be much of a problem. If we do
release a compatible 2.7.1, we may be able to hack its library to work with
binaries compiled against 2.7.0, or we can just ask them to recompile. I'm
hoping to get a real packaging expert to look at this for the 2.8 release.
2) llvm-config doesn't yet have an option to print link options for the shared
library. I'll add this as a subsequent patch.

llvm-svn: 96559
2010-02-18 02:36:02 +00:00
Daniel Dunbar
1b05b09ba4 CMake/lit: Add llvm_{unit_,}site_config parameters, and always pass them when running tests from the project files.
llvm-svn: 90869
2009-12-08 19:47:36 +00:00
Daniel Dunbar
ecd03574d6 Switch to using 'lit.site.cfg.in' for the site config template for Unit tests,
and generate it for CMake builds as well.

llvm-svn: 86451
2009-11-08 09:07:51 +00:00
Daniel Dunbar
d715512750 Teach 'make check-lit' to run unittests.
llvm-svn: 81753
2009-09-14 02:39:01 +00:00