[gnumeric] t2003: ignore failures unless run by one of us.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] t2003: ignore failures unless run by one of us.
- Date: Wed, 26 Sep 2012 18:52:30 +0000 (UTC)
commit c8f485065d506f7694a37e3d6fe0f0a515376a79
Author: Morten Welinder <terra gnome org>
Date: Wed Sep 26 14:51:06 2012 -0400
t2003: ignore failures unless run by one of us.
We want to avoid having distributions experience failures caused by
random numbers.
test/ChangeLog | 6 ++++++
test/t2003-random-generators.pl | 11 ++++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/test/ChangeLog b/test/ChangeLog
index 596d9be..8b8509c 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-26 Morten Welinder <terra gnome org>
+
+ * t2003-random-generators.pl: Ignore failures unless $USER is
+ "welinder" or "aguelzow". (We do not want to see random numbers
+ causing failures for distributions.)
+
2012-09-06 Morten Welinder <terra gnome org>
* Release 1.11.6
diff --git a/test/t2003-random-generators.pl b/test/t2003-random-generators.pl
index 1140b9c..49d3c3d 100755
--- a/test/t2003-random-generators.pl
+++ b/test/t2003-random-generators.pl
@@ -5,10 +5,19 @@ use strict;
use lib ($0 =~ m|^(.*/)| ? $1 : ".");
use GnumericTest;
+my $user = $ENV{'USER'} || '-';
+my $ignore_failure = !($user eq 'welinder' || $user eq 'aguelzow');
+
sub expected {
my ($actual) = @_;
- return $actual =~ /Start: test_random\s*-*\s*(Testing =\S+\s+(\S+: [-+eE0-9.]*\s)*OK\s*)*End: test_random/;
+ my $actual_ok = ($actual =~ /Start: test_random\s*-*\s*(Testing =\S+\s+(\S+: [-+eE0-9.]*\s)*OK\s*)*End: test_random/);
+ if (!$actual_ok && $ignore_failure) {
+ print STDERR "Ignoring failure possibly caused by random numbers.\n";
+ &GnumericTest::dump_indented ($actual);
+ }
+
+ return $actual_ok || $ignore_failure;
}
&message ("Checking random number generators.");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]