Tests: Cleanup mis-die's
This commit is contained in:
parent
1224c69126
commit
4b5f0fd173
|
|
@ -23,11 +23,12 @@ compile(
|
||||||
|
|
||||||
my @files = glob($tmp_dir . "/*");
|
my @files = glob($tmp_dir . "/*");
|
||||||
|
|
||||||
die "Did not produce DPI header" if scalar(@files) == 0;
|
error("Did not produce DPI header") if scalar(@files) == 0;
|
||||||
die "Too many files created" if scalar(@files) > 1;
|
error("Too many files created") if scalar(@files) > 1;
|
||||||
|
|
||||||
my $tmp_header = $files[0];
|
my $tmp_header = $files[0];
|
||||||
print("============".$tmp_header."\n");
|
print("============".$tmp_header."\n");
|
||||||
die "Unexpected file $tmp_header" unless $tmp_header =~ /__Dpi\.h$/;
|
error("Unexpected file $tmp_header") unless $tmp_header =~ /__Dpi\.h$/;
|
||||||
|
|
||||||
compile(
|
compile(
|
||||||
verilator_flags2 => ["-Wall -Wno-DECLFILENAME"],
|
verilator_flags2 => ["-Wall -Wno-DECLFILENAME"],
|
||||||
|
|
@ -35,10 +36,10 @@ compile(
|
||||||
);
|
);
|
||||||
|
|
||||||
@files = glob($Self->obj_dir . "/*__Dpi.h");
|
@files = glob($Self->obj_dir . "/*__Dpi.h");
|
||||||
my $header = @files[0];
|
my $header = $files[0];
|
||||||
|
|
||||||
if (compare($tmp_header, $header) != 0) {
|
if (compare($tmp_header, $header) != 0) {
|
||||||
die "DPI header files are not the same";
|
error("DPI header files are not the same");
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue