3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 17:15:33 +00:00

Option to expect no warnings

This commit is contained in:
Miodrag Milanovic 2020-02-17 15:36:06 +01:00
parent d8735b2913
commit 5641b0248f
4 changed files with 12 additions and 0 deletions

View file

@ -558,6 +558,9 @@ int main(int argc, char **argv)
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);

View file

@ -45,6 +45,7 @@ std::vector<std::regex> log_warn_regexes, log_nowarn_regexes, log_werror_regexes
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;

View file

@ -52,6 +52,7 @@ extern std::map<std::string, std::set<std::string>> log_hdump;
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;