This patch adds dg-require-time to tests that require a system clock and dg-require-fileio to tests that perform file I/O.
Tested on mipsisa64-elf and applied as (I hope) obvious. Richard libstdc++-v3/ * testsuite/20_util/system_clock/1.cc: Add dg-require-time. * testsuite/22_locale/time_put/put/wchar_t/12439_1.cc: Likewise. * testsuite/22_locale/time_put/put/wchar_t/12439_2.cc: Likewise. * testsuite/22_locale/time_put/put/wchar_t/12439_3.cc: Likewise. * testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc: Add dg-require-fileio. * testsuite/27_io/basic_istream/seekg/wchar_t/fstream.cc: Likewise. * testsuite/27_io/basic_istream/tellg/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_istream/tellg/wchar_t/fstream.cc: Likewise. * testsuite/27_io/basic_ostream/seekp/wchar_t/2346-fstream.cc: Likewise. * testsuite/27_io/basic_ostream/tellp/wchar_t/1.cc: Likewise. Index: libstdc++-v3/testsuite/20_util/system_clock/1.cc =================================================================== --- libstdc++-v3/testsuite/20_util/system_clock/1.cc 2012-01-25 18:50:10.000000000 +0000 +++ libstdc++-v3/testsuite/20_util/system_clock/1.cc 2012-01-25 18:50:15.000000000 +0000 @@ -1,5 +1,6 @@ // { dg-options "-std=gnu++0x" } // { dg-require-cstdint "" } +// { dg-require-time "" } // Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation // Index: libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_1.cc =================================================================== --- libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_1.cc 2012-01-25 18:50:09.000000000 +0000 +++ libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_1.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-time "" } + // 22.2.5.3.1 time_put members #include <locale> Index: libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_2.cc =================================================================== --- libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_2.cc 2012-01-25 18:50:10.000000000 +0000 +++ libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_2.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-time "" } + // 22.2.5.3.1 time_put members #include <locale> Index: libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_3.cc =================================================================== --- libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_3.cc 2012-01-25 18:50:10.000000000 +0000 +++ libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/12439_3.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-time "" } + // 22.2.5.3.1 time_put members #include <locale> Index: libstdc++-v3/testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc =================================================================== --- libstdc++-v3/testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc 2012-01-25 18:50:09.000000000 +0000 +++ libstdc++-v3/testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc 2012-01-25 18:50:15.000000000 +0000 @@ -20,6 +20,7 @@ // { dg-do run { xfail arm*-*-elf arm*-*-eabi } } // { dg-require-binary-io "" } +// { dg-require-fileio "" } // 27.6.1.3 unformatted input functions // @require@ %-*.tst %-*.txt Index: libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/fstream.cc =================================================================== --- libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/fstream.cc 2012-01-25 18:50:09.000000000 +0000 +++ libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/fstream.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-fileio "" } + // 27.6.1.3 unformatted input functions // NB: ostream has a particular "seeks" category. Adopt this for istreams too. // @require@ %-*.tst %-*.txt Index: libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/1.cc =================================================================== --- libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/1.cc 2012-01-25 18:50:09.000000000 +0000 +++ libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/1.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-fileio "" } + // 27.6.1.3 unformatted input functions // NB: ostream has a particular "seeks" category. Adopt this for istreams too. // @require@ %-*.tst %-*.txt Index: libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/fstream.cc =================================================================== --- libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/fstream.cc 2012-01-25 18:50:09.000000000 +0000 +++ libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/fstream.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-fileio "" } + // 27.6.1.3 unformatted input functions // NB: ostream has a particular "seeks" category. Adopt this for istreams too. // @require@ %-*.tst %-*.txt Index: libstdc++-v3/testsuite/27_io/basic_ostream/seekp/wchar_t/2346-fstream.cc =================================================================== --- libstdc++-v3/testsuite/27_io/basic_ostream/seekp/wchar_t/2346-fstream.cc 2012-01-25 18:50:09.000000000 +0000 +++ libstdc++-v3/testsuite/27_io/basic_ostream/seekp/wchar_t/2346-fstream.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-fileio "" } + // 27.6.2.4 basic_ostream seek members [lib.ostream.seeks] // @require@ %-*.tst %-*.txt // @diff@ %-*.tst %-*.txt Index: libstdc++-v3/testsuite/27_io/basic_ostream/tellp/wchar_t/1.cc =================================================================== --- libstdc++-v3/testsuite/27_io/basic_ostream/tellp/wchar_t/1.cc 2012-01-25 18:50:09.000000000 +0000 +++ libstdc++-v3/testsuite/27_io/basic_ostream/tellp/wchar_t/1.cc 2012-01-25 18:50:15.000000000 +0000 @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +// { dg-require-fileio "" } + // 27.6.2.4 basic_ostream seek members #include <ostream>