summaryrefslogtreecommitdiffstats
path: root/llvm/utils/llvm-lit
Commit message (Collapse)AuthorAgeFilesLines
* [lit] llvm-lit.in: specify file encoding to UTF-8George Karpenkov2019-01-141-0/+1
| | | | | | | | | | | | | | | | This is needed because otherwise if source dir is at location whose path contains non-ASCII character then python will complain about SyntaxError. SyntaxError: Non-ASCII character '\xc4' in file /home/D?vis/libc++/src/build/bin/llvm-lit on line 16, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details Patch by davispuh Differential Revision: https://reviews.llvm.org/D50201 llvm-svn: 351113
* [lit] Actually do normalize the case of files in the config map.Zachary Turner2017-09-211-0/+1
| | | | | | | | | | | | | | | This has gone back and forth, but it seems this is necessary after all. realpath is not sufficient because if you have a file named 'C:\foo.txt', then both realpath('c:\foo.txt') and realpath(C:\foo.txt') return the string that was passed to them exactly as is, meaning the case of the drive-letter won't match. The problem before was not that we were normalizing the case of items going into the config map, but rather that we were normalizing the case of something we needed to print. The value that is used to key on the config map should never be printed. llvm-svn: 313918
* [lit] Don't norm case when inserting into the config map.Zachary Turner2017-09-211-2/+0
| | | | | | | | This makes all paths lowercase on Windows, which seemed like a good idea at the time, but it means that tests can't properly use FileCheck to match expected path names. llvm-svn: 313889
* [lit] Undo the patch to stop writing pyc files.Zachary Turner2017-09-201-2/+0
| | | | | | | The problems on the bots appear to be resolved and this was determined to not be the culprit. Removing this. llvm-svn: 313807
* Make lit stop writing pyc files.Zachary Turner2017-09-191-0/+2
| | | | | | | | | | | | Many svn-based buildbots seem to be getting stuck continually in tree conflicts due to the output of pyc files. I'm disabling these as a temporary measure in an attempt to get everything stable again. I'll try to remove this code once I understand the problem better. llvm-svn: 313698
* [lit] Use realpath when adding to the config map.Zachary Turner2017-09-181-0/+1
| | | | | | | | | | | | | Since the path a user specifies to the llvm-lit script might be different than the source tree they built from (since they could be behind different symlinks), we need to use realpath to make sure that path comparisons work as expected. Even better would be to use a custom dictionary comparison with actual file equivalence comparison semantics, but this is the least friction to unbreak things for now. llvm-svn: 313594
* Resubmit "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-152-43/+22
| | | | | | | | | | | | | | | | | | | | This is a resubmission of r313270. It broke standalone builds of compiler-rt because we were not correctly generating the llvm-lit script in the standalone build directory. The fixes incorporated here attempt to find llvm/utils/llvm-lit from the source tree returned by llvm-config. If present, it will generate llvm-lit into the output directory. Regardless, the user can specify -DLLVM_EXTERNAL_LIT to point to a specific lit.py on their file system. This supports the use case of someone installing lit via a package manager. If it cannot find a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or invalid, then we print a warning that tests will not be able to run. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313407
* Revert "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-152-16/+36
| | | | | | | | This patch is still breaking several multi-stage compiler-rt bots. I already know what the fix is, but I want to get the bots green for now and then try re-applying in the morning. llvm-svn: 313335
* [lit] Force site configs to be run before source-tree configsZachary Turner2017-09-142-36/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies LLVM's lit infrastructure by enforcing an ordering that a site config is always run before a source-tree config. A significant amount of the complexity from lit config files arises from the fact that inside of a source-tree config file, we don't yet know if the site config has been run. However it is *always* required to run a site config first, because it passes various variables down through CMake that the main config depends on. As a result, every config file has to do a bunch of magic to try to reverse-engineer the location of the site config file if they detect (heuristically) that the site config file has not yet been run. This patch solves the problem by emitting a mapping from source tree config file to binary tree site config file in llvm-lit.py. Then, during discovery when we find a config file, we check to see if we have a target mapping for it, and if so we use that instead. This mechanism is generic enough that it does not affect external users of lit. They will just not have a config mapping defined, and everything will work as normal. On the other hand, for us it allows us to make many simplifications: * We are guaranteed that a site config will be executed first * Inside of a main config, we no longer have to assume that attributes might not be present and use getattr everywhere. * We no longer have to pass parameters such as --param llvm_site_config=<path> on the command line. * It is future-proof, meaning you don't have to edit llvm-lit.in to add support for new projects. * All of the duplicated logic of trying various fallback mechanisms of finding a site config from the main config are now gone. One potentially noteworthy thing that was required to implement this change is that whereas the ninja check targets previously used the first method to spawn lit, they now use the second. In particular, you can no longer run lit.py against the source tree while specifying the various `foo_site_config=<path>` parameters. Instead, you need to run llvm-lit.py. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313270
* [utils] Add libc++ and libc++abi config to llvm-litShoaib Meenai2017-01-171-0/+10
| | | | | | | | | | This allows us to use bin/llvm-lit to run individual libc++ and libc++abi tests without having to explicitly specify the site config paths, similar to other projects. Differential Revision: https://reviews.llvm.org/D28733 llvm-svn: 292203
* Fix llvm-lit.in corresponding to r283710.NAKAMURA Takumi2016-10-101-2/+2
| | | | | | | | | | | Traceback (most recent call last): File "bin/llvm-lit", line 44, in <module> lit.main(builtin_parameters) AttributeError: 'module' object has no attribute 'main' Suggested by Artem Belevich. llvm-svn: 283816
* Remove autoconf supportChris Bieneman2016-01-261-27/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Revert r229224: Make the 'llvm-lit' utility defend against a system where ↵Chandler Carruth2015-02-141-1/+1
| | | | | | | | Python3 Apparantly python2.7 also doesn't work. Awesome. llvm-svn: 229245
* [lit] Make the 'llvm-lit' utility defend against a system where Python3Chandler Carruth2015-02-141-1/+1
| | | | | | | | | | | | | is the default. The lit.cfg files are not all valid Python3 and I've no idea if anyone is really prepared to update them. The easiest way I know of to ensure that this script uses Python 2 is to use 'python2.7' in the command. Mac and Linux are definitely fine with this and I think other platforms will be as well, but if anyone struggles with this set up and has better ideas, let me know. llvm-svn: 229244
* [testing]: lld generally lives in tools/, so fix llvm-lit.Tim Northover2014-07-071-1/+1
| | | | | | Otherwise we can't run individual tests directly ("llvm-lit /path/to/test") llvm-svn: 212461
* lit: Set a base directory for compiler-rt testsDuncan P. N. Exon Smith2014-03-311-0/+5
| | | | | | | | | Setting this parameter enables llvm-lit to run on source directories for compiler-rt test suites that implement magic in their lit.cfg. <rdar://problem/16458307> llvm-svn: 205262
* Add the lld root to llvm-lit, so llvm-lit can be usedJoey Gouly2014-01-141-0/+5
| | | | | | to run lld tests individually. llvm-svn: 199264
* [CMake] Generate ${BUILD_MODE}/llvm-lit for each ${CMAKE_CONFIGURATION_TYPES}.NAKAMURA Takumi2013-12-302-5/+17
| | | | | | | | | | | | llvm-lit can be invoked; $ Release/bin/llvm-lit instead of; $ bin/llvm-lit --param buid_mode=Release llvm-svn: 198206
* Add missing trailing comma in llvm-lit.inReid Kleckner2013-12-171-1/+1
| | | | | | | I was testing a stale bin/llvm-lit, which now lives at bin/llvm-lit.py on Windows. llvm-svn: 197446
* Add the lit site config for unittests to bin/llvm-litReid Kleckner2013-12-171-0/+2
| | | | | | | | | | This missing parameter was causing bin/llvm-lit to run the unittests from my primary build directory instead of my self-hosting build directory because llvm-config was on my PATH. This more closely matches what 'make check' will pass to lit.py. llvm-svn: 197444
* utils/llvm-lit: Generate "llvm-lit.py" rather than "llvm-lit" on Win32 hosts ↵NAKAMURA Takumi2013-12-032-3/+13
| | | | | | | | to let llvm-lit.py --use-processes work. llvm-lit needs suffix.py for multiprocess to find a main module. llvm-svn: 196328
* Remove llvm-lit from the cmake install target.Hans Wennborg2013-08-221-8/+0
| | | | | | Since it's an llvm-internal tool, we shouldn't install it. llvm-svn: 188976
* [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory ↵NAKAMURA Takumi2013-01-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | for unittests. For example, cur) unittests/ADT/Release/ADTTests new) unittests/ADT/ADTTests RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR. With Make and Ninja, the tree is not built with multiple configurations. Then, including the build type in target directory doesn't make sense. See also "How can I build multiple modes without switching?" http://www.cmake.org/Wiki/CMake_FAQ CMAKE_CFG_INTDIR is set to "." With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example, unittests/ADT/Release/ADTTests.exe CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)". Thus, "--param build_config" is also deprecated. llvm-svn: 173616
* [LIT] Add a clang_tools_extra_site_cfg to match the various other site_cfg.David Blaikie2012-09-041-4/+9
| | | | | | | | | This doesn't seem ideal, perhaps we could just keep the llvm_site_cfg and have other config (clang and clang-tools-extra) derive their site_cfg from that. Suggestions/complaints/ideas welcome. llvm-svn: 163171
* llvm-lit: Inject the lit module path at the beginning of sys.path, just in caseDaniel Dunbar2012-04-191-2/+3
| | | | | | the user has another lit somewhere. llvm-svn: 155131
* Use $(ECHOPATH) to make llvm-lit from llvm-lit.in.NAKAMURA Takumi2011-03-081-4/+5
| | | | llvm-svn: 127240
* Revert r127073: "Introduce $(ECHOPATH) to print DOSish path string on MSYS ↵Jakob Stoklund Olesen2011-03-051-5/+4
| | | | | | | | | | bash for alternative of $(ECHO)." It broke the llvm-gcc-native-mingw32 buildbot, and we need all of them to be green for the 2.9 branch. Takumi, please reapply after we branch, preferably with a fix ;-) llvm-svn: 127107
* Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for ↵NAKAMURA Takumi2011-03-051-4/+5
| | | | | | | | alternative of $(ECHO). On mingw and python/w32, lit would not be expected to understand MSYS-style path. llvm-svn: 127073
* llvm-lit may be available with CMake.NAKAMURA Takumi2011-02-091-0/+2
| | | | llvm-svn: 125168
* llvm-lit may be able to invoke clang tests.NAKAMURA Takumi2011-02-091-0/+4
| | | | llvm-svn: 125167
* CMake: Add llvm-lit to CMake build.Michael J. Spencer2010-09-131-0/+12
| | | | llvm-svn: 113762
* build: Fix a dependency.Daniel Dunbar2010-08-021-1/+1
| | | | llvm-svn: 110001
* tests: Add an 'llvm-lit' tool (script), which gets generated as part of theDaniel Dunbar2010-08-022-0/+42
build and has the object build directory baked into it. This allows 'llvm-lit' to properly find the information needed to run the test suite in all cases, without requiring the user to have LLVM or 'lit' available in their PATH, for example. llvm-svn: 110000
OpenPOWER on IntegriCloud