summaryrefslogtreecommitdiffstats
path: root/clang/test/Unit
Commit message (Collapse)AuthorAgeFilesLines
* [lit] Set shlibpath_var on AIXHubert Tong2019-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: When building the `check-all` target on AIX, lit produces ``` warning: unable to inject shared library path on 'AIX' ``` This patch addresses this. `LIBPATH` is the environment variable of interest on AIX. Newer versions of AIX may consider `LD_LIBRARY_PATH`, but only when `LIBPATH` is unset. Reviewers: xingxue, jasonliu, sfertile, serge-sans-paille Reviewed By: xingxue Subscribers: jsji, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59741 llvm-svn: 357334
* [lit] Set shlibpath_var on SolarisFedor Sergeev2017-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: During make check-all on Solaris, lit complains llvm-lit: /vol/gcc/src/llvm/llvm/dist/tools/clang/test/Unit/lit.cfg.py:57: warning: unable to inject shared library path on 'SunOS' The following patch avoids this: Solaris uses LD_LIBRARY_PATH like several other targets. In theory, one could also handle LD_LIBRARY_PATH_{32,64} which take precedence over LD_LIBRARY_PATH if set, but let's cross that bridge when we get there. Patch by Rainer Orth. Reviewers: rsmith, lichray Reviewed By: lichray Differential Revision: https://reviews.llvm.org/D39640 llvm-svn: 319026
* [test] Fix clang-test for FreeBSD and NetBSDTim Shen2017-10-241-14/+20
| | | | | | | | | | | | | | | | Lit tries to inject the shared library paths, but no action is taken when platform.system() is not recognized, results in an environment variable with an empty name, which is illegal. The patch fixes this mechanism for FreeBSD and NetBSD, and gives an warning on other platforms, so that the latecomers don't have to spend time on debugging lit. Thanks Zhihao Yuan for the patch! Differential Revision: https://reviews.llvm.org/D39162 llvm-svn: 316411
* [lit] Rename lld and clang lit configs to end in .pyZachary Turner2017-09-212-1/+1
| | | | | | | | | | This follows in line with a previous patch of renaming LLVM's. Working on these files is difficult in certain operating systems and/or environments that don't like handling python code with a non .py file extension. llvm-svn: 313892
* Resubmit "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-151-63/+4
| | | | | | | | | | | | | | | | | | | | 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-151-4/+63
| | | | | | | | 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-141-63/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Change remaining references to lit.util.capture to use subprocess.check_output.David L. Jones2017-07-061-2/+3
| | | | | | | | | | | | | | Summary: The capture() function was removed in r306625. This should fix PGO breakages reported by Michael Zolotukhin. Reviewers: mzolotukhin Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D35088 llvm-svn: 307320
* [test] Extend llvm_shlib_dir fix to unittestsMichal Gorny2016-12-151-5/+6
| | | | | | | | | | | | | | Extend the fix from rL286952 to unittests. The fix added clang built library directories (via llvm_shlib_dir) to LD_LIBRARY_PATH. The previous logic has used llvm_libs_dir only which points to installed LLVM when doing stand-alone builds. The patch also removes the redundant win32 code that is no longer necessary now that shlibdir is used unconditionally. Differential Revision: https://reviews.llvm.org/D27812 llvm-svn: 289865
* Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov2016-04-161-2/+2
| | | | | | | | | | | | 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: 266516
* Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like ↵NAKAMURA Takumi2014-07-041-0/+5
| | | | | | | | cygming. This makes unittests run with BUILD_SHARED_LIBS on DLL platforms. llvm-svn: 212316
* Trailing linefeedNAKAMURA Takumi2014-07-041-1/+0
| | | | llvm-svn: 212312
* libclang: fix a bug in processing invalid arguments, introduced in r201249Dmitri Gribenko2014-02-182-8/+17
| | | | | | Recommit r201346, reverted in r201373. llvm-svn: 201578
* Reverting because reverting r200145.Adrian Prantl2014-01-271-0/+2
| | | | | | | | Revert "check-clang doesn't require neither llvm_src_root nor llvm_obj_root." This reverts commit r200146. llvm-svn: 200261
* Reverting because reverting r200145.Adrian Prantl2014-01-271-0/+2
| | | | | | | | Revert "clang-check: Unittests doesn't requires tools." This reverts commit r200147. llvm-svn: 200260
* clang-check: Unittests doesn't requires tools.NAKAMURA Takumi2014-01-261-2/+0
| | | | llvm-svn: 200147
* check-clang doesn't require neither llvm_src_root nor llvm_obj_root.NAKAMURA Takumi2014-01-261-2/+0
| | | | llvm-svn: 200146
* [tests] Update to use lit_config and lit package, as appropriate.Daniel Dunbar2013-08-092-12/+15
| | | | llvm-svn: 188072
* [tests] Avoid deprecated except syntax.Daniel Dunbar2013-08-091-1/+4
| | | | llvm-svn: 188041
* Propagate path to ASan/MSan symbolizer into test environment to produce ↵Alexey Samsonov2013-04-041-0/+5
| | | | | | useful reports on errors. llvm-svn: 178750
* Disable ASan/MSan symbolization of reports in tests.Evgeniy Stepanov2013-03-271-7/+0
| | | | | | It was using an instrumented symbolizer binary, which is a potential fork bomb. llvm-svn: 178140
* Fixup for r176934. More careful setup of path to llvm-symbolizerAlexey Samsonov2013-03-151-2/+4
| | | | llvm-svn: 177145
* Set symbolizer path in the test environment.Evgeniy Stepanov2013-03-131-0/+5
| | | | | | This is needed to get symbolized stack traces when running Clang tests under (A|M)San. llvm-svn: 176934
* test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config inDaniel Dunbar2011-06-221-9/+9
| | | | | | path). llvm-svn: 133653
* Reverted r132330, r132321, r132320, r132319 as per discussion. Will try ↵Galina Kistanova2011-06-021-6/+0
| | | | | | in-test requirement declarations instead. llvm-svn: 132491
* Preparations for separating target-specific clang tests.Galina Kistanova2011-05-311-0/+6
| | | | llvm-svn: 132319
* Add CMake support to the clang unittests.Jeffrey Yasskin2011-02-152-4/+6
| | | | llvm-svn: 125561
* Add gTest unittests to clang, and write the first one.Jeffrey Yasskin2011-02-032-0/+110
This is the Makefile version only; the cmake implementation is coming soon. llvm-svn: 124777
OpenPOWER on IntegriCloud