diff --git a/test_regress/t/t_dpi_import_hdr_only.pl b/test_regress/t/t_dpi_import_hdr_only.pl index 5af4d0e18..cce0dcf8b 100755 --- a/test_regress/t/t_dpi_import_hdr_only.pl +++ b/test_regress/t/t_dpi_import_hdr_only.pl @@ -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);