X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bdef81fa4e3566ce31b435deb98fea7b8fe70e6e..b348b0d4cff528bb4562222aa9f7874b8d30626f:/src/mc/checker/simgrid_mc.cpp diff --git a/src/mc/checker/simgrid_mc.cpp b/src/mc/checker/simgrid_mc.cpp index 1b0c120c28..cf5164b391 100644 --- a/src/mc/checker/simgrid_mc.cpp +++ b/src/mc/checker/simgrid_mc.cpp @@ -19,14 +19,14 @@ #include "simgrid/sg_config.h" #include "src/xbt_modinter.h" +#include "src/mc/Session.hpp" +#include "src/mc/checker/Checker.hpp" #include "src/mc/mc_base.h" -#include "src/mc/mc_private.h" -#include "src/mc/mc_protocol.h" -#include "src/mc/mc_safety.h" #include "src/mc/mc_comm_pattern.h" #include "src/mc/mc_exit.h" -#include "src/mc/Session.hpp" -#include "src/mc/checker/Checker.hpp" +#include "src/mc/mc_private.h" +#include "src/mc/mc_safety.h" +#include "src/mc/remote/mc_protocol.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_main, mc, "Entry point for simgrid-mc"); @@ -77,7 +77,16 @@ int main(int argc, char** argv) simgrid::mc::session = session.get(); std::unique_ptr checker = createChecker(*session); - int res = checker->run(); + int res = SIMGRID_MC_EXIT_SUCCESS; + try { + checker->run(); + } catch (simgrid::mc::DeadlockError& de) { + res = SIMGRID_MC_EXIT_DEADLOCK; + } catch (simgrid::mc::TerminationError& te) { + res = SIMGRID_MC_EXIT_NON_TERMINATION; + } catch (simgrid::mc::LivenessError& le) { + res = SIMGRID_MC_EXIT_LIVENESS; + } checker = nullptr; session->close(); return res;