projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
200c86a
)
Merge of cppccheck fixes.
author
Brian Aker
<brian@tangent.org>
Sun, 15 Jul 2012 06:35:11 +0000
(23:35 -0700)
committer
Brian Aker
<brian@tangent.org>
Sun, 15 Jul 2012 06:35:11 +0000
(23:35 -0700)
bootstrap.sh
patch
|
blob
|
history
libtest/cmdline.cc
patch
|
blob
|
history
libtest/core.cc
patch
|
blob
|
history
libtest/failed.cc
patch
|
blob
|
history
libtest/fatal.cc
patch
|
blob
|
history
libtest/is_local.cc
patch
|
blob
|
history
libtest/is_local.hpp
patch
|
blob
|
history
libtest/m4/mysql.m4
patch
|
blob
|
history
libtest/main.cc
patch
|
blob
|
history
libtest/server_container.cc
patch
|
blob
|
history
libtest/unittest.cc
patch
|
blob
|
history
diff --git
a/bootstrap.sh
b/bootstrap.sh
index 9818b5b4bf3401d4fe08372405c95fe6cb70c804..240f6ac0ae39e38a158bd1c7bf21658eeb481520 100755
(executable)
--- a/
bootstrap.sh
+++ b/
bootstrap.sh
@@
-4,5
+4,5
@@
if test -f configure; then make clean; make merge-clean; make distclean; fi;
rm -r -f autom4te.cache
./config/autorun.sh
rm -r -f autom4te.cache
./config/autorun.sh
-./configure --
disable-assert=no
+./configure --
enable-assert
make
make
diff --git
a/libtest/cmdline.cc
b/libtest/cmdline.cc
index 1233f5140f02f2a6f6c274eae1c7382249bdd0c3..94d4cce48d4bd65a0bcb01583d8944b01ec377d7 100644
(file)
--- a/
libtest/cmdline.cc
+++ b/
libtest/cmdline.cc
@@
-741,7
+741,7
@@
void Application::create_argv(const char *args[])
built_argv[x++]= strdup(_exectuble_with_path.c_str());
built_argv[x++]= strdup(_exectuble_with_path.c_str());
- for (Options::const_iterator iter= _options.begin(); iter != _options.end();
iter++
)
+ for (Options::const_iterator iter= _options.begin(); iter != _options.end();
++iter
)
{
built_argv[x++]= strdup((*iter).first.c_str());
if ((*iter).second.empty() == false)
{
built_argv[x++]= strdup((*iter).first.c_str());
if ((*iter).second.empty() == false)
diff --git
a/libtest/core.cc
b/libtest/core.cc
index fba81c03f4ce4c0720bf98d507b0a3d23ace8ecb..0ebe3efd62ca0d2bc785335c4dce54f5e0386eea 100644
(file)
--- a/
libtest/core.cc
+++ b/
libtest/core.cc
@@
-42,8
+42,11
@@
namespace libtest {
void create_core(void)
{
void create_core(void)
{
-#ifdef TARGET_OS_OSX
- return;
+#if defined(TARGET_OS_OSX) && TARGET_OS_OSX
+ if (TARGET_OS_OSX)
+ {
+ return;
+ }
#endif
if (getenv("YATL_COREDUMP"))
{
#endif
if (getenv("YATL_COREDUMP"))
{
diff --git
a/libtest/failed.cc
b/libtest/failed.cc
index 314a2e993086471647fce90244b9356dbe3bd1cb..ae79e3073f7d5498b9f23b291ca542aefc955d41 100644
(file)
--- a/
libtest/failed.cc
+++ b/
libtest/failed.cc
@@
-46,7
+46,7
@@
namespace libtest {
struct failed_st {
namespace libtest {
struct failed_st {
- failed_st(const std::string
collection_arg, const std::string
test_arg) :
+ failed_st(const std::string
& collection_arg, const std::string&
test_arg) :
collection(collection_arg),
test(test_arg)
{ }
collection(collection_arg),
test(test_arg)
{ }
@@
-70,7
+70,7
@@
public:
void print_failed_test(void)
{
void print_failed_test(void)
{
- for (Failures::iterator iter= failures.begin(); iter != failures.end();
iter++
)
+ for (Failures::iterator iter= failures.begin(); iter != failures.end();
++iter
)
{
Error << "\t" << (*iter).collection << " " << (*iter).test;
}
{
Error << "\t" << (*iter).collection << " " << (*iter).test;
}
diff --git
a/libtest/fatal.cc
b/libtest/fatal.cc
index d4459662c0cf1ba4bf78499616560b0eee874abb..c61b5cfb8fe0ea842b5f99e0f7f5781c20dfcc50 100644
(file)
--- a/
libtest/fatal.cc
+++ b/
libtest/fatal.cc
@@
-54,7
+54,7
@@
fatal::fatal(const char *file_arg, int line_arg, const char *func_arg, const cha
strncpy(_mesg, last_error, sizeof(_mesg));
strncpy(_mesg, last_error, sizeof(_mesg));
- snprintf(_error_message, sizeof(_error_message), "%
s"
, last_error);
+ snprintf(_error_message, sizeof(_error_message), "%
.*s", last_error_length
, last_error);
}
static bool _disabled= false;
}
static bool _disabled= false;
diff --git
a/libtest/is_local.cc
b/libtest/is_local.cc
index b03c2325307bdd4b3a0a671bffc7bb8617930eff..7ae7b7f43760f9443fb5bb9921b034c6fbb92d53 100644
(file)
--- a/
libtest/is_local.cc
+++ b/
libtest/is_local.cc
@@
-45,5
+45,16
@@
bool test_is_local()
return (getenv("LIBTEST_LOCAL"));
}
return (getenv("LIBTEST_LOCAL"));
}
+static bool _is_massive= false;
+void is_massive(bool arg)
+{
+ _is_massive= arg;
+}
+
+bool is_massive()
+{
+ return _is_massive;
+}
+
} // namespace libtest
} // namespace libtest
diff --git
a/libtest/is_local.hpp
b/libtest/is_local.hpp
index c06bc9dd993c7c2677458559221d869c93333998..08355533872c656435298c110a97d80edaac984b 100644
(file)
--- a/
libtest/is_local.hpp
+++ b/
libtest/is_local.hpp
@@
-41,4
+41,10
@@
namespace libtest {
LIBTEST_API
bool test_is_local();
LIBTEST_API
bool test_is_local();
+LIBTEST_API
+void is_massive(bool);
+
+LIBTEST_API
+bool is_massive();
+
} // namespace libtest
} // namespace libtest
diff --git
a/libtest/m4/mysql.m4
b/libtest/m4/mysql.m4
index ed61b40d9c4aef48316c75e975406a5bd9d8d3b6..2edd3b869c0f80c3c620122e8d4e9d73e000a620 100644
(file)
--- a/
libtest/m4/mysql.m4
+++ b/
libtest/m4/mysql.m4
@@
-1,3
+1,6
@@
+m4_include([libtest/m4/ax_lib_mysql.m4])
+m4_include([libtest/m4/ax_prog_mysqld.m4])
+
AX_LIB_MYSQL([5.0])
AM_CONDITIONAL(HAVE_LIBMYSQL, test "x${found_mysql}" = "xyes")
AS_IF([test "x${found_mysql}" = "xyes"],
AX_LIB_MYSQL([5.0])
AM_CONDITIONAL(HAVE_LIBMYSQL, test "x${found_mysql}" = "xyes")
AS_IF([test "x${found_mysql}" = "xyes"],
diff --git
a/libtest/main.cc
b/libtest/main.cc
index 79f177c3ca60bfe0d513282da35825bceea552ae..453d29668afdfb45d7f2cdd5f07182dcb6535d28 100644
(file)
--- a/
libtest/main.cc
+++ b/
libtest/main.cc
@@
-187,11
+187,21
@@
int main(int argc, char *argv[])
}
}
}
}
+ if ((bool(getenv("YATL_RUN_MASSIVE_TESTS"))) or opt_massive)
+ {
+ opt_massive= true;
+ }
+
if (opt_quiet)
{
close(STDOUT_FILENO);
}
if (opt_quiet)
{
close(STDOUT_FILENO);
}
+ if (opt_massive)
+ {
+ is_massive(opt_massive);
+ }
+
char buffer[1024];
if (getenv("LIBTEST_TMP"))
{
char buffer[1024];
if (getenv("LIBTEST_TMP"))
{
diff --git
a/libtest/server_container.cc
b/libtest/server_container.cc
index d8ef5d495364ad4c51e42722b3a70faeb20a67ac..0448e20900e2b847831a6f5c802a073e68eb9135 100644
(file)
--- a/
libtest/server_container.cc
+++ b/
libtest/server_container.cc
@@
-287,17
+287,16
@@
bool server_startup_st::start_server(const std::string& server_type, in_port_t t
server->build(argc, argv);
server->build(argc, argv);
+#if 0
if (false)
{
Out << "Pausing for startup, hit return when ready.";
std::string gdb_command= server->base_command();
if (false)
{
Out << "Pausing for startup, hit return when ready.";
std::string gdb_command= server->base_command();
- std::string options;
-#if 0
- Out << "run " << server->args(options);
-#endif
getchar();
}
getchar();
}
- else if (server->start() == false)
+ else
+#endif
+ if (server->start() == false)
{
delete server;
return false;
{
delete server;
return false;
@@
-397,17
+396,18
@@
bool server_startup_st::start_socket_server(const std::string& server_type, cons
server->build(argc, argv);
server->build(argc, argv);
+#if 0
if (false)
{
Out << "Pausing for startup, hit return when ready.";
std::string gdb_command= server->base_command();
std::string options;
if (false)
{
Out << "Pausing for startup, hit return when ready.";
std::string gdb_command= server->base_command();
std::string options;
-#if 0
Out << "run " << server->args(options);
Out << "run " << server->args(options);
-#endif
getchar();
}
getchar();
}
- else if (server->start() == false)
+ else
+#endif
+ if (server->start() == false)
{
Error << "Failed to start " << *server;
delete server;
{
Error << "Failed to start " << *server;
delete server;
diff --git
a/libtest/unittest.cc
b/libtest/unittest.cc
index b68669f51829f56c1c10c0400869f38906d2a39b..3d85b77d6186e3731c065ceaf55d05001523a56a 100644
(file)
--- a/
libtest/unittest.cc
+++ b/
libtest/unittest.cc
@@
-179,7
+179,6
@@
static test_return_t var_drizzle_exists_test(void *)
static test_return_t var_tmp_test(void *)
{
FILE *file= fopen("var/tmp/junk", "w+");
static test_return_t var_tmp_test(void *)
{
FILE *file= fopen("var/tmp/junk", "w+");
- char buffer[1024];
test_true(file);
fclose(file);
return TEST_SUCCESS;
test_true(file);
fclose(file);
return TEST_SUCCESS;