Support spaces in verilator flags

This commit is contained in:
Wilson Snyder 2010-01-18 20:37:20 -05:00
parent 27e4503dc6
commit d182ecb2d3
3 changed files with 13 additions and 3 deletions

View File

@ -57,7 +57,10 @@ push @ARGV, (split ' ',$ENV{VERILATOR_TEST_FLAGS}||"");
# We sneak a look at the flags so we can do some pre-environment checks
# All flags will hit verilator...
@Opt_Verilator_Sw = @ARGV;
foreach my $sw (@ARGV) {
$sw = "'$sw'" if $sw =~ m![^---a-zA-Z0-9_/\\:.+]!;
push @Opt_Verilator_Sw, $sw;
}
Getopt::Long::config ("no_auto_abbrev","pass_through");
if (! GetOptions (

View File

@ -449,7 +449,7 @@ inline bool V3Options::wildmatchi(const char* s, const char* p) {
return true;
}
}
return(*s == '\0' || *s == '[');
return (*s == '\0');
}
bool V3Options::wildmatch(const char* s, const char* p) {
@ -467,7 +467,7 @@ bool V3Options::wildmatch(const char* s, const char* p) {
return true;
}
}
return(*s == '\0' || *s == '[');
return (*s == '\0');
}
string V3Options::downcase(const string& str) {

View File

@ -965,6 +965,13 @@ sub files_identical {
warn ("%Warning: Line ".($l+1)." mismatches; $fn1 != $fn2\n"
."F1: ".($l1[$l]||"*EOF*\n")
."F2: ".($l2[$l]||"*EOF*\n"));
if ($ENV{HARNESS_UPDATE_GOLDEN}) { # Update golden files with current
warn "%Warning: HARNESS_UPDATE_GOLDEN set: cp $fn1 $fn2\n";
eval "use File::Copy;";
File::Copy::copy($fn1,$fn2);
} else {
warn "To update reference: HARNESS_UPDATE_GOLDEN=1 {command}\n";
}
return 0;
}
}