Fix tests failing on rerun after passing from clean. (#2281)

This commit is contained in:
Geza Lore 2020-04-24 02:27:06 +01:00 committed by GitHub
parent df52e481fb
commit 27f4399c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -806,6 +806,11 @@ sub clean {
}
}
sub clean_objs {
my $self = (ref $_[0] ? shift : $Self);
system("rm", "-rf", glob("$self->{obj_dir}/*"));
}
sub compile_vlt_cmd {
my $self = (ref $_[0]? shift : $Self);
my %param = (%{$self}, @_); # Default arguments are from $self

View File

@ -12,6 +12,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(simulator => 1);
top_filename("t/t_flag_make_cmake.v");
# This test seems broken as the CMake build invoked by Verilator itself
# invokes Verilator.. (See #2280). Strangely though it passes when built
# from clean, so nuke it:
clean_objs();
compile( # Don't call cmake nor gmake from driver.pl
verilator_make_cmake => 0,
verilator_make_gmake => 0,

View File

@ -12,6 +12,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(simulator => 1);
top_filename("t/t_flag_make_cmake.v");
# We expect below that Vt_flag_verilate.mk and others are not in the build
# tree already when doing --no-verilate, so we must remove them when
# re-running the test.
clean_objs();
compile( # Don't call cmake nor gmake from driver.pl. Nothing should be done here.
verilator_make_cmake => 0,
verilator_make_gmake => 0,