X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fcmdline.h;h=368daaecbbbf2e18ab32b4e169ed7a9d429cc20d;hb=dbc62573e1a6dc8cbcc97d0898e8615b0916d6ab;hp=ca7098dd722343823e223cb932f6dbdead0615c5;hpb=6b04196d0ea6aa9fcd2a6c14a6cb5733c34aa2d2;p=awesomized%2Flibmemcached diff --git a/libtest/cmdline.h b/libtest/cmdline.h index ca7098dd..368daaec 100644 --- a/libtest/cmdline.h +++ b/libtest/cmdline.h @@ -36,17 +36,16 @@ #pragma once -#ifdef HAVE_SPAWN_H -# include -#endif +#include -/* - http://www.gnu.org/software/automake/manual/automake.html#Tests - When no test protocol is in use, an exit status of 0 from a test script will denote a success, an exit status of 77 a skipped test, an exit status of 99 an hard error, and any other exit status will denote a failure. -*/ +// http://www.gnu.org/software/automake/manual/automake.html#Using-the-TAP-test-protocol +#ifndef EXIT_SKIP +# define EXIT_SKIP 77 +#endif -#define EXIT_SKIP 77 -#define EXIT_FATAL 99 +#ifndef EXIT_FATAL +# define EXIT_FATAL 99 +#endif #ifndef EX_NOEXEC # define EX_NOEXEC 126 @@ -151,6 +150,11 @@ public: return _stdout_buffer.size(); } + const char* stdout_c_str() const + { + return &_stdout_buffer[0]; + } + libtest::vchar_t stderr_result() const { return _stderr_buffer; @@ -168,7 +172,7 @@ public: std::string print(); - void use_valgrind(bool arg= true) + void use_valgrind(bool arg) { _use_valgrind= arg; } @@ -178,12 +182,12 @@ public: bool slurp(); void murder(); - void use_gdb(bool arg= true) + void use_gdb(bool arg) { _use_gdb= arg; } - void use_ptrcheck(bool arg= true) + void use_ptrcheck(bool arg) { _use_ptrcheck= arg; } @@ -208,6 +212,7 @@ public: private: void create_argv(const char *args[]); void delete_argv(); + void add_to_build_argv(const char*); private: const bool _use_libtool; @@ -240,7 +245,4 @@ static inline std::ostream& operator<<(std::ostream& output, const enum Applicat int exec_cmdline(const std::string& executable, const char *args[], bool use_libtool= false); -const char *gearmand_binary(); -const char *drizzled_binary(); - }