]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: testsuite: skip fs last_write_time tests if dummy
authorAlexandre Oliva <oliva@adacore.com>
Fri, 24 Jun 2022 02:20:51 +0000 (23:20 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Fri, 24 Jun 2022 02:28:14 +0000 (23:28 -0300)
commitf01cf5eaa06e72cf8e1e7d7f37b41f9d5eaf3e5c
tree3dc19aee0ee866270c1748306006ffbe4062bd51
parentb931c6874e846cd4eba1c31112593d33ff4bf1f1
libstdc++: testsuite: skip fs last_write_time tests if dummy

The last_write_time functions are defined in ways that are useful, or
that fail immediately, depending on various macros.  When they fail
immediately, the filesystem last_write_time.cc tests fail noisily, but
the fail is entirely expected.

Define NO_LAST_WRITE_TIME in the last_write_time.cc tests, according
to the macros that select implementations of last_write_time, and use
it through the new dg-require-target-fs-lwt to skip tests that are
expected to fail.

for  libstdc++-v3/ChangeLog

* testsuite/util/testsuite_fs.h (NO_LAST_WRITE_TIME): Define
when appropriate.
* testsuite/lib/libstdc++.exp
(check_v3_target_fs_last_write_time): New.
* testsuite/lib/dg-options.exp (dg-require-target-fs-lwt):
New.
* testsuite/27_io/filesystem/operations/last_write_time.cc:
Skip the test if the features are unavailable.
* testsuite/experimental/filesystem/operations/last_write_time.cc:
Likewise.
libstdc++-v3/testsuite/27_io/filesystem/operations/last_write_time.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/last_write_time.cc
libstdc++-v3/testsuite/lib/dg-options.exp
libstdc++-v3/testsuite/lib/libstdc++.exp
libstdc++-v3/testsuite/util/testsuite_fs.h