tests: fix clients tests
authorMichael Wallner <mike@php.net>
Mon, 13 Jan 2020 13:25:44 +0000 (14:25 +0100)
committerMichael Wallner <mike@php.net>
Mon, 13 Jan 2020 13:27:37 +0000 (14:27 +0100)
16 files changed:
Makefile.am
clients/include.am
clients/memcapable.sh [new file with mode: 0755]
clients/memcat.cc
clients/memcat.sh [new file with mode: 0755]
clients/memcp.sh [new file with mode: 0755]
clients/memdump.sh [new file with mode: 0755]
clients/memerror.sh [new file with mode: 0755]
clients/memexist.sh [new file with mode: 0755]
clients/memflush.sh [new file with mode: 0755]
clients/memparse.sh [new file with mode: 0755]
clients/memping.sh [new file with mode: 0755]
clients/memrm.sh [new file with mode: 0755]
clients/memslap.sh [new file with mode: 0755]
clients/memstat.sh [new file with mode: 0755]
clients/memtouch.sh [new file with mode: 0755]

index e8a4121c8a08dd0ff3038f1891c52f4102836f95..789e6dcffcbb1c939eb101c794237affddb65364 100644 (file)
@@ -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
 
index 41328568ff76fe1906ecd2191bcf92b29b8f1e34..b6b2fd50544714c0b2daa308c018091e318e9100 100644 (file)
@@ -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 (executable)
index 0000000..cc4f89a
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+clients/memcapable -vh localhost
index 52b02aca3a427d6f648414cc0dc2caae0e8d9cca..911c47616fcba641b798b8535884144cacb907d4 100644 (file)
@@ -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 (executable)
index 0000000..ac05790
--- /dev/null
@@ -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 (executable)
index 0000000..a2f7d53
--- /dev/null
@@ -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 (executable)
index 0000000..6e131d2
--- /dev/null
@@ -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 (executable)
index 0000000..3843b55
--- /dev/null
@@ -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 (executable)
index 0000000..5aa0287
--- /dev/null
@@ -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 (executable)
index 0000000..f841e70
--- /dev/null
@@ -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 (executable)
index 0000000..f18b8e0
--- /dev/null
@@ -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 (executable)
index 0000000..33100e7
--- /dev/null
@@ -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 (executable)
index 0000000..5b170d6
--- /dev/null
@@ -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 (executable)
index 0000000..85b78ef
--- /dev/null
@@ -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 (executable)
index 0000000..b52ba65
--- /dev/null
@@ -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 (executable)
index 0000000..2d5ccc0
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+clients/memtouch -v --servers localhost mem.testdata