diff --git a/test_regress/driver.pl b/test_regress/driver.pl index c5878a27e..9e3733dfa 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -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 diff --git a/test_regress/t/t_flag_build_cmake.pl b/test_regress/t/t_flag_build_cmake.pl index a58be70f6..1c189d3c3 100755 --- a/test_regress/t/t_flag_build_cmake.pl +++ b/test_regress/t/t_flag_build_cmake.pl @@ -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, diff --git a/test_regress/t/t_flag_verilate.pl b/test_regress/t/t_flag_verilate.pl index c28d235b6..b523b77e3 100755 --- a/test_regress/t/t_flag_verilate.pl +++ b/test_regress/t/t_flag_verilate.pl @@ -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,