fprintf(f, "\n");
}
+ if (log_expect_no_warnings && log_warnings_count)
+ log_error("Warnings: %d unique messages, %d total\n", GetSize(log_warnings), log_warnings_count);
+
if (print_stats)
{
std::string hash = log_hasher->final().substr(0, 10);
std::vector<std::pair<std::regex,LogExpectedItem>> log_expect_log, log_expect_warning, log_expect_error;
std::set<std::string> log_warnings, log_experimentals, log_experimentals_ignored;
int log_warnings_count = 0;
+bool log_expect_no_warnings = false;
bool log_hdump_all = false;
FILE *log_errfile = NULL;
SHA1 *log_hasher = NULL;
extern std::vector<std::regex> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
extern std::set<std::string> log_warnings, log_experimentals, log_experimentals_ignored;
extern int log_warnings_count;
+extern bool log_expect_no_warnings;
extern bool log_hdump_all;
extern FILE *log_errfile;
extern SHA1 *log_hasher;
log(" -expect <type> <regex> <expected_count>\n");
log(" expect log,warning or error to appear. In case of error return code is 0.\n");
log("\n");
+ log(" -expect-no-warnings\n");
+ log(" gives error in case there is at least one warning.\n");
+ log("\n");
}
void execute(std::vector<std::string> args, RTLIL::Design * design) YS_OVERRIDE
continue;
}
+ if (args[argidx] == "-expect-no-warnings") {
+ log_expect_no_warnings = true;
+ continue;
+ }
break;
}
extra_args(args, argidx, design, false);