summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/make
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][test_suite] skip tests of `libstdcpp` on Android and clean upAlex Langford2019-07-231-18/+12
| | | | | | | | | | | | | | | | Summary: Delete the android target from `libstdcpp` test category, since android no longer support libstdcxx Reviewers: xiaobai, labath Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64771 llvm-svn: 366770
* [lldb_test_suite] Fix lldb test suite targeting remote AndroidAlex Langford2019-07-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixed `Android.rules` for running test suite on remote android - the build configuration is not compatible with ndk structure, change it to link to static libc++ - generally clang should be able to use libc++ and will link against the right library, but some libc++ installations require the user manually link libc++abi. - add flag `-lc++abi` to fix the test binary build failure Added `skipIfTargetAndroid` `skipUnlessTargetAndroid` for better test support - the `skipIfPlatform` method will ask `lldbplatformutil.getPlatform()` for platform info which is actually the os type, and //Android// is not os type but environment - create this function to handle the android target condition **To Run Test on Remote Android** 1 start lldb-server on your devices 2 run lldb-dotest with following configuration: `./lldb-dotest --out-of-tree-debugserver --arch aarch64 --platform-name remote-android --platform-url connect://localhost:12345 --platform-working-dir /data/local/tmp/ --compiler your/ndk/clang` Reviewers: xiaobai, labath Reviewed By: labath Subscribers: labath, javed.absar, kristof.beyls, srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64118 llvm-svn: 365561
* Makefile.rules: Normalize use of trailing slashes in path variables.Adrian Prantl2019-03-211-4/+4
| | | | llvm-svn: 356711
* Add ability to import std module into expression parser to improve C++ debuggingRaphael Isemann2019-03-121-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is the MVP version of importing the std module into the expression parser to improve C++ debugging. What happens in this patch is that we inject a `@import std` into our expression source code. We also modify our internal Clang instance for parsing this expression to work with modules and debug info at the same time (which is the main change in terms of LOC). We implicitly build the `std` module on the first use. The C++ include paths for building are extracted from the debug info, which means that this currently only works if the program is compiled with `-glldb -fmodules` and uses the std module. The C include paths are currently specified by LLDB. I enabled the tests currently only for libc++ and Linux because I could test this locally. I'll enable the tests for other platforms once this has landed and doesn't break any bots (and I implemented the platform-specific C include paths for them). With this patch we can now: * Build a libc++ as a module and import it into the expression parser. * Read from the module while also referencing declarations from the debug info. E.g. `std::abs(local_variable)`. What doesn't work (yet): * Merging debug info and C++ module declarations. E.g. `std::vector<CustomClass>` doesn't work. * Pretty much anything that involves the ASTImporter and templated code. As the ASTImporter is used for saving the result declaration, this means that we can't call yet any function that returns a non-trivial type. * Use libstdc++ for this, as it requires multiple include paths and Clang only emits one include path per module. Also libstdc++ doesn't support Clang modules without patches. Reviewers: aprantl, jingham, shafik, friss, davide, serge-sans-paille Reviewed By: aprantl Subscribers: labath, mgorny, abidh, jdoerfert, lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D58125 llvm-svn: 355939
* Makefile.rules: Upstream SDKROOT handling code for Darwin.Adrian Prantl2019-03-111-0/+18
| | | | llvm-svn: 355843
* [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSDMichal Gorny2019-03-061-0/+5
| | | | | | | | | | | | Pass appropriate -L and -Wl,-rpath flags pointing out to the LLVM library directory on NetBSD. This is necessary since clang on NetBSD requires libc++ but it is not installed as part of the system by default. For the purpose of running buildbot, we want LLDB to use just-built libc++. Differential Revision: https://reviews.llvm.org/D58630 llvm-svn: 355502
* [lldb] [test] Do not link -ldl on NetBSDMichal Gorny2019-02-211-0/+9
| | | | | | | | | | | | | | | | Fix the load_* using test Makefiles not to link -ldl on NetBSD. There is no such a library on NetBSD, and dlopen() is available without a library. Quoting the manpage: (These functions are not in a library. They are included in every dynamically linked program automatically.) To resolve this portably, introduce a new USE_LIBDL option. If it set to 1, Makefile.rules automatically appends -ldl on platforms needing it. Differential Revision: https://reviews.llvm.org/D58517 llvm-svn: 354617
* Move -fcxx-modules to MANDATORY_MODULE_BUILD_CFLAGS (NFC)Adrian Prantl2019-02-201-3/+4
| | | | llvm-svn: 354418
* [lldbsuite] Build with -gdwarf on WindowsStella Stamenova2018-11-291-0/+6
| | | | | | Earlier this month there was a change in clang that defaulted to using codeview rather than dwarf on Windows. Since all the tests rely on dwarf, we need to explicitly request dwarf when building on Windows. llvm-svn: 347924
* [lldbsuite] Invoke sed on Windows to determine the cache dir for clangStella Stamenova2018-11-191-30/+31
| | | | | | | | | | | | Summary: In order to invoke sed on Windows, we need to quote the command correctly. Since we already have commands which do that, move the definitions at the beginning of the file and then re-use them for each command. Reviewers: aprantl, zturner Subscribers: teemperor, lldb-commits Differential Revision: https://reviews.llvm.org/D54709 llvm-svn: 347243
* Revert "Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD"Zachary Turner2018-11-181-2/+2
| | | | | | | This breaks many tests on Windows, which now all fail with an error such as "Unable to read memory at address <xxxxxxxx>". llvm-svn: 347174
* Just don't even attempt to invoke sed on Windows.Adrian Prantl2018-11-171-0/+5
| | | | llvm-svn: 347125
* Revert "Makefile.rules: Fix the windows-sed-quoting issue harder."Adrian Prantl2018-11-171-11/+11
| | | | llvm-svn: 347124
* Makefile.rules: Fix the windows-sed-quoting issue harder.Adrian Prantl2018-11-171-9/+11
| | | | llvm-svn: 347120
* Makefile.rules: Degrade gracefully on Windows machines without sed.Adrian Prantl2018-11-161-6/+3
| | | | llvm-svn: 347104
* Makefile.rules: Use a shared clang module cache directory.Adrian Prantl2018-11-161-1/+9
| | | | | | | | | | | | | | | Just to be safe, up until now each test used its own Clang module cache directory. Since the compiler within one testsuite doesn't change it is just as safe to share a clang module directory inside the LLDB test build directory. This saves us from compiling tens of gigabytes of redundant Darwin and Foundation .pcm files and also speeds up running the test suite quite significantly. rdar://problem/36002081 Differential Revision: https://reviews.llvm.org/D54601 llvm-svn: 347056
* Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLDNathan Lanza2018-11-151-2/+2
| | | | | | | | | | | | | | | Summary: This commit implements basic DidAttach and DidLaunch for the windows DynamicLoader plugin which allow us to load shared libraries from the inferior. Reviewers: sas, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D54544 llvm-svn: 346994
* Force SHELL to be cmd.exe on Windows for the test suiteNathan Lanza2018-11-151-0/+11
| | | | | | | | | | | | | | | | Summary: Windows make will search for other shells and choose those over cmd if available (e.g. C:\cygdrive\bin\sh.exe). This shell has numerous issues with path handling (/ vs \\ vs \ and C:). So default to using cmd.exe which is known to work. Reviewers: zturner, sas, xiaobai Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D54510 llvm-svn: 346993
* Makefile.rules: Don't use code signing on macOS; it isn't necessary.Adrian Prantl2018-10-311-2/+3
| | | | llvm-svn: 345768
* Tiny testsuite tweaks. Don't run the apple simulatorJason Molenda2018-10-161-0/+7
| | | | | | | | | | tests when targetting a device. Add an include to safe-to-call-func to work around a modules issue with a certain combination of header files. Add rules for Darwin systems to ad-hoc codesign binaries that the testsuite builds. llvm-svn: 344635
* Enable C++ tests to run in the -gmodules configuration on Darwin.Adrian Prantl2018-10-011-0/+4
| | | | | | | | This addresses PR36048 (http://llvm.org/bugs/show_bug.cgi?id=36048) rdar://problem/36776281 llvm-svn: 343545
* Makefile.rules: Use an absolute path to the module cache directory.Adrian Prantl2018-08-211-1/+2
| | | | | | This change is NFC, but it makes it more obvious in log files what happened. llvm-svn: 340286
* Android.rules: Use libc++ by defaultPavel Labath2018-06-222-9/+9
| | | | | | | | | | | | | | | | libstdc++ will soon be dropped from the android NDK. This patch makes sure we are prepared for that by using libc++ in tests by default (i.e., except for libstdc++ data formatter tests). Only a couple of small tweaks were needed to make this work: - Add the libc++ include paths to CXXFLAGS only. This was necessary to make the tests compile with -fmodules. The modules tests have been disabled, but this way, they will be ready for them if they are enabled. - in one test I had to add an explicit std::string copy to make sure the copy constructor is there for the expression evaluator to find it. llvm-svn: 335344
* [lit, lldbsuite] Update the lldbsuite to correctly run tests on windows and ↵Aaron Smith2018-04-241-5/+5
| | | | | | | | | | | | | | | | | | | windows server Summary: The new script to run the lldbtests as part of lit invokes each test by calling dotest.py, however, we cannot rely on the system to always correctly interpret the script as python causing the tests to be unresolved on windows (at least). To fix this, we need to make sure that the first parameter in the command line is the python executable itself. In Makefile.rules, there are a number of windows specific definitions that rely on the HOST_OS being set as Windows_NT but the logic detecting the OS currently does not detect server versions of windows correctly. This change updates the logic to detect windows server as well. Reviewers: asmith, labath, JDevlieghere, zturner Reviewed By: JDevlieghere, zturner Subscribers: zturner, llvm-commits Differential Revision: https://reviews.llvm.org/D46020 llvm-svn: 330740
* [dotest] Use in-tree dsymutil on DarwinJonas Devlieghere2018-04-121-2/+2
| | | | | | | | | | | | | | | | | | | Summary: With the upstream implementation of dsymutil containing almost all functionality from the one shipped with Xcode, we want to use the in-tree version for running the test suite. This will also allow us to re-enable TestUnicodeSymbols which was failing because of the discrepancy in how Unicode symbols were hashed in lldb and older versions of dsymutil. Reviewers: aprantl, davide, jingham, labath Subscribers: mgorny, llvm-commits, lldb-commits Differential Revision: https://reviews.llvm.org/D45518 llvm-svn: 329889
* Only throw -fPIC when building a shared libraryAaron Smith2018-02-081-0/+5
| | | | | | | | | | | | | | | | | | Summary: Update makefiles to specify -fPIC in Makefile.rules and only throw -fPIC when building a shared library. This change is necessary to allow building the lldb tests on Windows where -fPIC is not a valid option. Update a few places to Python 3.x syntax Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: stella.stamenova, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42994 llvm-svn: 324671
* Compile the LLDB tests out-of-tree.Adrian Prantl2018-01-301-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of a discussion on lldb-dev, see http://lists.llvm.org/pipermail/lldb-dev/2018-January/013111.html for background. For each test (should be eventually: each test configuration) a separate build directory is created and we execute make VPATH=$srcdir/path/to/test -C $builddir/path/to/test -f $srcdir/path/to/test/Makefile -I $srcdir/path/to/test In order to make this work all LLDB tests need to be updated to find the executable in the test build directory, since CWD still points at the test's source directory, which is a requirement for unittest2. Although we have done extensive testing, I'm expecting that this first attempt will break a few bots. Please DO NOT HESITATE TO REVERT this patch in order to get the bots green again. We will likely have to iterate on this some more. Differential Revision: https://reviews.llvm.org/D42281 llvm-svn: 323803
* Use test-specific module caches to avoid stale header conflictsVedant Kumar2018-01-251-5/+7
| | | | | | | | | | | | | | | | | | | Stale global module caches cause problems for the bots. The modules become invalid when clang headers are updated by version control, and tests which use these modules fail to compile, e.g: fatal error: file '.../__stddef_max_align_t.h' has been modified since the module file '/var/.../Darwin.pcm' was built note: please rebuild precompiled header '/var/.../Darwin.pcm' Eventually we should transition to having just a single module cache to speed tests up. This patch should be just enough to fix the spurious bot failures due to stale caches. rdar://36479805, also related to llvm.org/PR36048 Differential Revision: https://reviews.llvm.org/D42277 llvm-svn: 323450
* Makefile.rules: compile all tests with -fno-limit-debug-infoPavel Labath2017-12-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This flag is on by default for darwin and freebsd, but off for linux. Without it, clang will sometimes not emit debug info for types like std::string. Whether it does this, and which tests will fail because of that depends on the linux distro and c++ library version. A bunch of tests were already setting these flags manually, but here instead I take a whole sale approach and enable this flag for all tests. Any test which does not want to have this flag (right now we have one such test) can turn it off explicitly via CFLAGS_EXTRAS+=$(LIMIT_DEBUG_INFO_FLAGS) This fixes a bunch of data formatter tests on red-hat. Reviewers: davide, jankratochvil Subscribers: emaste, aprantl, krytarowski, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D40717 llvm-svn: 319653
* Add float/vector registers for ppc64lePavel Labath2017-11-031-0/+3
| | | | | | | | | | | | | | | Summary: Add read and write functions for VSX, VMX and float registers and fix watchpoint size Reviewers: clayborg Reviewed By: clayborg Subscribers: eugene, labath, clayborg, nemanjai, kbarton, JDevlieghere, anajuliapc, gut, lbianc, lldb-commits Differential Revision: https://reviews.llvm.org/D39487 Patch by: Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br> llvm-svn: 317329
* Android.rules: build with "unified android headers"Pavel Labath2017-10-311-3/+5
| | | | | | | | | Unified headers will be the only way to build applications in NDK r16, and it also works with NDK r15. This also bumps the minimum supported android version to 16. llvm-svn: 316985
* Makefile.rules: move CFLAGS_EXTRAS to the end of compile linePavel Labath2017-10-251-5/+5
| | | | | | | | | This makes sure that any options specified there override generic compiler options. This fixes TestBreakpointIt.py llvm-svn: 316629
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-251-1/+19
| | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these tests, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures. I have seen some instability with the armv7 test runs, I may submit additional patches to address this. arm64 looks good. I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 314132
* Revert "Initial patchset to get the testsuite running against armv7 and ↵Chris Bieneman2017-09-251-1/+1
| | | | | | | | | | | | | arm64 iOS devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures." This patch has been causing LLDB test failures on ObjC tests. A test log may still be available here: http://lab.llvm.org:8080/green/view/LLDB/job/lldb/1650/ This reverts commit r314038. llvm-svn: 314122
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures. I have seen some instability with the armv7 test runs, I may submit additional patches to address this. arm64 looks good. I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 314038
* Revert this patch; I was emailing with Eugene and they have some other ↵Jason Molenda2017-09-211-1/+1
| | | | | | | | | changes going in today and don't want the two changes to confuse the situation with the build bots. I'll commit tomorrow once they're known good. llvm-svn: 313934
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. There will be some smaller follow-on patches. The changes to tools/lldb-server are verbose and I'm not thrilled with having to skip all of these tests manually. There are a few places where I'm making the assumption that "armv7", "armv7k", "arm64" means it's an ios device, and I need to review & clean these up with an OS check as well. (Android will show up as "arm" and "aarch64" so by pure luck they shouldn't cause problems, but it's not an assumption I want to rely on). I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 313932
* Revert "Android.rules: build x86 tests with -mstackrealign"Pavel Labath2017-07-061-4/+0
| | | | | | | | | | | Starting with android ndk r15, clang much more tests are affected by the -mstackrealign bugl (now nearly all functions are affected, and not just the ones requiring 16-byte alignment). Due to their numbers, Xfailing all of them is not a viable option, so we will just have to declare this configuration unsupported, and wait until ndk ships a clang version that has this bug fixed. llvm-svn: 307252
* Android.rules: build x86 tests with -mstackrealignPavel Labath2017-06-291-0/+4
| | | | | | | | | | | | | All android builds systems have switched to -mstackrealign for building x86 binaries, so follow their cue with our mini build system. This presently breaks just one test (TestReturnValue), and this is due to a compiler bug, which has already been fixed in clang, but it hasn't made it yet into the official NDK compiler. While I'm touching that test, I also remove an android-specific XFAIL, which is not relevant anymore. llvm-svn: 306683
* Android.rules: set "ar" path correctlyPavel Labath2017-05-021-0/+1
| | | | llvm-svn: 301918
* Android.rules: setup correct objcopy pathPavel Labath2017-04-121-4/+12
| | | | | | This fixes a couple of tests when using android clang as a compiler. llvm-svn: 300045
* Centralize libc++ test skipping logicPavel Labath2017-03-294-47/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to replace the different decorators we've had on each libc++ test with a single solution. Each libc++ will be assigned to the "libc++" category and a single central piece of code will decide whether we are actually able to run libc++ test in the given configuration by enabling or disabling the category (while giving the user the opportunity to override this). I started this effort because I wanted to get libc++ tests running on android, and none of the existing decorators worked for this use case: - skipIfGcc - incorrect, we can build libc++ executables on android with gcc (in fact, after this, we can now do it on linux as well) - lldbutil.skip_if_library_missing - this checks whether libc++.so is loaded in the proces, which fails in case of a statically linked libc++ (this makes copying executables to the remote target easier to manage). To make this work I needed to split out the pseudo_barrier code from the force-included file, as libc++'s atomic does not play well with gcc on linux, and this made every test fail, even though we need the code only in the threading tests. So far, I am only annotating one of the tests with this category. If this does not break anything, I'll proceed to update the rest. Reviewers: jingham, zturner, EricWF Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30984 llvm-svn: 299028
* Android.rules: Add libc++ supportPavel Labath2017-03-132-10/+26
| | | | | | | | | | | | | | | Summary: This adds support for building libc++ tests when targetting android. The tests are still not passing due to several other problems, but this way we can at least build them. Reviewers: eugene, EricWF, danalbert Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30737 llvm-svn: 297616
* Make the LLDB test suite work with MSVC 2017 on Windows.Zachary Turner2017-03-091-4/+6
| | | | llvm-svn: 297405
* Android.rules: fix computation of gcc toolchain directory on armPavel Labath2017-03-081-11/+11
| | | | | | | | The toolchain directory for arm android targets was computed incorrectly. The architecture part should be arm, and the environment part androideabi. This fixes that. llvm-svn: 297279
* Android.rules: add support for clang compilerPavel Labath2017-03-072-16/+45
| | | | | | | | | | | | | | Summary: building executables with the NDK clang requires -target and -gcc-toolchain arguments. Reviewers: eugene, danalbert Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30574 llvm-svn: 297145
* [Windows] Remove the #include <eh.h> hack.Zachary Turner2017-03-031-8/+0
| | | | | | | | | | Prior to MSVC 2015 we had to manually include this header any time we were going to include <thread> or <future> due to a bug in MSVC's STL implementation. This has been fixed in MSVC for some time now, and we require VS 2015 minimum, so we can remove this across all subprojects. llvm-svn: 296906
* Android.rules: fix building on macPavel Labath2017-03-031-1/+0
| | | | | | | realpath is not available as an executable on mac. I give up, I am just going to leave the path with ..'s in it. llvm-svn: 296885
* Android.rules: fix building on windowsPavel Labath2017-03-031-1/+1
| | | | | | | | $(realpath), which I guess is a make builtin, gives strange results on Windows. $(shell realpath) invokes the gnuwin external binary, which works correctly. llvm-svn: 296876
* testsuite/android: build test executables with the android ndk directlyPavel Labath2017-03-032-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This teaches the test makefiles about the Android NDK, so we are able to run the tests without first going through the make_standalone_toolchain script. The motivation for this is the ability to run both libc++ and libstdc++ tests together, which previously was not possible because make_standalone_toolchain bakes in the STL to use during toolchain creation time. The support for this is not present yet -- this change only make sure we don't regress for existing funcionality (gcc w/ libstdc++). Clang and libc++ support will be added later. I've checked that the mips android targets compile after this change, but I have no way of checking whether this breaks anything. If you are reading this and it broke you, let me know. Reviewers: tberghammer, danalbert Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30410 llvm-svn: 296869
OpenPOWER on IntegriCloud