Allow the libc++ build/source paths to contain symlinks.
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273323 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,6 +20,7 @@ namespace fs = std::experimental::filesystem;
|
||||
namespace StaticEnv {
|
||||
|
||||
inline fs::path makePath(fs::path const& p) {
|
||||
// env_path is expected not to contain symlinks.
|
||||
static const fs::path env_path = LIBCXX_FILESYSTEM_STATIC_TEST_ROOT;
|
||||
return env_path / p;
|
||||
}
|
||||
@@ -236,6 +237,7 @@ private:
|
||||
}
|
||||
|
||||
static bool checkDynamicTestRoot() {
|
||||
// LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT is expected not to contain symlinks.
|
||||
char* fs_root = std::getenv("LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT");
|
||||
if (!fs_root) {
|
||||
std::printf("ERROR: LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT must be a defined "
|
||||
|
||||
Reference in New Issue
Block a user