Browse Source

[trac976] Suppress message output from shell-based tests

Stephen Morris 14 years ago
parent
commit
a4b89470c5
2 changed files with 5 additions and 5 deletions
  1. 1 1
      src/lib/log/tests/Makefile.am
  2. 4 4
      src/lib/log/tests/console_test.sh.in

+ 1 - 1
src/lib/log/tests/Makefile.am

@@ -43,7 +43,7 @@ run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
 run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
 run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
 endif
 endif
 
 
-TESTS += logger_example
+check_PROGRAMS = logger_example
 logger_example_SOURCES = logger_example.cc
 logger_example_SOURCES = logger_example.cc
 logger_example_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 logger_example_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 logger_example_LDFLAGS = $(AM_LDFLAGS) $(LOG4CPLUS_LDFLAGS)
 logger_example_LDFLAGS = $(AM_LDFLAGS) $(LOG4CPLUS_LDFLAGS)

+ 4 - 4
src/lib/log/tests/console_test.sh.in

@@ -37,22 +37,22 @@ passfail() {
 
 
 echo "1. Checking that console output to stdout goes to stdout:"
 echo "1. Checking that console output to stdout goes to stdout:"
 rm -f $tempfile
 rm -f $tempfile
-./logger_example -c stdout -s error 1> $tempfile
+./logger_example -c stdout -s error 1> $tempfile 2> /dev/null
 passfail 4
 passfail 4
 
 
 echo "2. Checking that console output to stdout does not go to stderr:"
 echo "2. Checking that console output to stdout does not go to stderr:"
 rm -f $tempfile
 rm -f $tempfile
-./logger_example -c stdout -s error 2> $tempfile
+./logger_example -c stdout -s error 1> /dev/null 2> $tempfile
 passfail 0
 passfail 0
 
 
 echo "3. Checking that console output to stderr goes to stderr:"
 echo "3. Checking that console output to stderr goes to stderr:"
 rm -f $tempfile
 rm -f $tempfile
-./logger_example -c stderr -s error 2> $tempfile
+./logger_example -c stderr -s error 1> /dev/null 2> $tempfile
 passfail 4
 passfail 4
 
 
 echo "4. Checking that console output to stderr does not go to stdout:"
 echo "4. Checking that console output to stderr does not go to stdout:"
 rm -f $tempfile
 rm -f $tempfile
-./logger_example -c stderr -s error 1> $tempfile
+./logger_example -c stderr -s error 1> $tempfile 2> /dev/null
 passfail 0
 passfail 0
 
 
 if [ $failcount -eq 0 ]; then
 if [ $failcount -eq 0 ]; then