Commit fcf3cdd4 authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac558] Remove local message file from test directory

The last fix (adding EXTRA_DIST to the test Makefile.am to include
localdef.mes) did not work.  Rather than chase up why, localdef.mes
is removed from the distribution, instead the contents are created
at test time by the script run_time_init_test.sh
parent bf5f7b5f
......@@ -33,8 +33,6 @@ run_unittests_LDADD = $(GTEST_LDADD)
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
endif
EXTRA_DIST=localdef.mes
TESTS += logger_support_test
logger_support_test_SOURCES = logger_support_test.cc
logger_support_test_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
......
# Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# \brief Local Definitions
#
# Holds local definitions of some of the messages produced by the program
# logger_support_test, and is used as input to check that run-time message
# replacement works.
NOTHERE this message is not in the global dictionary
READERR replacement read error, parameters: '%s' and '%s'
UNRECDIR replacement unrecognised directive message, parameter is '%s'
......@@ -26,6 +26,15 @@ passfail() {
fi
failcount=`expr $failcount + $1`
}
# Create the local message file for testing
cat > $localmes << .
NOTHERE this message is not in the global dictionary
READERR replacement read error, parameters: '%s' and '%s'
UNRECDIR replacement unrecognised directive message, parameter is '%s'
.
echo -n "1. runInitTest default parameters: "
cat > $tempfile << .
......@@ -69,6 +78,7 @@ INFO [alpha.dlm] OPENIN, unable to open message file example.msg for input: dum
./logger_support_test $localmes | cut -d' ' -f3- | diff $tempfile -
passfail $?
rm -f $localmes
rm -f $tempfile
if [ $failcount -eq 0 ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment