X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e308224e1a73ae2e9d7beca3ab6bf7a640ff471c..8da27cf4b7b05ed45b085557d76cbb0b6dd34cd9:/src/mc/mc_config.cpp diff --git a/src/mc/mc_config.cpp b/src/mc/mc_config.cpp index b66a228b1e..cfe3511b25 100644 --- a/src/mc/mc_config.cpp +++ b/src/mc/mc_config.cpp @@ -3,6 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "src/mc/mc_config.hpp" #include "src/mc/mc_replay.hpp" #include #if SIMGRID_HAVE_MC @@ -32,11 +33,13 @@ static void _mc_cfg_cb_check(const char* spec, bool more_check = true) /* Replay (this part is enabled even if MC it disabled) */ simgrid::config::Flag _sg_mc_record_path{ - "model-check/replay", "Model-check path to replay (as reported by SimGrid when a violation is reported)", ""}; + "model-check/replay", "Model-check path to replay (as reported by SimGrid when a violation is reported)", "", + [](const std::string& value) { MC_record_path() = value; }}; simgrid::config::Flag _sg_mc_timeout{ - "model-check/timeout", "Whether to enable timeouts for wait requests", false, - [](bool) { _mc_cfg_cb_check("value to enable/disable timeout for wait requests", MC_record_path.empty()); }}; + "model-check/timeout", "Whether to enable timeouts for wait requests", false, [](bool) { + _mc_cfg_cb_check("value to enable/disable timeout for wait requests", not MC_record_replay_is_active()); + }}; #if SIMGRID_HAVE_MC int _sg_do_model_check = 0;