[all-commits] [llvm/llvm-project] dab5f5: [libc++] Fix filesystem tests on platforms that do...

Louis Dionne via All-commits all-commits at lists.llvm.org
Thu Jul 13 10:58:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dab5f56eaf99bd1bc96e0ef0d48f31bfff9f4316
      https://github.com/llvm/llvm-project/commit/dab5f56eaf99bd1bc96e0ef0d48f31bfff9f4316
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-07-13 (Thu, 13 Jul 2023)

  Changed paths:
    M libcxx/src/filesystem/filesystem_clock.cpp
    M libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
    M libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp
    M libcxx/test/support/concat_macros.h
    M libcxx/test/support/test_macros.h

  Log Message:
  -----------
  [libc++] Fix filesystem tests on platforms that don't have IO

This patch moves a few tests that were still using std::fprintf to
using TEST_REQUIRE instead, which provides a single point to tweak
for platforms that don't implement fprintf. As a fly-by fix, it also
avoids including `time_utils.h` in filesystem_clock.cpp when it is
not required, since that header makes some pretty large assumptions
about the platform it is on.

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




More information about the All-commits mailing list