From: Michael Wallner Date: Tue, 14 Jan 2020 14:18:51 +0000 (+0100) Subject: tests: fix parser test with config file X-Git-Tag: pre_cmake~42 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2de8026caaa36906661a315f18fdb81288990ea2;p=awesomized%2Flibmemcached tests: fix parser test with config file --- diff --git a/configure.ac b/configure.ac index e4b57e5d..265ae899 100644 --- a/configure.ac +++ b/configure.ac @@ -380,6 +380,7 @@ AC_CONFIG_FILES([Makefile libmemcached-1.0/configure.h support/libmemcached.pc support/libmemcached.spec + support/example.cnf ]) AC_OUTPUT diff --git a/libtest/include.am b/libtest/include.am index 77d199df..a16154b0 100644 --- a/libtest/include.am +++ b/libtest/include.am @@ -183,6 +183,13 @@ endif TMP_DIR := tmp_chroot/etc tmp_chroot/var/log tmp_chroot/var/tmp tmp_chroot/var/run tmp_chroot/var/drizzle BUILT_SOURCES+= $(TMP_DIR) +BUILT_SOURCES+= tmp_chroot/support + +tmp_chroot/support: | tmp_chroot + @cp -R support tmp_chroot + +tmp_chroot: + @$(mkdir_p) $@ $(TMP_DIR): @$(mkdir_p) $(TMP_DIR) diff --git a/support/example.cnf b/support/example.cnf deleted file mode 100644 index 70efaf13..00000000 --- a/support/example.cnf +++ /dev/null @@ -1,10 +0,0 @@ -# http://en.wikipedia.org/wiki/Consistent_hashing ---distribution=consistent - -# Store one additional copy on each node. ---number-of-replicas=2 ---namespace="my_foo" ---server=localhost:11211 ---server=localhost:11212 ---server=localhost:11213 ---verify-key diff --git a/support/example.cnf.in b/support/example.cnf.in new file mode 100644 index 00000000..70efaf13 --- /dev/null +++ b/support/example.cnf.in @@ -0,0 +1,10 @@ +# http://en.wikipedia.org/wiki/Consistent_hashing +--distribution=consistent + +# Store one additional copy on each node. +--number-of-replicas=2 +--namespace="my_foo" +--server=localhost:11211 +--server=localhost:11212 +--server=localhost:11213 +--verify-key diff --git a/tests/libmemcached-1.0/parser.cc b/tests/libmemcached-1.0/parser.cc index d2be9a17..064c5cfb 100644 --- a/tests/libmemcached-1.0/parser.cc +++ b/tests/libmemcached-1.0/parser.cc @@ -356,7 +356,7 @@ test_return_t libmemcached_check_configuration_with_filename_test(memcached_st*) libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=\"support/example.cnf\""), buffer, sizeof(buffer)), buffer); - test_compare_hint(MEMCACHED_SUCCESS, + test_compare_hint(MEMCACHED_PARSE_ERROR, libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=support/example.cnf"), buffer, sizeof(buffer)), buffer);