Tests: Skip gdb tests if no gdb
This commit is contained in:
parent
692306ef44
commit
e814855357
|
|
@ -10,13 +10,17 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
scenarios(vlt => 1);
|
||||
|
||||
lint(
|
||||
verilator_flags2 => ["--debug-fatalsrc"],
|
||||
fails => $Self->{vlt_all},
|
||||
expect =>
|
||||
if (system("gdb --version")) {
|
||||
skip("No gdb installed");
|
||||
} else {
|
||||
lint(
|
||||
verilator_flags2 => ["--debug-fatalsrc"],
|
||||
fails => $Self->{vlt_all},
|
||||
expect =>
|
||||
'%Error: Internal Error: .*: --debug-fatal-src
|
||||
.* See the manual .*',
|
||||
);
|
||||
);
|
||||
|
||||
ok(1);
|
||||
ok(1);
|
||||
}
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -9,17 +9,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(vlt => 1);
|
||||
$ENV{VERILATOR_TEST_NO_GDB} and skip("Skipping due to VERILATOR_TEST_NO_GDB");
|
||||
|
||||
lint(
|
||||
verilator_flags2 => ["--lint-only --debug --gdbbt --debug-fatalsrc"],
|
||||
fails => 1,
|
||||
expect =>
|
||||
if ($ENV{VERILATOR_TEST_NO_GDB}) {
|
||||
skip("Skipping due to VERILATOR_TEST_NO_GDB");
|
||||
} elsif (system("gdb --version")) {
|
||||
skip("No gdb installed");
|
||||
} else {
|
||||
lint(
|
||||
verilator_flags2 => ["--lint-only --debug --gdbbt --debug-fatalsrc"],
|
||||
fails => 1,
|
||||
expect =>
|
||||
'%Error: Internal Error: .*: --debug-fatal-src
|
||||
.*See the manual .*
|
||||
.*in V3Options::.*
|
||||
.*%Error: Command Failed.*',
|
||||
);
|
||||
);
|
||||
ok(1);
|
||||
}
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -9,16 +9,21 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(vlt => 1);
|
||||
$ENV{VERILATOR_TEST_NO_GDB} and skip("Skipping due to VERILATOR_TEST_NO_GDB");
|
||||
|
||||
lint(
|
||||
v_flags => ["--debug-sigsegv"],
|
||||
fails => 1,
|
||||
sanitize => 0,
|
||||
expect =>
|
||||
if ($ENV{VERILATOR_TEST_NO_GDB}) {
|
||||
skip("Skipping due to VERILATOR_TEST_NO_GDB");
|
||||
} elsif (system("gdb --version")) {
|
||||
skip("No gdb installed");
|
||||
} else {
|
||||
lint(
|
||||
v_flags => ["--debug-sigsegv"],
|
||||
fails => 1,
|
||||
sanitize => 0,
|
||||
expect =>
|
||||
'%Error: Verilator internal fault, sorry. Suggest trying --debug --gdbbt
|
||||
%Error: Command Failed.*',
|
||||
);
|
||||
);
|
||||
|
||||
ok(1);
|
||||
ok(1);
|
||||
}
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -9,18 +9,22 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(vlt => 1);
|
||||
$ENV{VERILATOR_TEST_NO_GDB} and skip("Skipping due to VERILATOR_TEST_NO_GDB");
|
||||
|
||||
lint(
|
||||
verilator_flags2 => ["--lint-only --debug --gdbbt --debug-sigsegv"],
|
||||
sanitize => 0,
|
||||
fails => $Self->{vlt_all},
|
||||
expect =>
|
||||
if ($ENV{VERILATOR_TEST_NO_GDB}) {
|
||||
skip("Skipping due to VERILATOR_TEST_NO_GDB");
|
||||
} elsif (system("gdb --version")) {
|
||||
skip("No gdb installed");
|
||||
} else {
|
||||
lint(
|
||||
verilator_flags2 => ["--lint-only --debug --gdbbt --debug-sigsegv"],
|
||||
sanitize => 0,
|
||||
fails => $Self->{vlt_all},
|
||||
expect =>
|
||||
'.*
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
.*in V3Options::.*
|
||||
.*%Error: Command Failed.*',
|
||||
);
|
||||
);
|
||||
|
||||
ok(1);
|
||||
ok(1);
|
||||
}
|
||||
1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue