Internal coverage: Misc cleanups

This commit is contained in:
Wilson Snyder 2020-09-07 13:11:44 -04:00
parent 993115d30a
commit cc134b38ee
3 changed files with 4 additions and 12 deletions

View File

@ -48,12 +48,14 @@ exclude_line_regexp(qr/(\bv3fatalSrc\b
|\bVL_UNCOVERABLE\b |\bVL_UNCOVERABLE\b
|\bVL_FATAL |\bVL_FATAL
|\bUASSERT |\bUASSERT
|\bNUM_ASSERT
|\bERROR_RSVD_WORD |\bERROR_RSVD_WORD
|\bV3ERROR_NA |\bV3ERROR_NA
|\bUINFO\b)/x); |\bUINFO\b)/x);
# Exclude for branch coverage only # Exclude for branch coverage only
exclude_branch_regexp(qr/(\bdebug\(\) exclude_branch_regexp(qr/(\bdebug\(\)
|\bassert\(
|\bSELF_CHECK)/x); |\bSELF_CHECK)/x);
1; 1;

View File

@ -431,15 +431,6 @@ string V3Options::allArgsStringForHierBlock(bool forTop) const {
//###################################################################### //######################################################################
// File searching // File searching
bool V3Options::fileStatDir(const string& filename) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
struct stat sstat; // Stat information
int err = stat(filename.c_str(), &sstat);
if (err != 0) return false;
if (!S_ISDIR(sstat.st_mode)) return false;
return true;
}
bool V3Options::fileStatNormal(const string& filename) { bool V3Options::fileStatNormal(const string& filename) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init) // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
struct stat sstat; // Stat information struct stat sstat; // Stat information
@ -651,9 +642,9 @@ string V3Options::getenvSYSTEMC_ARCH() {
struct utsname uts; struct utsname uts;
uname(&uts); uname(&uts);
string sysname = VString::downcase(uts.sysname); // aka 'uname -s' string sysname = VString::downcase(uts.sysname); // aka 'uname -s'
if (VString::wildmatch(sysname.c_str(), "*solaris*")) { if (VL_UNCOVERABLE(VString::wildmatch(sysname.c_str(), "*solaris*"))) {
var = "gccsparcOS5"; var = "gccsparcOS5";
} else if (VString::wildmatch(sysname.c_str(), "*cygwin*")) { } else if (VL_UNCOVERABLE(VString::wildmatch(sysname.c_str(), "*cygwin*"))) {
var = "cygwin"; var = "cygwin";
} else { } else {
var = "linux"; var = "linux";

View File

@ -671,7 +671,6 @@ public:
const string& errmsg); const string& errmsg);
void filePathLookedMsg(FileLine* fl, const string& modname); void filePathLookedMsg(FileLine* fl, const string& modname);
V3LangCode fileLanguage(const string& filename); V3LangCode fileLanguage(const string& filename);
static bool fileStatDir(const string& filename);
static bool fileStatNormal(const string& filename); static bool fileStatNormal(const string& filename);
static void fileNfsFlush(const string& filename); static void fileNfsFlush(const string& filename);