This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Avoid simulator timeouts on more libstdc++ tests
Paolo Carlini wrote:
>> May I also add this patch to the patchset (with obvious ChangeLog entry)
>> before checking it in?
>>
> Sure, go ahead.
For the record, here is the complete patch as checked in.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
2009-03-22 Mark Mitchell <mark@codesourcery.com>
* testsuite/25_algorithms/search_n/iterator.cc: Condition
iterations for simulators.
* testsuite/25_algorithms/heap/moveable.cc: Likewise.
* testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
Condition stream width for simulators.
* testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc:
Likewise.
* testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise.
Index: testsuite/25_algorithms/search_n/iterator.cc
===================================================================
--- testsuite/25_algorithms/search_n/iterator.cc (revision 240962)
+++ testsuite/25_algorithms/search_n/iterator.cc (working copy)
@@ -16,6 +16,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DTEST_DEPTH=10" { target simulator } }
+
// 25 algorithms, search_n
#include <algorithm>
@@ -23,7 +25,10 @@
#include <testsuite_hooks.h>
#include <testsuite_iterators.h>
+#ifndef TEST_DEPTH
#define TEST_DEPTH 14
+#endif
+
int array1[11] = {0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0};
int array2[TEST_DEPTH];
Index: testsuite/25_algorithms/heap/moveable.cc
===================================================================
--- testsuite/25_algorithms/heap/moveable.cc (revision 240962)
+++ testsuite/25_algorithms/heap/moveable.cc (working copy)
@@ -18,6 +18,8 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
+// { dg-options "-std=gnu++0x -DITERATIONS=5" { target simulator } }
+
// 25.3.6 Heap operations [lib.alg.heap.operations]
#undef _GLIBCXX_CONCEPT_CHECKS
@@ -28,6 +30,10 @@
#include <testsuite_iterators.h>
#include <testsuite_rvalref.h>
+#ifndef ITERATIONS
+#define ITERATIONS 9
+#endif
+
using __gnu_test::test_container;
using __gnu_test::random_access_iterator_wrapper;
using __gnu_test::rvalstruct;
@@ -115,7 +121,7 @@ void
test01()
{
int array[9];
- for (int i = 1; i < 9; ++i)
+ for (int i = 1; i < ITERATIONS; ++i)
{
for(int z = 0; z < i; ++z)
array[z] = z;
Index: testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
===================================================================
--- testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc (revision 240962)
+++ testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc (working copy)
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
// 27.6.2.5.4 basic_ostream character inserters
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -32,7 +38,7 @@ void test01()
ostringstream oss_01;
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << 'a';
Index: testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
===================================================================
--- testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc (revision 240962)
+++ testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc (working copy)
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
// 27.6.2.5.4 basic_ostream character inserters
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -33,7 +39,7 @@ void test01()
ostringstream oss_01;
const string str_01(50, 'a');
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01.c_str();
Index: testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
===================================================================
--- testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc (revision 240962)
+++ testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc (working copy)
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
// 21.3.7.9 inserters and extractors
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -33,7 +39,7 @@ void test01()
ostringstream oss_01;
const string str_01(50, 'a');
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01;
Index: testsuite/ext/vstring/inserters_extractors/char/28277.cc
===================================================================
--- testsuite/ext/vstring/inserters_extractors/char/28277.cc (revision 240962)
+++ testsuite/ext/vstring/inserters_extractors/char/28277.cc (working copy)
@@ -18,11 +18,17 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
#include <ostream>
#include <sstream>
#include <ext/vstring.h>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -32,7 +38,7 @@ void test01()
ostringstream oss_01;
const __gnu_cxx::__vstring str_01(50, 'a');
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01;