summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAgeFilesLines
* [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*Reid Kleckner2019-06-273-2/+2
| | | | | | | | | | | | | These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@364591 91177308-0d34-0410-b5e6-96231b3b80d8
* [Darwin][NFC] Refactor throttling of 64bit sanitizer tests on DarwinJulian Lettner2019-02-272-7/+7
| | | | | | | | | | | | | | | | | | | Underlying condition for throttling is "has large mmap'd regions" (i.e., shadow memory) and not sanitizers in general (e.g., UBSan does not need to be throttled). Rename parallelism group `darwin-64bit-sanitizer` to `shadow-memory` and apply it unconditionally to all tests which require it. We can then have all the Darwin throttling logic in one place in the commen lit config. Throttle sanitizer_common unit tests. Configuration was previously missing from sanitizer_common/Unit/lit.site.cfg. Reviewed by: kubamracek Differential Revision: https://reviews.llvm.org/D58677 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355018 91177308-0d34-0410-b5e6-96231b3b80d8
* [XRay] Add LD_LIBRARY_PATH to env variables for Unit TestsDean Michael Berris2018-09-271-0/+1
| | | | | | | | | | | | | | | | | Summary: This change allows us to use the library path from which the LLVM libraries are installed, in case the LLVM installation generates shared libraries. This should address llvm.org/PR39070. Reviewers: mboerger, eizan Subscribers: mgorny, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D52597 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@343280 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow compiler-rt test targets to work with multi-config CMake generatorsGreg Bedwell2017-11-132-4/+5
| | | | | | | | | | Multi-config CMake generators need lit to be able to resolve paths of artifacts from previous build steps at lit time, rather than expect them to be fully resolved at CMake time as they may contain the build mode. Differential Revision: https://reviews.llvm.org/D38471 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318037 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313407 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-151-1/+1
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313335 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Force site configs to be run before source-tree configsZachary Turner2017-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313270 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing importReid Kleckner2017-04-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299739 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Fix Darwin pickling errors with process poolsReid Kleckner2017-04-072-3/+12
| | | | | | | For a function to be pickle-able, it has to be in the top-level of a real Python module. So, I made one for this code snippet. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299738 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Limit parallelism of sanitizer tests on Darwin [compiler-rt part, take 2]Kuba Mracek2017-01-201-0/+10
| | | | | | | | | | | | Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests. This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests. Differential Revision: https://reviews.llvm.org/D28420 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292549 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r292232.Kuba Mracek2017-01-171-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292236 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Limit parallelism of sanitizer tests on Darwin [compiler-rt part]Kuba Mracek2017-01-171-0/+7
| | | | | | | | | | | | Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests. This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests. Differential Revision: https://reviews.llvm.org/D28420 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292232 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov2016-04-161-2/+1
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266520 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Push the dependency on AddLLVM into the test and unites layersChris Bieneman2016-02-171-0/+3
| | | | | | Compiler-rt only relies on LLVM for lit support. Pushing this dependency down into the test and unitest layers will allow builtin libraries to be built without LLVM. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261105 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use LLVM_MAIN_SRC_DIR instead of LLVM_SOURCE_DIR.Alexey Samsonov2016-02-011-1/+1
| | | | | | | The former will be properly initialized in standalone CMake build of compiler-rt. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259407 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Set llvm_tools_dir to LLVM_TOOLS_BINARY_DIR instead of LLVM_TOOLS_DIRAlexey Samsonov2016-01-271-1/+1
| | | | | | | In this way, it should work for both in-LLVM and standalone compiler-rt build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258991 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the newer python syntax for exceptionsJustin Bogner2014-12-131-1/+1
| | | | | | | We've dropped support for python 2.5, so now we can use the forward compatible "except ... as" syntax. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224181 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Optional support for dynamic ASan runtime on Linux.Alexey Samsonov2014-04-011-0/+1
| | | | | | | Based on http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205308 91177308-0d34-0410-b5e6-96231b3b80d8
* Move shared configs for lit test suites to test/ and unittests/ directoriesAlexey Samsonov2014-02-143-0/+57
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201399 91177308-0d34-0410-b5e6-96231b3b80d8