projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix it so socket is built just on main tests.
[m6w6/libmemcached]
/
libtest
/
test.cc
diff --git
a/libtest/test.cc
b/libtest/test.cc
index 5b1a20156d083bfe3e76d52753084d2124214fae..d71057d36bdf14f8f93457a644d5a96b771585fe 100644
(file)
--- a/
libtest/test.cc
+++ b/
libtest/test.cc
@@
-167,7
+167,11
@@
int main(int argc, char *argv[])
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
- setup_signals();
+ libtest::SignalThread signal;
+ if (not signal.setup())
+ {
+ return EXIT_FAILURE;
+ }
Stats stats;
Stats stats;
@@
-203,7
+207,7
@@
int main(int argc, char *argv[])
wildcard= argv[2];
}
wildcard= argv[2];
}
- for (collection_st *next= world->collections; next->name and (not is_shutdown()); next++)
+ for (collection_st *next= world->collections; next->name and (not
signal.
is_shutdown()); next++)
{
test_return_t collection_rc= TEST_SUCCESS;
bool failed= false;
{
test_return_t collection_rc= TEST_SUCCESS;
bool failed= false;
@@
-230,7
+234,7
@@
int main(int argc, char *argv[])
case TEST_FAILURE:
Out << next->name << " [ failed ]";
failed= true;
case TEST_FAILURE:
Out << next->name << " [ failed ]";
failed= true;
- set_shutdown(SHUTDOWN_GRACEFUL);
+ s
ignal.s
et_shutdown(SHUTDOWN_GRACEFUL);
goto cleanup;
case TEST_SKIPPED:
goto cleanup;
case TEST_SKIPPED:
@@
-280,7
+284,7
@@
int main(int argc, char *argv[])
else if (return_code == TEST_FAILURE)
{
Error << " item.flush(failure)";
else if (return_code == TEST_FAILURE)
{
Error << " item.flush(failure)";
- set_shutdown(SHUTDOWN_GRACEFUL);
+ s
ignal.s
et_shutdown(SHUTDOWN_GRACEFUL);
}
}
else if (return_code == TEST_SKIPPED)
}
}
else if (return_code == TEST_SKIPPED)
@@
-288,7
+292,7
@@
int main(int argc, char *argv[])
else if (return_code == TEST_FAILURE)
{
Error << " item.startup(failure)";
else if (return_code == TEST_FAILURE)
{
Error << " item.startup(failure)";
- set_shutdown(SHUTDOWN_GRACEFUL);
+ s
ignal.s
et_shutdown(SHUTDOWN_GRACEFUL);
}
stats.total++;
}
stats.total++;
@@
-320,7
+324,7
@@
int main(int argc, char *argv[])
if (test_failed(world->on_error(return_code, creators_ptr)))
{
Error << "Failed while running on_error()";
if (test_failed(world->on_error(return_code, creators_ptr)))
{
Error << "Failed while running on_error()";
- set_shutdown(SHUTDOWN_GRACEFUL);
+ s
ignal.s
et_shutdown(SHUTDOWN_GRACEFUL);
break;
}
}
break;
}
}
@@
-347,13
+351,13
@@
cleanup:
Outn();
}
Outn();
}
- if (not is_shutdown())
+ if (not
signal.
is_shutdown())
{
{
- set_shutdown(SHUTDOWN_GRACEFUL);
+ s
ignal.s
et_shutdown(SHUTDOWN_GRACEFUL);
}
int exit_code= EXIT_SUCCESS;
}
int exit_code= EXIT_SUCCESS;
- shutdown_t status= get_shutdown();
+ shutdown_t status=
signal.
get_shutdown();
if (status == SHUTDOWN_FORCED)
{
Out << "Tests were aborted.";
if (status == SHUTDOWN_FORCED)
{
Out << "Tests were aborted.";