summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support/filesystem_test_helper.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow the libc++ build/source paths to contain symlinks.Eric Fiselier2016-06-211-0/+2
| | | | | | | | The filesystem tests were expecting the paths to the build/source directories did not contain any symlinks. This patch resolves those symlinks before running the test suite. llvm-svn: 273323
* Fix SleepFor(...) helper when a monotonic clock is not available.Eric Fiselier2016-06-181-3/+7
| | | | | | | | Single threaded builds often don't provide a monotonic clock, so we can't always provide a monotonic SleepFor(...) implementation. Hopefully this won't cause the builds to hang. llvm-svn: 273091
* Use monotonic clock in synthetic SleepFor test helperEric Fiselier2016-06-181-2/+2
| | | | llvm-svn: 273089
* Fix 3 bugs in filesystem tests and implementation.Eric Fiselier2016-06-181-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following bugs, all of which were discovered while testing a 32 bit build on a 64 bit machine. * path.itr/iterator.pass.cpp has undefined behavior. 'path::iterator' stashes the value of the element inside the iterator. This violates the BiDirIterator requirements but is allowed for path::iterator. However this means that using reverse_iterator<path::iterator> has undefined behavior because it assumes that 'Iter tmp = it; return *tmp' will not create a dangling reference. However it does, and this caused this particular test to fail. * path.native.obs/string_alloc.pass.cpp tested the SSO with a long string. On 32 bit builds std::wstring only has the SSO for strings of size 2. The test was using a string of size 4. * fs.op.space/space.pass.cpp had overflows while calculating the expected values. The fix here is to convert the statvfs data members to std::uintmax_t before multiplying them. The internal implementation already does this but the tests needed to do it as well. llvm-svn: 273078
* Get filesystem tests passing for single-threaded configurations.Eric Fiselier2016-06-171-0/+11
| | | | llvm-svn: 273054
* Add Filesystem TS -- CompleteEric Fiselier2016-06-171-0/+370
Add the completed std::experimental::filesystem implementation and tests. The implementation supports C++11 or newer. The TS is built as part of 'libc++experimental.a'. Users of the TS need to manually link this library. Building and testing the TS can be disabled using the CMake option '-DLIBCXX_ENABLE_FILESYSTEM=OFF'. Currently 'libc++experimental.a' is not installed by default. To turn on the installation of the library use '-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON'. llvm-svn: 273034
OpenPOWER on IntegriCloud