re PR testsuite/48675 (20_util/hash/chi2_quality.cc timeout)
authorHans-Peter Nilsson <hp@axis.com>
Tue, 19 Apr 2011 03:59:16 +0000 (03:59 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Tue, 19 Apr 2011 03:59:16 +0000 (03:59 +0000)
PR testsuite/48675
* testsuite/20_util/hash/chi2_quality.cc (test_document_words): Stub
this part if SAMPLES < 100000.

From-SVN: r172692

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/hash/chi2_quality.cc

index 6eaa0264669c7b8eae31de336205fdfac32f9235..643e4f2448c2b65456abdf486622d9c4cfabfdb4 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-19  Hans-Peter Nilsson  <hp@axis.com>
+
+       PR testsuite/48675
+       * testsuite/20_util/hash/chi2_quality.cc (test_document_words): Stub
+       this part if SAMPLES < 100000.
+
 2011-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/std/type_traits (is_nothrow_default_constructible,
index d626d829888e02b839f4445145e078ae04b61f6a..8a388349b8e686ac25bb1b544d55ca39f866cc88 100644 (file)
@@ -183,6 +183,10 @@ test_bit_string_set()
 void
 test_document_words()
 {
+  // That file is 187587 single-word lines.  To avoid a timeout, just skip
+  // this part, which would take up to 95% of the program runtime (with
+  // SAMPLES == 10000), if we're not supposed to run anywhere that long.
+#if SAMPLES >= 100000
   bool test __attribute__((unused)) = true;
   const std::string f_name = "thirty_years_among_the_dead_preproc.txt";
   std::ifstream in(f_name);
@@ -199,6 +203,7 @@ test_document_words()
   const unsigned long k = words.size() / 20;
   double chi2 = chi2_hash(words, k);
   VERIFY( chi2 < k*1.1 );
+#endif
 }
 
 int