Commit Graph

88 Commits

Author SHA1 Message Date
Eric Fiselier
49abdbcca3 Dont link -lrt in the testsuite on linux unless using sanitizers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@248986 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-01 06:15:26 +00:00
Eric Fiselier
cae4caba73 Move __lazy_* metafunctions to type traits and add tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246408 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-31 03:50:31 +00:00
Eric Fiselier
408369b7c9 Suppress clang warnings in some tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246399 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-30 22:04:20 +00:00
Eric Fiselier
87813277b3 Finally get the test suite passing in C++03!!
After months of work there are only 4 tests still failing in C++03.
This patch fixes those tests.

All of the libc++ builders should be green.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-28 05:46:17 +00:00
Eric Fiselier
031a3d203a [libcxx] Mark most test/std/future tests as UNSUPPORTED in C++03
Summary:
This patch marks *most* tests for `std::promise`, `std::future` and `std::shared_future` as unsupported in C++03. These tests fail in C++03 mode because they attempt to copy a `std::future` even though it is a `MoveOnly` type. AFAIK the missing move-semantics in `std::future` is the only reason these tests fail but without move semantics these classes are useless. For example even though `std::promise::set_value` and `std::promise::set_exception(...)` work in C++03 `std::promise` is still useless because we cannot call `std::promise::get_future(...)`.

It might be possible to hack `std::move(...)` like we do for `std::unique_ptr` to make the move semantics work but I don't think it is worth the effort. Instead I think we should leave the `<future>` header as-is and mark the failing tests as `UNSUPPORTED`. I don't believe there are any users of `std::future` or `std::promise` in C++03 because they are so unusable. Therefore I am not concerned about losing test coverage and possibly breaking users. However because there are still parts of `<future>` that work in C++03 it would be wrong to `#ifdef` out the entire header.

@mclow.lists Should we take further steps to prevent the use of `std::promise`, `std::future` and `std::shared_future` in C++03?


Note: This patch also cleans up the tests and converts them to use `support/test_allocator.h` instead of a duplicate class in `test/std/futures/test_allocator.h`.

Reviewers: mclow.lists

Subscribers: vsk, mclow.lists, cfe-commits

Differential Revision: http://reviews.llvm.org/D12135

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246271 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-28 05:06:04 +00:00
Eric Fiselier
e94b4840ef [libcxx] Add special warning flag detection logic to compiler.py
Summary: Detecting `-Wno-<warning>` flags can be tricky with GCC (See https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html). This patch adds a special `addWarningFlagIfSupported(<flag>)` method to the test compiler object that can be used to add warning flags. The goal of this patch is to help get the test suite running with more warnings.

Reviewers: danalbert, jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11333

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246069 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-26 20:17:33 +00:00
Eric Fiselier
4add27b763 Move test/std/utilities/date.time to proper stable name utilities/time/date.time
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245877 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:27:25 +00:00
Jonathan Roelofs
5e91fa1eec Misc drive-by cleanups. NFC
http://reviews.llvm.org/D12294


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245876 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:20:07 +00:00
Eric Fiselier
db61736491 Fix one last dynarray test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245528 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-20 00:20:05 +00:00
Eric Fiselier
fae0070cfc Fix more uses of uninitialized values in dynarray
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245525 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-20 00:10:22 +00:00
Eric Fiselier
4c4d1aac49 Cleanup failing dynarray tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245522 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-19 23:33:18 +00:00
Alexey Samsonov
0a6d1e2938 Replace __asan_set_error_exit_code() with __sanitizer_set_death_callback()
Summary: We are going to remove the former soon.

Reviewers: EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12117

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245467 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-19 17:28:01 +00:00
Eric Fiselier
7175a07921 [libcxx] Add <experimental/any> v2.
Summary:
This patch adds the second revision of <experimental/any>. 
I've been working from the LFTS draft found at this link. https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#any



Reviewers: danalbert, jroelofs, K-ballo, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6762

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@243728 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 02:24:58 +00:00
Eric Fiselier
938c96ef53 [libcxx] Add support for sanitizers on OS X.
Summary: This patch adds special configuration logic to find the compiler_rt libraries required by sanitizers on OS X. The supported sanitizers are Address and Undefined.

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11381

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242858 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 00:33:36 +00:00
Eric Fiselier
fd9bbf52cd Fix warnings in unordered_map
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242634 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-19 03:16:47 +00:00
Eric Fiselier
02bb4bdb49 Fix warnings in array and assoc containers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-18 23:56:04 +00:00
Eric Fiselier
212714f805 Cleanup warnings in test/std/depr
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242627 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-18 22:51:51 +00:00
Eric Fiselier
3a07a2f4f3 Fix warnings in test/std/algorithms
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242626 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-18 21:53:16 +00:00
Eric Fiselier
7b86ce5cc4 Fix warnings in test/std/language.support
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242624 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-18 21:17:16 +00:00
Eric Fiselier
7d439a455d Add missing instrumentation in vector::insert - Patch from Anna Zaks
This patch was reviewed as D10859. http://reviews.llvm.org/D10859


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242617 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-18 18:22:12 +00:00
Eric Fiselier
4f55ef701a Fix error string in test suite
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241757 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-08 23:10:20 +00:00
Eric Fiselier
c6e466911f [libcxx] Add atomic_support.h header to src that handles needed atomic operations.
Summary:
In some places in libc++ we need to use the `__atomic_*` builtins. This patch adds a header that provides access to those builtins in a uniform way from within the dylib source.

If the compiler building the dylib does not support these builtins then a warning is issued.

Only relaxed loads are needed within the headers. A singe function to do these relaxed loads has been added to `<memory>`.

This patch applies the new atomic builtins to `__shared_count` and `call_once`.

Reviewers: mclow.lists

Subscribers: majnemer, jroelofs, cfe-commits

Differential Revision: http://reviews.llvm.org/D10406

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241532 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07 00:27:16 +00:00
Eric Fiselier
faaf5ee349 Automatically detect and use clang verify in failure tests.
Automatically enable clang verify whenever the '-verify-ignore-unexpected' flag
is supported.
Failure tests are run using verify if they contain one or more "expected-*"
diagnostics tags. Otherwise they are run normally.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241492 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-06 19:56:45 +00:00
Ed Schouten
323ade3e70 Make support for thread-unsafe C functions optional.
One of the aspects of CloudABI is that it aims to help you write code
that is thread-safe out of the box. This is very important if you want
to write libraries that are easy to reuse. For CloudABI we decided to
not provide the thread-unsafe functions. So far this is working out
pretty well, as thread-unsafety issues are detected really early on.

The following patch adds a knob to libc++,
_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable
thread-unsafe functions that can easily be avoided in practice. The
following functions are not thread-safe:

- <clocale>: locale handles should be preferred over setlocale().
- <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over
  their non-restartable counterparts.
- <ctime>: asctime(), ctime(), gmtime() and localtime() are not
  thread-safe. The first two are also deprecated by POSIX.

Differential Revision:	http://reviews.llvm.org/D8703
Reviewed by:	marshall


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@240527 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-24 08:44:38 +00:00
Eric Fiselier
fdae69aa13 Fix PR12999 - unordered_set::insert calls operator new when no insert occurs
Summary:
when `unordered_set::insert(value_type&&)` was called it would be treated like `unordered_set::emplace(Args&&)` and it would allocate and construct a node before trying to insert it.
This caused unnecessary allocations when the value was already in the set. This patch adds an overload to `__hash_table::__insert_unique` that specifically handles `value_type&&` more link `value_type const &`. 

This patch also adds a single unified insert function for values into  `__hash_table` called `__insert_unique_value` that handles the cases for `__insert_unique(value_type&&)` and `__insert_unique(value_type const &)`. 

This patch fixes PR12999: http://llvm.org/bugs/show_bug.cgi?id=12999.




Reviewers: mclow.lists, titus, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D7570

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@239666 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-13 07:18:32 +00:00
Eric Fiselier
2cd0a2e4e7 Mark __convert_to_integral test as XFAIL in c++03
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238271 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-27 01:02:51 +00:00
Eric Fiselier
8f1d85fde5 Add test macros header to remove dependance on __config macros.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-27 00:28:30 +00:00
Eric Fiselier
5d663441e7 Address @danalberts comments on r237700
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237740 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-19 23:10:32 +00:00
Eric Fiselier
d539803d4b Fix uninitialized values and bad enum conversions found by UBSAN.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237738 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-19 23:03:57 +00:00
Eric Fiselier
a985b8cc79 Add compiler flag test support to LIT. Fix new/delete tests on apple-clang.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237700 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-19 15:15:53 +00:00
Logan Chien
21f5b24e2d libcxx: Enhance lit test command in verbose mode.
Print both the compiler command and linker command so that it will be
easier for developers to reproduce the failed test cases.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237530 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-17 00:24:11 +00:00
Evgeniy Stepanov
56a8c6438a Implement std::experimental::sample.
Following specification in "C++ Extensions for Library Fundamentals":
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html#alg.random.sample



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237264 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 16:55:41 +00:00
Marshall Clow
46a7ec9a3d Fix some preprocessor directives that were generating warnings in the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@235999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-28 16:52:30 +00:00
Eric Fiselier
bf9653d85f [libcxx] Add code coverage configuration to CMake and LIT.
Summary:
This patch adds configuration to CMake and LIT for running the libc++ test-suite to generate code coverage.

To use code coverage use following instructions.

* Find the clang resource dir using `$CXX -print-search-dirs`. Let <library-dir> be the first library search directory.
* `cmake <regular-options> -DLIBCXX_GENERATE_COVERAGE=ON -DLIBCXX_COVERAGE_LIBRARY=<library-dir>/lib/<platform>/libclang_rt.profile.a <source>`
* `make cxx`
* `make check-libcxx`
* `make generate-libcxx-coverage`


The reason I want this patch upstreamed is so I can setup a bot that generates code coverage and posts in online for every revision. 



Reviewers: mclow.lists, jroelofs, danalbert

Reviewed By: danalbert

Differential Revision: http://reviews.llvm.org/D8716

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233669 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 04:15:45 +00:00
Eric Fiselier
f68d637860 Allow enabling CCache through an env variable. This helps enable/disable the option on buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233659 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 01:41:32 +00:00
Ed Schouten
abd06b4c9b Make the presence of stdin and stdout optional.
The idea behind Nuxi CloudABI is that it is targeted at (but not limited to)
running networked services in a sandboxed environment. The model behind stdin,
stdout and stderr is strongly focused on interactive tools in a command shell.
CloudABI does not support the notion of stdin and stdout, as 'standard
input/output' does not apply to services. The concept of stderr does makes
sense though, as services do need some mechanism to log error messages in a
uniform way.

This patch extends libc++ in such a way that std::cin and std::cout and the
associated <cstdio>/<cwchar> functions can be disabled through the flags
_LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time
it attempts to clean up src/iostream.cpp a bit. Instead of using a single array
of mbstate_t objects and hardcoding the array indices, it creates separate
objects that declared next to the iostream objects and their buffers. The code
is also restructured by interleaving the construction and setup of c* and wc*
objects. That way it is more obvious that this is done identically.

The c* and wc* objects already have separate unit tests. Make use of this fact
by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in
both directions. If stdin or stdout is disabled, these tests will therefore
test for the absence of c* and wc*.

Differential Revision:	http://reviews.llvm.org/D8340


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26 14:35:46 +00:00
Eric Fiselier
9959bf0850 Fix DYNLD_LIBRARY_PATH to include the ABI path if specified
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232527 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 19:37:26 +00:00
Jonathan Roelofs
9be398d6c1 Fix failed test command repro printing for *.pass.cpp tests
Before we were printing out the compile command twice, which isn't that useful.

Thanks EricWF for the report!


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232526 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 19:32:24 +00:00
Eric Fiselier
13858ee056 [libcxx] Add <experimental/tuple> header for LFTS.
Summary:
This patch adds the `<experimental/tuple>` header (almost) as specified in the latest draft of the library fundamentals TS.

The main changes in this patch are:

1. Added variable template `tuple_size_v`
2. Added function `apply(Func &&, Tuple &&)`.
3. Changed `__invoke` to be `_LIBCPP_CONSTEXPR_AFTER_CXX11`.

The `apply(...)` implementation uses `__invoke` to invoke the given function. `__invoke` already provides the required functionality. Using `__invoke` also allows `apply` to be used on pointers to member function/objects as an extension. In order to facilitate this `__invoke` has to be marked `constexpr`. 



Test Plan:
Each new feature was tested. 

The test cases for `tuple_size_v` are as follows:
1. tuple_size_v.pass.cpp
  - Check `tuple_size_v` on cv qualified tuples, pairs and arrays.
2. tuple_size_v.fail.cpp
  - Test on reference type.
3. tuple_size_v_2.fail.cpp
  - Test on non-tuple
4. tuple_size_v_3.fail.cpp
  - Test on pointer type.

The test cases for tuple.apply are as follows:

1. arg_type.pass.cpp
   - Ensure that ref/pointer/cv qualified types are properly passed.
2. constexpr_types.pass.cpp
   - Ensure constexpr evaluation of apply is possible for `tuple` and `pair`.
3. extended_types.pass.cpp
   - Test apply on function types permitted by extension.
4. large_arity.pass.cpp
   - Test that apply can evaluated on tuples and arrays with large sizes.
5. ref_qualifiers.pass.cpp
   - Test that apply respects ref qualified functions.
6. return_type.pass.cpp
   - Test that apply returns the proper type.
7. types.pass.cpp
   - Test apply on function types as required by LFTS.

Reviewers: mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4512

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 18:28:14 +00:00
Ed Schouten
b33ae5ba7d Add option to disable access to the global filesystem namespace.
Systems like FreeBSD's Capsicum and Nuxi CloudABI apply the concept of
capability-based security on the way processes can interact with the
filesystem API. It is no longer possible to interact with the VFS
through calls like open(), unlink(), rename(), etc. Instead, processes
are only allowed to interact with files and directories to which they
have been granted access. The *at() functions can be used for this
purpose.

This change adds a new config switch called
_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE. If set, all functionality
that requires the global filesystem namespace will be disabled. More
concretely:

- fstream's open() function will be removed.
- cstdio will no longer pull in fopen(), rename(), etc.
- The test suite's get_temp_file_name() will be removed. This will cause
  all tests that use the global filesystem namespace to break, but will
  at least make all the other tests run (as get_temp_file_name will not
  build anyway).

It is important to mention that this change will make fstream rather
useless on those systems for now. Still, I'd rather not have fstream
disabled entirely, as it is of course possible to come up with an
extension for fstream that would allow access to local filesystem
namespaces (e.g., by adding an openat() member function).

Differential revision:	http://reviews.llvm.org/D8194
Reviewed by:		jroelofs (thanks!)


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232049 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-12 15:44:39 +00:00
Dan Albert
761d98d2f7 Copy data files to the remote runner.
Summary:
The data files for any given test will be in the same directory as the
source with a file name that matches *.dat. To make these available to
tests running remotely (such as over adb or ssh), copy them into the
test's remote working directory.

Note that we will perform more copies than we actually need. The data
files in the directory may only be used by one of the tests, but will
be copied for all tests in the same directory.

This patch also moves the remote test binary into the working
directory (previously it was only invoked from the working directory
rather than existing in it).

Reviewers: EricWF, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8118

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231864 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10 22:31:49 +00:00
Eric Fiselier
07a4bec1dd Use generic feature name for sanitizers that replace new and delete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231841 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10 20:46:04 +00:00
Dan Albert
c6c1a1ee75 Factor out RemoteExecutor from SSHExecutor.
Summary:
A lot of the pieces of SSHExecutor can be shared with my AdbExecutor
(https://android-review.googlesource.com/#/c/138807/).

Reviewers: EricWF, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8117

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231815 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10 18:43:16 +00:00
Dan Albert
cebeadf30b Oops. This arg is passed, just ignored.
We should probably be using this argument to find the data files for
the tests, but that isn't implemented yet.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231498 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 18:51:25 +00:00
Dan Albert
ca27dd0a23 Fix the PrefixExecutor.
The PrefixExecutor wasn't passing the exe_path down the chain, so the
command was overriding that, the work_dir was being passed as the
command, and so on.

I've cleaned up a few pylint issues while I was here.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231496 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 18:35:45 +00:00
Eric Fiselier
ab2b9f526c Remove unneeded python import
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231453 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 06:22:22 +00:00
Eric Fiselier
03e3302cc1 Run ShTests when the executor is an instance of LocalExecutor
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231404 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 20:27:01 +00:00
Marshall Clow
3b1d283788 Move the <dynarray> tests out of the std/ hierarchy, since it's not really part of the standard any more.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231311 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-04 23:09:15 +00:00
Jonathan Roelofs
83d7735487 Add remote testing support to the lit config.
Executors can be specified at configure time by using the -DLIBCXX_EXECUTOR=""
option. Examples include:

  $ cmake <other_flags> -DLIBCXX_EXECUTOR="TimeoutExecutor(30,LocalExecutor())"
      This runs individual tests with a maximum duration

  $ cmake <other_flags> -DLIBCXX_EXECUTOR="SSHExecutor('hostname','username')"
      This runs tests on a remote target, using scp to shuttle binaries to the
      target, and ssh to invoke commands there.

  $ cmake <other_flags> -DLIBCXX_EXECUTOR="PrefixExecutor('/path/to/run/script',LocalExecutor())"
      This assumes the script knows how to copy run the executables passed to it,
      and allows for the ultimate control. This is useful for running things
      inside emulators like Valgrind & QEMU.

TODO: This doesn't claim to support ShTest tests yet, that will take a bit more
  thought & finagling (I'm still not sure how to orchestrate copy-in for those cases.

  I've also punted on what to do about tests that read data files. The testsuite
  has several tests that need to read *.dat files placed next to them, and
  currently those aren't copied over when using, say, an SSHExecutor. The
  affected tests are:

     libc++ :: std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp
     libc++ :: std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp
     libc++ :: std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp

Note: One thing to watch out for when using the SSHExecutor for cross-testing is
  that you'll also want to specify a TargetInfo object (so that the host's
  features aren't used for available-features checks and flags setup).

http://reviews.llvm.org/D7380


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230592 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:42:17 +00:00
Eric Fiselier
45969ecfcd [libcxx] Move to using libc++abi2.exp as the default symbol list for libc++
Summary:
libc++abi2.exp should be used whenever `cxxabi.h` defines `_LIBCPPABI_VERSION`. This macro was added to libc++abi in 2012 in r149632. For this reason we should use libc++abi2.exp as default unless otherwise specified.

Also when building against an in-tree libc++abi we definitely want to use libc++abi2.exp.

I would love to know what OSX was the last to use libc++abi.exp but I can only test on 10.9.


Reviewers: danalbert, mclow.lists, EricWF

Reviewed By: EricWF

Subscribers: meadori, cfe-commits

Differential Revision: http://reviews.llvm.org/D7773

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230119 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 02:26:24 +00:00