This is an archive of the discontinued LLVM Phabricator instance.

Restructure existing test suite to follow libc++ standard layout
AbandonedPublic

Authored by rodgert on Mar 7 2019, 2:17 PM.

Details

Reviewers
EricWF
ldionne
Summary

Includes basic CMake/CTest driver for restructured tests

remove old test directory, rename testsuite->test

Event Timeline

rodgert created this revision.Mar 7 2019, 2:17 PM
ldionne requested changes to this revision.Mar 12 2019, 7:56 AM
ldionne added inline comments.
test/CMakeLists.txt
3

I don't understand why we're changing this file. The previous one works just as well, but it does not require adding CMakeLists.txts all over the place in the tree (which just won't scale to the number of tests that will be in the suite).

The next improvement over this should be to run the tests with lit (but should be tackled separately).

This revision now requires changes to proceed.Mar 12 2019, 7:56 AM

To be clear about what I'd like: please do not add CMakeLists.txts all over the tree, instead keep relying on GLOB_RECURSE like my current test/CMakeLists.txt does.

To be clear about what I'd like: please do not add CMakeLists.txts all over the tree, instead keep relying on GLOB_RECURSE like my current test/CMakeLists.txt does.

Sure, I can make that change. The CMakeLists.txt's were generated by a migration script I wrote to restructure the original test suite. I expected to nuke all of that anyway once lit was tackled.

rodgert updated this revision to Diff 191214.Mar 18 2019, 5:11 PM
  • Remove nested CMakeLists.txt in test/std, replace with glob-recurse
ldionne requested changes to this revision.Mar 20 2019, 12:32 PM
ldionne added inline comments.
test/CMakeLists.txt
14–15

Please use target_include_directories("pstl-${target}" PRIVATE "${CMAKE_CURRENT_LIST_DIR}") below instead. "${PROJECT_SOURCE_DIR}/include" shouldn't be necessary at all since the tests link against pstl::ParallelSTL, which has "${PROJECT_SOURCE_DIR}/include" as an INTERFACE include directory.

17

Please use target_compile_definitions("pstl-${target}" PRIVATE -DPSTL_STANDALONE_TESTS) below instead. Setting global flags is frowned upon in modern CMake.

This revision now requires changes to proceed.Mar 20 2019, 12:32 PM
rodgert abandoned this revision.Mar 27 2019, 2:34 PM

Applied by "other means"

test/std/utilities/memory/specialized.algorithms/uninitialized_fill_destroy.pass.cpp