mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
logger: Add -check-expected subcommand.
This allows us to have multiple "expect this warning" calls in a single long script, covering only as many passes as necessary.
This commit is contained in:
parent
bfcd08a323
commit
c58ac63c97
2 changed files with 14 additions and 5 deletions
|
@ -64,6 +64,11 @@ struct LoggerPass : public Pass {
|
|||
log(" -expect-no-warnings\n");
|
||||
log(" gives error in case there is at least one warning that is not expected.\n");
|
||||
log("\n");
|
||||
log(" -check-expected\n");
|
||||
log(" verifies that the patterns previously set up by -expect have actually\n");
|
||||
log(" been met, then clears the expected log list. If this is not called\n");
|
||||
log(" manually, the check will happen at yosys exist time instead.\n");
|
||||
log("\n");
|
||||
}
|
||||
|
||||
void execute(std::vector<std::string> args, RTLIL::Design * design) override
|
||||
|
@ -176,6 +181,10 @@ struct LoggerPass : public Pass {
|
|||
log_expect_no_warnings = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-check-expected") {
|
||||
log_check_expected();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
extra_args(args, argidx, design, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue