ivtest: merge duplicate definitions when requesting the iverilog version
This commit is contained in:
parent
940d90b100
commit
ad6e58cb09
|
|
@ -91,14 +91,15 @@ sub get_regress_fn {
|
|||
#
|
||||
sub get_ivl_version {
|
||||
my $sfx = shift(@_);
|
||||
if (`iverilog$sfx -V` =~ /^Icarus Verilog version (\d+)\.(\d+)/) {
|
||||
my $cmd = "iverilog$sfx -V";
|
||||
if (`$cmd` =~ /^Icarus Verilog version (\d+)\.(\d+)/) {
|
||||
if ($1 == 0) {
|
||||
return $1.".".$2;
|
||||
} else {
|
||||
return $1;
|
||||
}
|
||||
} else {
|
||||
die "Failed to get version from iverilog$sfx -V output";
|
||||
die "Failed to get version from '$cmd' output";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue