From 4cf017d7fe067c2ea92ddc0c869b217817e1c7c6 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Sat, 13 Jul 2024 13:31:16 +0100 Subject: [PATCH] Tests: Skip t_randomize_method_constraints when no solver is installed (#5260) --- test_regress/t/t_randomize_method_with.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test_regress/t/t_randomize_method_with.pl b/test_regress/t/t_randomize_method_with.pl index 1bbe28c31..4230d5f06 100755 --- a/test_regress/t/t_randomize_method_with.pl +++ b/test_regress/t/t_randomize_method_with.pl @@ -10,14 +10,18 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); -compile( - # Ensure we test captures of static variables - verilator_flags2 => ["--fno-inline"], - ); +if (!$Self->have_solver) { + skip("No constraint solver installed"); +} else { + compile( + # Ensure we test captures of static variables + verilator_flags2 => ["--fno-inline"], + ); -execute( - check_finished => 1, - ); + execute( + check_finished => 1, + ); +} ok(1); 1;