*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/blobslap_worker.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
using namespace libtest;
#pragma once
-#include <config.h>
-
#include <cassert>
#include <cerrno>
#include <cstdlib>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <unistd.h>
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/failed.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cstdarg>
*/
+#include <config.h>
#include <libtest/common.h>
#include <iostream>
*/
+#include <config.h>
#include <libtest/common.h>
#include <libtest/gearmand.h>
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
*/
+#include <config.h>
#include <libtest/common.h>
#include <cstdlib>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <string>
*/
+#include <config.h>
#include <libtest/common.h>
#include <libmemcached-1.0/memcached.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
{
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());
}
}
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
}
else if (server->start() == false)
{
- Error << "Failed to start " << *server;
delete server;
return false;
}
*/
+#include <config.h>
#include <libtest/common.h>
#include <csignal>
* 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 };
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
#include <cassert>
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())
Stats stats;
- get_world(world);
+ get_world(&world);
test_return_t error;
- void *creators_ptr= world->create(error);
+ void *creators_ptr= world.create(error);
switch (error)
{
case TEST_SKIPPED:
Out << "SKIP " << argv[0];
- delete world;
return EXIT_SUCCESS;
case TEST_FAILURE:
- delete world;
return EXIT_FAILURE;
}
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;
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)
{
- collection_rc= world->runner()->pre(next->pre, creators_ptr);
+ collection_rc= world.runner()->pre(next->pre, creators_ptr);
}
switch (collection_rc)
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
- 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);
- assert(world->runner());
+ assert(world.runner());
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.
}
// @todo do something if post fails
- (void)world->item.post(creators_ptr);
+ (void)world.item.post(creators_ptr);
}
else if (return_code == TEST_SKIPPED)
{ }
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);
}
}
- (void) world->runner()->post(next->post, creators_ptr);
+ (void) world.runner()->post(next->post, creators_ptr);
cleanup:
if (failed == false and skipped == false)
stats.collection_skipped++;
}
- world->shutdown(creators_ptr);
+ world.shutdown(creators_ptr);
Outn();
}
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);
}
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
#include <libtest/common.h>
namespace libtest {