summaryrefslogtreecommitdiffstats
path: root/lldb/lit
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb] Add support to cache a PDB's global scope and fix a bug in getting ↵Aaron Smith2018-01-133-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the source file name for a compiland Summary: This commit is a combination of the following changes: - Cache PDB's global scope (executable) in SymbolFilePDB - Change naming of `cu` to `compiland` which is PDB specific - Change ParseCompileUnitForSymIndex to ParseCompileUnitForUID. Prefer using a common name `UID` instead of PDB's `System Index` Adding one more argument `index` to this method, which is used to specify the index of the compile unit in a cached compile unit array - Add GetPDBCompilandByUID method to simply code - Fix a bug in getting the source file name for a PDB compiland. For some reason, PDBSymbolCompiland::getSourceFileName() could return an empty name, so if that is true, we have to walk through all source files of this compiland and determine the right source file used to generate this compiland based on language indicated. The previous implementation called PDBSession::findOneSourceFile method to get its name for the compiland. This is not accurate since the `one source file` found could be a header other than source file. Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41428 llvm-svn: 322433
* [test] Fix tests to use more portable LLVM_ENABLE_ZLIBMichal Gorny2018-01-092-1/+5
| | | | | | | | | | | | | The HAVE_LIBZ variable is not exported by LLVM, and therefore is not available in stand-alone builds of other tools. Use LLVM_ENABLE_ZLIB which is the name under which the effective value is exported. Additional, use llvm_canonicalize_cmake_booleans() to make sure that a correct (Python-safe) boolean value is passed down to lit. Differential Revision: https://reviews.llvm.org/D41725 llvm-svn: 322081
* [test] Use full PATH lookup for toolsMichal Gorny2018-01-061-2/+2
| | | | | | | | | | | | | | | Use full PATH when looking up test tools rather than just llvm tools directory. r320813 has added a lookup for 'lldb-test' which is part of LLDB tools rather than LLVM, and therefore is not present in llvm_tools_dir before LLDB is installed. While technically we could introduce separate per-directory lookup logic, there is no real reason not to use the PATH formed earlier here, and this is what other tools are doing. Differential Revision: https://reviews.llvm.org/D41726 llvm-svn: 321932
* ObjectFileELF: Add support for compressed sectionsPavel Labath2017-12-155-1/+41
| | | | | | | | | | | | | | | | Summary: We use the llvm decompressor to decompress SHF_COMPRESSED sections. This enables us to read data from debug info sections, which are sometimes compressed, particuarly in the split-dwarf case. This functionality is only available if llvm is compiled with zlib support. Reviewers: clayborg, zturner Subscribers: emaste, mgorny, aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D40616 llvm-svn: 320813
* [CMake] Build clang as dependency when using in-tree clang for tests.Davide Italiano2017-10-271-0/+6
| | | | | | | Discussed with Zachary Turner and Pavel Labath on lldb-dev. Let's hope this doesn't break anything :) llvm-svn: 316800
* Default to using in-tree clang for building test executablesPavel Labath2017-10-272-24/+3
| | | | | | | | | | | | | | | | | | | | | Summary: Using the in-tree clang should be the default test configuration as that is the one compiler that we can be sure everyone has (better reproducibility of test results). Also, it should hopefully reduce the impact of pr35040. This also reduces the number of settings which control the compiler used. LLDB_TEST_C_COMPILER is used for C files and LLDB_TEST_CXX_COMPILER for C++ files. Both of the settings default to the in-tree clang. Reviewers: zturner Subscribers: mgorny, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D39215 llvm-svn: 316728
* Resubmit "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-152-101/+16
| | | | | | | | | | | | | | | | | | | | 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/+101
| | | | | | | | 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
* Fix syntax in lldb lit.cfgReid Kleckner2017-09-151-1/+1
| | | | llvm-svn: 313332
* [lit] Force site configs to be run before source-tree configsZachary Turner2017-09-142-101/+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
* Change remaining references to lit.util.capture to use subprocess.check_output.David L. Jones2017-07-061-3/+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] Fix finding LLDB tools when building stand-aloneMichal Gorny2017-02-192-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use both LLDB- and LLVM-specific tool/library directories when LLDB is being built stand-alone. This ensures that the freshly-built tools (and libraries) are used correctly. Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR to locate lldb, and set PATH and LD_LIBRARY_PATH. When doing a stand-alone build, these variables represent the installed LLVM. As a result, tests either fail due to missing lldb executable or use an earlier installed LLDB version rather than the one being built. To solve this, additional LLDB_TOOLS_DIR and LLDB_LIBS_DIR variables are added and populated using LLVM_*_OUTPUT_INTDIR. Those variables contain directories used to output built executables and libraries. In stand-alone builds, they represent the build-tree directories used by LLDB. In integrated builds, they have the same values as LLVM_*_DIR and therefore using them does not harm. The new variables are prepended to PATH and LD_LIBRARY_PATH to ensure that freshly built binaries are preferred over potentially earlier installed ones. Furthermore, paths used to locate various tools are updated to match appropriate locations. Differential Revision: https://reviews.llvm.org/D29985 llvm-svn: 295621
* [CMake] Fix standalone buildChris Bieneman2016-10-211-2/+4
| | | | | | not and FileCheck targets may not be defined in standalone builds. llvm-svn: 284854
* [lit] Don't assume you'll find debugserverHal Finkel2016-10-071-1/+3
| | | | | | | | | On Linux, there is no "debugserver" process, and the RUN-line substitution will fail if you try to substitute '%debugserver' with None. Fixes PR30492. llvm-svn: 283520
* Fix regex in lldb lit test TestCallStopAndContinueTim Hammerquist2016-10-031-1/+1
| | | | | | https://reviews.llvm.org/D25167 llvm-svn: 283082
* [cmake] Don't depend on lldb-server unless it's built.Zachary Turner2016-09-151-1/+6
| | | | llvm-svn: 281661
* Fixing bot failuresChris Bieneman2016-09-151-1/+3
| | | | | | Need to only add debugserver as a test dependency on Darwin. llvm-svn: 281652
* [LIT] First pass of LLDB LIT supportChris Bieneman2016-09-1512-2/+255
| | | | | | | | | | | | | | | | | | | | | Summary: This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT. With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB. The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used. The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories. The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows. Reviewers: zturner, labath, jingham, tfiala Subscribers: beanz, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D24591 llvm-svn: 281651
* Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov2016-04-162-4/+4
| | | | | | | | | | | | 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: 266522
* Rename MSVC top-level folder to avoid name collision.Zachary Turner2016-01-131-1/+1
| | | | | | | | | | | | | | If you have two folders with the same name but different cases, MSBuild gets confused and generates an error when building from within Visual Studio. This patch renames it so that the cases of all folders named "LLDB tests" match. Patch by Jonathan Meier Differential Revision: http://reviews.llvm.org/D16150 llvm-svn: 257684
* Create a check-lldb-unit target to run unit tests.Zachary Turner2015-03-135-0/+258
llvm-svn: 232212
OpenPOWER on IntegriCloud