tools/import-trace: sanity checks

These can be enabled if something looks fishy.

Change-Id: Iba4f73dc0a70ec4e548456edb36e21fecbaad410
This commit is contained in:
Horst Schirmeier
2013-04-08 15:37:19 +02:00
parent 9273872d43
commit 79363aec21
3 changed files with 108 additions and 3 deletions

View File

@ -100,6 +100,11 @@ int main(int argc, char *argv[]) {
// "--faultspace-cutoff-end \tCut off fault space end (no, lastr) "
// "(default: no)");
CommandLine::option_handle ENABLE_SANITYCHECKS =
cmd.addOption("", "enable-sanitychecks", Arg::None,
"--enable-sanitychecks \tEnable sanity checks "
"(in case something looks fishy)"
"(default: disabled)");
if (!cmd.parse()) {
std::cerr << "Error parsing arguments." << std::endl;
@ -181,6 +186,10 @@ int main(int argc, char *argv[]) {
importer->set_faultspace_rightmargin('W');
}
if (cmd[ENABLE_SANITYCHECKS].count() > 0) {
importer->set_sanitychecks(true);
}
if (!importer->init(variant, benchmark, db)) {
LOG << "importer->init() failed" << endl;
exit(-1);