[libcxx-commits] [libcxx] 377a1c8 - [libcxx] Don't assume cwd name in std::filesystem tests

Sergej Jaskiewicz via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 12 05:08:31 PST 2020


Author: Sergej Jaskiewicz
Date: 2020-02-12T16:08:17+03:00
New Revision: 377a1c80e98951bb1c46b54c1f14400fba7f576f

URL: https://github.com/llvm/llvm-project/commit/377a1c80e98951bb1c46b54c1f14400fba7f576f
DIFF: https://github.com/llvm/llvm-project/commit/377a1c80e98951bb1c46b54c1f14400fba7f576f.diff

LOG: [libcxx] Don't assume cwd name in std::filesystem tests

Summary:
In `std::filesystem::proximate` tests we assume that the current working directory's name
is `fs.op.proximate`. This is fine when we're running the tests locally.

However, if we're running those tests on a remote machine via SSH, the directory layout may be
different. For example, currently we copy each test executable individually into
a temporary directory on the target board using SCP, so the assumption about the working directory name
doesn't necessarily hold.

This patch is the only thing that is necessary for all libc++ tests to pass when run remotely.

Reviewers: ldionne, EricWF, mclow.lists

Reviewed By: ldionne, EricWF

Subscribers: christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D74348

Added: 
    

Modified: 
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
index a908d4c0425d..8b54fa462fe6 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
@@ -71,7 +71,7 @@ TEST_CASE(basic_test) {
       {cwd, "a", ".."},
       {parent_cwd, "a", "../.."},
       {"a", cwd, "a"},
-      {"a", parent_cwd, "fs.op.proximate/a"},
+      {"a", parent_cwd, curdir / "a"},
       {"/", "a", dot_dot_to_root / ".."},
       {"/", "a/b", dot_dot_to_root / "../.."},
       {"/", "a/b/", dot_dot_to_root / "../.."},


        


More information about the libcxx-commits mailing list