*
*/
-#include "mem_config.h"
+#include "libtest/yatlcon.h"
-#include <libtest/common.h>
+#include "libtest/common.h"
#include <cassert>
#include <cerrno>
virtual const char *sasl() const
{
- return "-S";
+ return NULL;
}
const std::string& password() const
add_option("-M");
#endif
- if (_username.size())
+ if (sasl())
{
add_option(sasl());
}
for (size_t x= 0 ; x < argc ; x++)
{
+ if (argv[x] == NULL)
+ {
+ break;
+ }
+
add_option(argv[x]);
}
libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port)
{
- return new Memcached(hostname, try_port, false);
-}
+ if (HAVE_MEMCACHED_BINARY)
+ {
+ return new Memcached(hostname, try_port, false);
+ }
-libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port)
-{
- return new Memcached(socket_file, try_port, true);
+ return NULL;
}
-libtest::Server *build_memcached_sasl(const std::string& hostname, const in_port_t try_port, const std::string& username, const std::string &password)
+libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port)
{
- if (username.empty())
+ if (HAVE_MEMCACHED_BINARY)
{
- return new Memcached(hostname, try_port, false, "memcached", "memcached");
+ return new Memcached(socket_file, try_port, true);
}
- return new Memcached(hostname, try_port, false, username, password);
+ return NULL;
}
} // namespace libtest
-