[gnumeric] Tests: speed up t8050-valgrind-sstest.pl
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Tests: speed up t8050-valgrind-sstest.pl
- Date: Sun, 21 Aug 2016 21:01:16 +0000 (UTC)
commit 0975d3f93c290c4f49a152f2bc5f711f4ac09d8d
Author: Morten Welinder <terra gnome org>
Date: Sun Aug 21 17:00:44 2016 -0400
Tests: speed up t8050-valgrind-sstest.pl
ChangeLog | 2 ++
NEWS | 3 +++
src/sstest.c | 12 ++++++++++--
test/ChangeLog | 5 +++++
test/t8050-valgrind-sstest.pl | 2 +-
5 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7d88bdf..6f2eeb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2016-08-21 Morten Welinder <terra gnome org>
+ * src/sstest.c (options): Add --fast option.
+
* src/value.c (value_get_as_gstring): Let a negative
decimal_digits mean "shortest round-tripping string".
diff --git a/NEWS b/NEWS
index 8ed8bb6..5f7076f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
Gnumeric 1.12.33
+Morten:
+ * Speed up sstest part of test suite.
+
--------------------------------------------------------------------------
Gnumeric 1.12.32
diff --git a/src/sstest.c b/src/sstest.c
index 5fb27bd..757f96f 100644
--- a/src/sstest.c
+++ b/src/sstest.c
@@ -35,9 +35,17 @@
#include <errno.h>
static gboolean sstest_show_version = FALSE;
+static gboolean sstest_fast = FALSE;
static GOptionEntry const sstest_options [] = {
{
+ "fast", 'f',
+ 0, G_OPTION_ARG_NONE, &sstest_fast,
+ N_("Run fewer iterations"),
+ NULL
+ },
+
+ {
"version", 'V',
0, G_OPTION_ARG_NONE, &sstest_show_version,
N_("Display program version"),
@@ -2473,8 +2481,8 @@ static void
test_random (void)
{
const char *test_name = "test_random";
- const int N = 20000;
- const int High_N = 200000;
+ const int N = sstest_fast ? 2000 : 20000;
+ const int High_N = N * 10;
const char *single = g_getenv ("SSTEST_RANDOM");
mark_test_start (test_name);
diff --git a/test/ChangeLog b/test/ChangeLog
index 028edb7..7bdda2e 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-21 Morten Welinder <terra gnome org>
+
+ * t8050-valgrind-sstest.pl: Use the --fast option for sstest.
+ This is slow enough as it is.
+
2016-08-20 Morten Welinder <terra gnome org>
* Release 1.12.32
diff --git a/test/t8050-valgrind-sstest.pl b/test/t8050-valgrind-sstest.pl
index 7e4668f..062a951 100755
--- a/test/t8050-valgrind-sstest.pl
+++ b/test/t8050-valgrind-sstest.pl
@@ -12,4 +12,4 @@ chomp $pango;
&GnumericTest::report_skip ("Pango version $pango is buggy")
if $pango eq '1.24.2';
-&test_valgrind ("$sstest all >/dev/null 2>&1", 1);
+&test_valgrind ("$sstest --fast all >/dev/null 2>&1", 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]