From 6c195ce130585edf7ff4556a75e10cc81fc70d03 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 8 Jun 2004 02:29:16 +0000 Subject: [PATCH] Make "make check" less noisy. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ tests/run-markup-tests.sh | 22 +++++++++++++++++----- 6 files changed, 42 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93f7df3..1662c04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 7 22:25:24 2004 Matthias Clasen + + * tests/run-markup-tests.sh: Default to silence, but support + a -v argument to get the old output back. + 2004-06-06 Tor Lillqvist * glib/gutils.c (g_get_any_init): Check home for being diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 93f7df3..1662c04 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Mon Jun 7 22:25:24 2004 Matthias Clasen + + * tests/run-markup-tests.sh: Default to silence, but support + a -v argument to get the old output back. + 2004-06-06 Tor Lillqvist * glib/gutils.c (g_get_any_init): Check home for being diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 93f7df3..1662c04 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +Mon Jun 7 22:25:24 2004 Matthias Clasen + + * tests/run-markup-tests.sh: Default to silence, but support + a -v argument to get the old output back. + 2004-06-06 Tor Lillqvist * glib/gutils.c (g_get_any_init): Check home for being diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 93f7df3..1662c04 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Mon Jun 7 22:25:24 2004 Matthias Clasen + + * tests/run-markup-tests.sh: Default to silence, but support + a -v argument to get the old output back. + 2004-06-06 Tor Lillqvist * glib/gutils.c (g_get_any_init): Check home for being diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 93f7df3..1662c04 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Mon Jun 7 22:25:24 2004 Matthias Clasen + + * tests/run-markup-tests.sh: Default to silence, but support + a -v argument to get the old output back. + 2004-06-06 Tor Lillqvist * glib/gutils.c (g_get_any_init): Check home for being diff --git a/tests/run-markup-tests.sh b/tests/run-markup-tests.sh index fb65086..bbc378c 100755 --- a/tests/run-markup-tests.sh +++ b/tests/run-markup-tests.sh @@ -6,17 +6,29 @@ fail () exit 1 } +echo_v () +{ + if [ "$verbose" = "1" ]; then + echo "$*" + fi +} + +error_out=/dev/null +if [ "$1" = "-v" ]; then + verbose=1 + error_out=/dev/stderr +fi for I in $srcdir/markups/fail-*.gmarkup; do - echo "Parsing $I, should fail" - ./markup-test $I > /dev/null && fail "failed to generate error on $I" + echo_v "Parsing $I, should fail" + ./markup-test $I > /dev/null 2> $error_out && fail "failed to generate error on $I" if test "$?" != "1"; then fail "unexpected error on $I" fi done for I in $srcdir/markups/valid-*.gmarkup; do - echo "Parsing $I, should succeed" - ./markup-test $I > /dev/null || fail "failed on $I" + echo_v "Parsing $I, should succeed" + ./markup-test $I > /dev/null 2> $error_out || fail "failed on $I" done -echo "All tests passed." +echo_v "All tests passed." -- 2.7.4