Tests: Cleanup mis-die's

This commit is contained in:
Wilson Snyder 2019-10-31 20:45:17 -04:00
parent 1224c69126
commit 4b5f0fd173
1 changed files with 6 additions and 5 deletions

View File

@ -23,11 +23,12 @@ compile(
my @files = glob($tmp_dir . "/*");
die "Did not produce DPI header" if scalar(@files) == 0;
die "Too many files created" if scalar(@files) > 1;
error("Did not produce DPI header") if scalar(@files) == 0;
error("Too many files created") if scalar(@files) > 1;
my $tmp_header = $files[0];
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(
verilator_flags2 => ["-Wall -Wno-DECLFILENAME"],
@ -35,10 +36,10 @@ compile(
);
@files = glob($Self->obj_dir . "/*__Dpi.h");
my $header = @files[0];
my $header = $files[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);