From 8c2c677ebb626a4b7b8144bea5ea231fa75ba435 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 13 Jan 2020 14:25:44 +0100 Subject: [PATCH] tests: fix clients tests --- Makefile.am | 2 -- clients/include.am | 17 +++++++++++++++++ clients/memcapable.sh | 2 ++ clients/memcat.cc | 2 +- clients/memcat.sh | 2 ++ clients/memcp.sh | 2 ++ clients/memdump.sh | 2 ++ clients/memerror.sh | 2 ++ clients/memexist.sh | 2 ++ clients/memflush.sh | 2 ++ clients/memparse.sh | 2 ++ clients/memping.sh | 2 ++ clients/memrm.sh | 2 ++ clients/memslap.sh | 2 ++ clients/memstat.sh | 2 ++ clients/memtouch.sh | 2 ++ 16 files changed, 44 insertions(+), 3 deletions(-) create mode 100755 clients/memcapable.sh create mode 100755 clients/memcat.sh create mode 100755 clients/memcp.sh create mode 100755 clients/memdump.sh create mode 100755 clients/memerror.sh create mode 100755 clients/memexist.sh create mode 100755 clients/memflush.sh create mode 100755 clients/memparse.sh create mode 100755 clients/memping.sh create mode 100755 clients/memrm.sh create mode 100755 clients/memslap.sh create mode 100755 clients/memstat.sh create mode 100755 clients/memtouch.sh diff --git a/Makefile.am b/Makefile.am index e8a4121c..789e6dcf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,9 +87,7 @@ include win32/include.am include m4/include.am endif -TESTS += ${bin_PROGRAMS} TESTS += ${check_PROGRAMS} -XFAIL_TESTS += ${bin_PROGRAMS} if ! BUILD_WIN32 diff --git a/clients/include.am b/clients/include.am index 41328568..b6b2fd50 100644 --- a/clients/include.am +++ b/clients/include.am @@ -104,6 +104,23 @@ clients_memcapable_SOURCES+= libmemcached/byteorder.cc clients_memcapable_LDADD= $(CLIENTS_LDADDS) clients_memcapable_LDADD+= @PTHREAD_LIBS@ +TESTS += clients/memcapable.sh +TESTS += clients/memcp.sh +TESTS += clients/memcat.sh +clients/memcat.sh: | mem.testdata +mem.testdata: + date > $@ +TESTS += clients/memdump.sh +TESTS += clients/memerror.sh +TESTS += clients/memexist.sh +TESTS += clients/memparse.sh +TESTS += clients/memping.sh +TESTS += clients/memrm.sh +TESTS += clients/memslap.sh +TESTS += clients/memstat.sh +TESTS += clients/memtouch.sh +TESTS += clients/memflush.sh + test-start-server: clients/memflush --servers=localhost clients/memcp --servers=localhost /etc/services diff --git a/clients/memcapable.sh b/clients/memcapable.sh new file mode 100755 index 00000000..cc4f89af --- /dev/null +++ b/clients/memcapable.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memcapable -vh localhost diff --git a/clients/memcat.cc b/clients/memcat.cc index 52b02aca..911c4761 100644 --- a/clients/memcat.cc +++ b/clients/memcat.cc @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) { if (opt_verbose) { - std::cout << "key: " << argv[optind] << std::endl << "flags: " << flags << "length: " << string_length << std::endl << "value: "; + std::cout << "key: " << argv[optind] << std::endl << "flags: " << flags << std::endl << "length: " << string_length << std::endl << "value: "; } if (opt_file) diff --git a/clients/memcat.sh b/clients/memcat.sh new file mode 100755 index 00000000..ac057907 --- /dev/null +++ b/clients/memcat.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memcat --servers=localhost -v mem.testdata diff --git a/clients/memcp.sh b/clients/memcp.sh new file mode 100755 index 00000000..a2f7d53a --- /dev/null +++ b/clients/memcp.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memcp -v --servers localhost mem.testdata diff --git a/clients/memdump.sh b/clients/memdump.sh new file mode 100755 index 00000000..6e131d2c --- /dev/null +++ b/clients/memdump.sh @@ -0,0 +1,2 @@ +#!/bin/bash +clients/memdump -v --servers localhost diff --git a/clients/memerror.sh b/clients/memerror.sh new file mode 100755 index 00000000..3843b552 --- /dev/null +++ b/clients/memerror.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memerror 0 1 2 3 diff --git a/clients/memexist.sh b/clients/memexist.sh new file mode 100755 index 00000000..5aa0287f --- /dev/null +++ b/clients/memexist.sh @@ -0,0 +1,2 @@ +#!/bin/bash +clients/memexist -v --servers localhost mem.testdata diff --git a/clients/memflush.sh b/clients/memflush.sh new file mode 100755 index 00000000..f841e703 --- /dev/null +++ b/clients/memflush.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memflush -v --servers localhost diff --git a/clients/memparse.sh b/clients/memparse.sh new file mode 100755 index 00000000..f18b8e0e --- /dev/null +++ b/clients/memparse.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memparse --server=localhost:11211/?1 --server=127.0.0.1:11211/?2 diff --git a/clients/memping.sh b/clients/memping.sh new file mode 100755 index 00000000..33100e77 --- /dev/null +++ b/clients/memping.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memping -v --servers localhost diff --git a/clients/memrm.sh b/clients/memrm.sh new file mode 100755 index 00000000..5b170d6e --- /dev/null +++ b/clients/memrm.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memrm -v --servers localhost mem.testdata diff --git a/clients/memslap.sh b/clients/memslap.sh new file mode 100755 index 00000000..85b78ef5 --- /dev/null +++ b/clients/memslap.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memslap -v --servers localhost diff --git a/clients/memstat.sh b/clients/memstat.sh new file mode 100755 index 00000000..b52ba65f --- /dev/null +++ b/clients/memstat.sh @@ -0,0 +1,2 @@ +#!/bin/bash +clients/memstat -v --servers localhost diff --git a/clients/memtouch.sh b/clients/memtouch.sh new file mode 100755 index 00000000..2d5ccc06 --- /dev/null +++ b/clients/memtouch.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clients/memtouch -v --servers localhost mem.testdata -- 2.30.2