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

Sergej Jaskiewicz via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 10 11:04:51 PST 2020


broadwaylamb created this revision.
broadwaylamb added reviewers: ldionne, EricWF, mclow.lists.
Herald added subscribers: libcxx-commits, dexonsmith, christof.
Herald added a project: libc++.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74348

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


Index: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
@@ -71,7 +71,7 @@
       {cwd, "a", ".."},
       {parent_cwd, "a", "../.."},
       {"a", cwd, "a"},
-      {"a", parent_cwd, "fs.op.proximate/a"},
+      {"a", parent_cwd, cwd.filename() / "a"},
       {"/", "a", dot_dot_to_root / ".."},
       {"/", "a/b", dot_dot_to_root / "../.."},
       {"/", "a/b/", dot_dot_to_root / "../.."},


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74348.243636.patch
Type: text/x-patch
Size: 684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200210/f1edf6e5/attachment.bin>


More information about the libcxx-commits mailing list