[Lldb-commits] [PATCH] D30984: Centralize libc++ test skipping logic

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 15 08:39:39 PDT 2017


labath created this revision.
Herald added a subscriber: srhines.
Herald added a reviewer: EricWF.

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.


https://reviews.llvm.org/D30984

Files:
  packages/Python/lldbsuite/test/dotest.py
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
  packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.cpp
  packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/create_during_step/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/multi_break/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp
  packages/Python/lldbsuite/test/lldbplatformutil.py
  packages/Python/lldbsuite/test/make/Makefile.rules
  packages/Python/lldbsuite/test/make/pseudo_barrier.h
  packages/Python/lldbsuite/test/make/test_common.h
  packages/Python/lldbsuite/test/test_categories.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30984.91878.patch
Type: text/x-patch
Size: 17193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170315/ecf06602/attachment.bin>


More information about the lldb-commits mailing list