diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-08-12 17:36:03 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-08-12 17:41:39 +0200 |
commit | c58ac63c97183dde25b7a42c1a8e85ab0dd7fe96 (patch) | |
tree | 0a863e7c774f230f176d2217a8a249b2fc424cf9 /passes | |
parent | bfcd08a323044e1856ca971ba942bd36ee979f8e (diff) | |
download | yosys-c58ac63c97183dde25b7a42c1a8e85ab0dd7fe96.tar.gz yosys-c58ac63c97183dde25b7a42c1a8e85ab0dd7fe96.tar.bz2 yosys-c58ac63c97183dde25b7a42c1a8e85ab0dd7fe96.zip |
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.
Diffstat (limited to 'passes')
-rw-r--r-- | passes/cmds/logger.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/passes/cmds/logger.cc b/passes/cmds/logger.cc index d06939c2e..ec92f1d01 100644 --- a/passes/cmds/logger.cc +++ b/passes/cmds/logger.cc @@ -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); |