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:
f527ad0
)
Update of libtest
author
Brian Aker
<brian@tangent.org>
Sun, 11 Mar 2012 07:40:27 +0000
(23:40 -0800)
committer
Brian Aker
<brian@tangent.org>
Sun, 11 Mar 2012 07:40:27 +0000
(23:40 -0800)
25 files changed:
libtest/binaries.cc
patch
|
blob
|
history
libtest/blobslap_worker.cc
patch
|
blob
|
history
libtest/cmdline.cc
patch
|
blob
|
history
libtest/common.h
patch
|
blob
|
history
libtest/core.cc
patch
|
blob
|
history
libtest/cpu.cc
patch
|
blob
|
history
libtest/dream.cc
patch
|
blob
|
history
libtest/failed.cc
patch
|
blob
|
history
libtest/fatal.cc
patch
|
blob
|
history
libtest/framework.cc
patch
|
blob
|
history
libtest/gearmand.cc
patch
|
blob
|
history
libtest/http.cc
patch
|
blob
|
history
libtest/is_local.cc
patch
|
blob
|
history
libtest/killpid.cc
patch
|
blob
|
history
libtest/libtool.cc
patch
|
blob
|
history
libtest/memcached.cc
patch
|
blob
|
history
libtest/port.cc
patch
|
blob
|
history
libtest/runner.cc
patch
|
blob
|
history
libtest/server.cc
patch
|
blob
|
history
libtest/server_container.cc
patch
|
blob
|
history
libtest/signal.cc
patch
|
blob
|
history
libtest/socket.cc
patch
|
blob
|
history
libtest/strerror.cc
patch
|
blob
|
history
libtest/test.cc
patch
|
blob
|
history
libtest/vchar.cc
patch
|
blob
|
history
diff --git
a/libtest/binaries.cc
b/libtest/binaries.cc
index 33cde3b74700b4544e5a748e227213d068532189..e437f96942cdc285232f992b6fca986134073b34 100644
(file)
--- a/
libtest/binaries.cc
+++ b/
libtest/binaries.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
#include <libtest/common.h>
namespace libtest {
diff --git
a/libtest/blobslap_worker.cc
b/libtest/blobslap_worker.cc
index fe1cdce31baeaa6f75b72fd1b5bd1596dbf93cc0..caddbdd764cc5d9944e30e94343a4ff5fade480f 100644
(file)
--- a/
libtest/blobslap_worker.cc
+++ b/
libtest/blobslap_worker.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/blobslap_worker.h>
#include <libtest/common.h>
#include <libtest/blobslap_worker.h>
diff --git
a/libtest/cmdline.cc
b/libtest/cmdline.cc
index efe03040e5088f1742ba95059830433ba077b305..76b677f47aade5bef8659dbcf02837bd829bdb79 100644
(file)
--- a/
libtest/cmdline.cc
+++ b/
libtest/cmdline.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
using namespace libtest;
#include <libtest/common.h>
using namespace libtest;
diff --git
a/libtest/common.h
b/libtest/common.h
index 1e50bf08a203221f3cd5b33460946b53fea75c9e..05f273a72bf6102317533a32e341df1eecaf31e4 100644
(file)
--- a/
libtest/common.h
+++ b/
libtest/common.h
@@
-25,8
+25,6
@@
#pragma once
#pragma once
-#include <config.h>
-
#include <cassert>
#include <cerrno>
#include <cstdlib>
#include <cassert>
#include <cerrno>
#include <cstdlib>
diff --git
a/libtest/core.cc
b/libtest/core.cc
index 3e30444a12eeb65fe701a94eae3d18bbea6f5d7b..fac66616eae4a45b3cb663af28299f0242889ddd 100644
(file)
--- a/
libtest/core.cc
+++ b/
libtest/core.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/common.h>
diff --git
a/libtest/cpu.cc
b/libtest/cpu.cc
index d75df955708d0da174ae7ff1f8b588657673bac4..10bb303c1c94e64dbb1f9c1f523f702fb33fb5f5 100644
(file)
--- a/
libtest/cpu.cc
+++ b/
libtest/cpu.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <unistd.h>
#include <libtest/common.h>
#include <unistd.h>
diff --git
a/libtest/dream.cc
b/libtest/dream.cc
index 32dece35d247cc542607efa32690061dc1c158eb..c03bd9027ebd10636e72c0e9cdb06dda0095a5fe 100644
(file)
--- a/
libtest/dream.cc
+++ b/
libtest/dream.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
#include <libtest/common.h>
namespace libtest {
diff --git
a/libtest/failed.cc
b/libtest/failed.cc
index 11e237dcf8220ff85a6b59f7dc2a0c692ba88208..88b84664219bf7fc03736f35d0d23c4bcb73d27a 100644
(file)
--- a/
libtest/failed.cc
+++ b/
libtest/failed.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/failed.h>
#include <libtest/common.h>
#include <libtest/failed.h>
diff --git
a/libtest/fatal.cc
b/libtest/fatal.cc
index 36683a48ed51d69810a55093fb4a4a385206e624..4cef2047b5f4c06f0de5a61eca718871b903240d 100644
(file)
--- a/
libtest/fatal.cc
+++ b/
libtest/fatal.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cstdarg>
#include <libtest/common.h>
#include <cstdarg>
diff --git
a/libtest/framework.cc
b/libtest/framework.cc
index 1541e7da7a4b4578c4f9764d6f14c6466ee0d476..a9730a0e95d86294a7d20fd565f95dababf7fd3a 100644
(file)
--- a/
libtest/framework.cc
+++ b/
libtest/framework.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <iostream>
#include <libtest/common.h>
#include <iostream>
diff --git
a/libtest/gearmand.cc
b/libtest/gearmand.cc
index 4a544f10b9671eeb35b5263e2ee4b069c40e440b..85307fcf0825b60a056fc41c46ba47d72fb2a77d 100644
(file)
--- a/
libtest/gearmand.cc
+++ b/
libtest/gearmand.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/gearmand.h>
#include <libtest/common.h>
#include <libtest/gearmand.h>
diff --git
a/libtest/http.cc
b/libtest/http.cc
index 5309d50447a7dea2bdbadc047e2caea445917dc3..1a0a10ec0525a973368aa0283bdaec3abc57d3af 100644
(file)
--- a/
libtest/http.cc
+++ b/
libtest/http.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#if defined(HAVE_CURL_CURL_H) && HAVE_CURL_CURL_H
#include <libtest/common.h>
#if defined(HAVE_CURL_CURL_H) && HAVE_CURL_CURL_H
diff --git
a/libtest/is_local.cc
b/libtest/is_local.cc
index dfc303b23be6d103e0047be0f3901ab8aa48b8f6..ec3322af32a246fe60f7608cf4df4c9da7effde7 100644
(file)
--- a/
libtest/is_local.cc
+++ b/
libtest/is_local.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/common.h>
diff --git
a/libtest/killpid.cc
b/libtest/killpid.cc
index 79f6a3f81cb59f936717fcd4e6c704b7f3c268a4..cfc9316f34e2b02976060ffb09035077aa07fb5a 100644
(file)
--- a/
libtest/killpid.cc
+++ b/
libtest/killpid.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <cstdlib>
#include <libtest/common.h>
#include <cstdlib>
diff --git
a/libtest/libtool.cc
b/libtest/libtool.cc
index 90f0035e5a5ffdd9ff62a05c079f6a245e9102f2..5beea9b96ce448b8d4b66ef549471cd765fda5e0 100644
(file)
--- a/
libtest/libtool.cc
+++ b/
libtest/libtool.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <string>
#include <libtest/common.h>
#include <string>
diff --git
a/libtest/memcached.cc
b/libtest/memcached.cc
index c5358bf53fa5da4bdf4b6b7c68f777bddd87c873..81068aef0c4c33f4b0349a2bf833059656e53e5f 100644
(file)
--- a/
libtest/memcached.cc
+++ b/
libtest/memcached.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <libmemcached-1.0/memcached.h>
#include <libtest/common.h>
#include <libmemcached-1.0/memcached.h>
diff --git
a/libtest/port.cc
b/libtest/port.cc
index b6820335f1c3d610874da501710c67c219fe5006..2561343dd987a279f6b389d60d2a67d45223b69c 100644
(file)
--- a/
libtest/port.cc
+++ b/
libtest/port.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
#include <libtest/common.h>
#include <cassert>
diff --git
a/libtest/runner.cc
b/libtest/runner.cc
index b205b0e79e50622578f62d8761e5c264a1c65da6..6b8d0d483424fc7dc28940b0626ed4d2129743ab 100644
(file)
--- a/
libtest/runner.cc
+++ b/
libtest/runner.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
#include <libtest/common.h>
namespace libtest {
diff --git
a/libtest/server.cc
b/libtest/server.cc
index e554039a1c523d8dea88c4c869f89f067af85ed8..31ea6effab54d2d5d5081efd45c59bb9fdcb5f5f 100644
(file)
--- a/
libtest/server.cc
+++ b/
libtest/server.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
#include <libtest/common.h>
#include <cassert>
@@
-180,9
+181,11
@@
bool Server::start()
{
Wait wait(pid_file(), 8);
{
Wait wait(pid_file(), 8);
- if (
not wait.successful()
)
+ if (
wait.successful() == false
)
{
{
- Error << "Unable to open pidfile for: " << _running;
+ libtest::fatal(LIBYATL_DEFAULT_PARAM,
+ "Unable to open pidfile for: %s",
+ _running.c_str());
}
}
}
}
diff --git
a/libtest/server_container.cc
b/libtest/server_container.cc
index 6d0c785e7de5f20d5d2d06d549ed7545e5b749ff..ff44228ab4c8c85c6d05211640437626c5907bec 100644
(file)
--- a/
libtest/server_container.cc
+++ b/
libtest/server_container.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
#include <libtest/common.h>
#include <cassert>
@@
-235,7
+236,6
@@
bool server_startup(server_startup_st& construct, const std::string& server_type
}
else if (server->start() == false)
{
}
else if (server->start() == false)
{
- Error << "Failed to start " << *server;
delete server;
return false;
}
delete server;
return false;
}
diff --git
a/libtest/signal.cc
b/libtest/signal.cc
index 42e6d78da39234032bb3736aa6df3ccfe22c5ad0..bc9da4bc33b7eebefd705bf43a0f508657848be8 100644
(file)
--- a/
libtest/signal.cc
+++ b/
libtest/signal.cc
@@
-20,6
+20,7
@@
*/
*/
+#include <config.h>
#include <libtest/common.h>
#include <csignal>
#include <libtest/common.h>
#include <csignal>
diff --git
a/libtest/socket.cc
b/libtest/socket.cc
index 21fade0b305cfb8fa842984050c825558a2f4639..832f0c4a945f17b3081708533a58ef473ec35553 100644
(file)
--- a/
libtest/socket.cc
+++ b/
libtest/socket.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
static char global_socket[1024]= { 0 };
#include <libtest/common.h>
static char global_socket[1024]= { 0 };
diff --git
a/libtest/strerror.cc
b/libtest/strerror.cc
index d081bafcd2d433af39afedb4d1ee399e5d16df32..0739d625f12d469ba7ffc34ea69a5ba0c3182aa4 100644
(file)
--- a/
libtest/strerror.cc
+++ b/
libtest/strerror.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
#include <libtest/common.h>
namespace libtest {
diff --git
a/libtest/test.cc
b/libtest/test.cc
index 66d258a0b009094430793e268598203ee8a836b9..d367603d4d4e380074b36245bc7fbd011d8ac168 100644
(file)
--- a/
libtest/test.cc
+++ b/
libtest/test.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
#include <libtest/common.h>
#include <cassert>
@@
-192,15
+193,9
@@
int main(int argc, char *argv[])
try {
do {
exit_code= EXIT_SUCCESS;
try {
do {
exit_code= EXIT_SUCCESS;
- Framework
*world= new Framework()
;
+ Framework
world
;
- if (world == NULL)
- {
- Error << "Failed to create Framework()";
- return EXIT_FAILURE;
- }
-
- assert(sigignore(SIGPIPE) == 0);
+ fatal_assert(sigignore(SIGPIPE) == 0);
libtest::SignalThread signal;
if (not signal.setup())
libtest::SignalThread signal;
if (not signal.setup())
@@
-211,10
+206,10
@@
int main(int argc, char *argv[])
Stats stats;
Stats stats;
- get_world(world);
+ get_world(
&
world);
test_return_t error;
test_return_t error;
- void *creators_ptr= world
->
create(error);
+ void *creators_ptr= world
.
create(error);
switch (error)
{
switch (error)
{
@@
-223,11
+218,9
@@
int main(int argc, char *argv[])
case TEST_SKIPPED:
Out << "SKIP " << argv[0];
case TEST_SKIPPED:
Out << "SKIP " << argv[0];
- delete world;
return EXIT_SUCCESS;
case TEST_FAILURE:
return EXIT_SUCCESS;
case TEST_FAILURE:
- delete world;
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
@@
-250,7
+243,7
@@
int main(int argc, char *argv[])
wildcard= argv[2];
}
wildcard= argv[2];
}
- for (collection_st *next= world
->
collections; next and next->name and (not signal.is_shutdown()); next++)
+ for (collection_st *next= world
.
collections; next and next->name and (not signal.is_shutdown()); next++)
{
bool failed= false;
bool skipped= false;
{
bool failed= false;
bool skipped= false;
@@
-262,11
+255,11
@@
int main(int argc, char *argv[])
stats.collection_total++;
stats.collection_total++;
- test_return_t collection_rc= world
->
startup(creators_ptr);
+ test_return_t collection_rc= world
.
startup(creators_ptr);
if (collection_rc == TEST_SUCCESS and next->pre)
{
if (collection_rc == TEST_SUCCESS and next->pre)
{
- collection_rc= world
->
runner()->pre(next->pre, creators_ptr);
+ collection_rc= world
.
runner()->pre(next->pre, creators_ptr);
}
switch (collection_rc)
}
switch (collection_rc)
@@
-303,20
+296,20
@@
int main(int argc, char *argv[])
test_return_t return_code;
try {
test_return_t return_code;
try {
- if (test_success(return_code= world
->
item.startup(creators_ptr)))
+ if (test_success(return_code= world
.
item.startup(creators_ptr)))
{
{
- if (test_success(return_code= world
->
item.flush(creators_ptr, run)))
+ if (test_success(return_code= world
.
item.flush(creators_ptr, run)))
{
// @note pre will fail is SKIPPED is returned
{
// @note pre will fail is SKIPPED is returned
- if (test_success(return_code= world
->
item.pre(creators_ptr)))
+ if (test_success(return_code= world
.
item.pre(creators_ptr)))
{
{ // Runner Code
gettimeofday(&start_time, NULL);
{
{ // Runner Code
gettimeofday(&start_time, NULL);
- assert(world
->
runner());
+ assert(world
.
runner());
assert(run->test_fn);
try
{
assert(run->test_fn);
try
{
- return_code= world
->
runner()->run(run->test_fn, creators_ptr);
+ return_code= world
.
runner()->run(run->test_fn, creators_ptr);
}
// Special case where check for the testing of the exception
// system.
}
// Special case where check for the testing of the exception
// system.
@@
-339,7
+332,7
@@
int main(int argc, char *argv[])
}
// @todo do something if post fails
}
// @todo do something if post fails
- (void)world
->
item.post(creators_ptr);
+ (void)world
.
item.post(creators_ptr);
}
else if (return_code == TEST_SKIPPED)
{ }
}
else if (return_code == TEST_SKIPPED)
{ }
@@
-394,7
+387,7
@@
int main(int argc, char *argv[])
throw fatal_message("invalid return code");
}
throw fatal_message("invalid return code");
}
- if (test_failed(world
->
on_error(return_code, creators_ptr)))
+ if (test_failed(world
.
on_error(return_code, creators_ptr)))
{
Error << "Failed while running on_error()";
signal.set_shutdown(SHUTDOWN_GRACEFUL);
{
Error << "Failed while running on_error()";
signal.set_shutdown(SHUTDOWN_GRACEFUL);
@@
-402,7
+395,7
@@
int main(int argc, char *argv[])
}
}
}
}
- (void) world
->
runner()->post(next->post, creators_ptr);
+ (void) world
.
runner()->post(next->post, creators_ptr);
cleanup:
if (failed == false and skipped == false)
cleanup:
if (failed == false and skipped == false)
@@
-420,7
+413,7
@@
cleanup:
stats.collection_skipped++;
}
stats.collection_skipped++;
}
- world
->
shutdown(creators_ptr);
+ world
.
shutdown(creators_ptr);
Outn();
}
Outn();
}
@@
-451,8
+444,6
@@
cleanup:
stats_print(&stats);
stats_print(&stats);
- delete world;
-
Outn(); // Generate a blank to break up the messages if make check/test has been run
} while (exit_code == EXIT_SUCCESS and opt_repeat);
}
Outn(); // Generate a blank to break up the messages if make check/test has been run
} while (exit_code == EXIT_SUCCESS and opt_repeat);
}
diff --git
a/libtest/vchar.cc
b/libtest/vchar.cc
index 779cfbba065cf810f6b7b403803ecfd1c76c2cc0..9e0b92a47f69fe326f5c65cb3899ffc581ca462d 100644
(file)
--- a/
libtest/vchar.cc
+++ b/
libtest/vchar.cc
@@
-19,6
+19,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
#include <libtest/common.h>
namespace libtest {