[gtk+] tests: Make sure number of runs is 1.
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Make sure number of runs is 1.
- Date: Mon, 26 Dec 2016 16:22:37 +0000 (UTC)
commit c7083a5d37d09357581c670ef841eaf556a60b24
Author: Benjamin Otte <otte redhat com>
Date: Sun Dec 25 19:51:30 2016 +0100
tests: Make sure number of runs is 1.
tests/rendernode.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tests/rendernode.c b/tests/rendernode.c
index 5222b7b..d7924d2 100644
--- a/tests/rendernode.c
+++ b/tests/rendernode.c
@@ -3,7 +3,7 @@
static gboolean benchmark = FALSE;
static gboolean dump_variant = FALSE;
static gboolean fallback = FALSE;
-static int runs;
+static int runs = 1;
static GOptionEntry options[] = {
{ "benchmark", 'b', 0, G_OPTION_ARG_NONE, &benchmark, "Time operations", NULL },
@@ -32,6 +32,11 @@ main(int argc, char **argv)
return 1;
}
+ if (runs < 1)
+ {
+ g_printerr ("Number of runs given with -r/--runs must be at least 1 and not %d.\n", runs);
+ return 1;
+ }
if (!(argc == 3 || (argc == 2 && (dump_variant || benchmark))))
{
g_printerr ("Usage: %s [OPTIONS] NODE-FILE PNG-FILE\n", argv[0]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]