X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fmain.cc;h=588512d1a5ef78652f4299ca2be02be30cb0206d;hb=20ac79fc8f8999f39b4fb33e55d4a205ce0c9a10;hp=6231ba121f8d47a06af10f07c03f65e70ca415f5;hpb=293e7b59e12ff6b95b5463614b09bc0158f14592;p=awesomized%2Flibmemcached diff --git a/libtest/main.cc b/libtest/main.cc index 6231ba12..588512d1 100644 --- a/libtest/main.cc +++ b/libtest/main.cc @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) { { "version", no_argument, NULL, OPT_LIBYATL_VERSION }, { "quiet", no_argument, NULL, OPT_LIBYATL_QUIET }, - { "repeat", no_argument, NULL, OPT_LIBYATL_REPEAT }, + { "repeat", required_argument, NULL, OPT_LIBYATL_REPEAT }, { "collection", required_argument, NULL, OPT_LIBYATL_MATCH_COLLECTION }, { "wildcard", required_argument, NULL, OPT_LIBYATL_MATCH_WILDCARD }, { "massive", no_argument, NULL, OPT_LIBYATL_MASSIVE }, @@ -284,6 +284,7 @@ int main(int argc, char *argv[]) std::auto_ptr frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard)); // Run create(), bail on error. + try { switch (frame->create()) { @@ -298,6 +299,10 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } } + catch (libtest::__skipped e) + { + return EXIT_SKIP; + } frame->exec(); @@ -340,6 +345,15 @@ int main(int argc, char *argv[]) Outn(); // Generate a blank to break up the messages if make check/test has been run } while (exit_code == EXIT_SUCCESS and --opt_repeat); } + catch (libtest::__skipped e) + { + return EXIT_SKIP; + } + catch (libtest::__failure e) + { + libtest::stream::make_cout(e.file(), e.line(), e.func()) << e.what(); + exit_code= EXIT_FAILURE; + } catch (libtest::fatal& e) { std::cerr << "FATAL:" << e.what() << std::endl;