Created
August 8, 2010 21:15
-
-
Save steveyen/514548 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== modified file 'clients/memcapable.c' | |
--- clients/memcapable.c 2010-07-28 18:48:18 +0000 | |
+++ clients/memcapable.c 2010-08-08 21:12:10 +0000 | |
@@ -1869,8 +1869,10 @@ | |
const char *hostname= "localhost"; | |
const char *port= "11211"; | |
int cmd; | |
+ bool prompt = false; | |
+ const char *testname= NULL; | |
- while ((cmd= getopt(argc, argv, "t:vch:p:?")) != EOF) | |
+ while ((cmd= getopt(argc, argv, "t:vch:p:?PT:")) != EOF) | |
{ | |
switch (cmd) { | |
case 't': | |
@@ -1889,6 +1891,10 @@ | |
break; | |
case 'p': port= optarg; | |
break; | |
+ case 'P': prompt= true; | |
+ break; | |
+ case 'T': testname= optarg; | |
+ break; | |
default: | |
fprintf(stderr, "Usage: %s [-h hostname] [-p port] [-c] [-v] [-t n]\n" | |
"\t-c\tGenerate coredump if a test fails\n" | |
@@ -1910,10 +1916,20 @@ | |
for (int ii= 0; testcases[ii].description != NULL; ++ii) | |
{ | |
+ if (testname != NULL && strcmp(testcases[ii].description, testname) != 0) { | |
+ continue; | |
+ } | |
+ | |
++total; | |
fprintf(stdout, "%-40s", testcases[ii].description); | |
fflush(stdout); | |
+ if (prompt) { | |
+ fprintf(stdout, "\nready?"); | |
+ (void) getchar(); | |
+ fprintf(stdout, "\n"); | |
+ } | |
+ | |
bool reconnect= false; | |
enum test_return ret= testcases[ii].function(); | |
if (ret == TEST_FAIL) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment