From 2de8026caaa36906661a315f18fdb81288990ea2 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 14 Jan 2020 15:18:51 +0100 Subject: [PATCH] tests: fix parser test with config file --- configure.ac | 1 + libtest/include.am | 7 +++++++ support/{example.cnf => example.cnf.in} | 0 tests/libmemcached-1.0/parser.cc | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) rename support/{example.cnf => example.cnf.in} (100%) 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.in similarity index 100% rename from support/example.cnf rename to support/example.cnf.in 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); -- 2.30.2