Tests: Use lint in many negative tests to avoid running under both vlt and vltmt

This commit is contained in:
Wilson Snyder 2020-06-03 20:05:13 -04:00
parent 42312101b5
commit d7cc1e6844
58 changed files with 100 additions and 104 deletions

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
verilator_flags2 => ["--debug-fatalsrc"],
fails => $Self->{vlt_all},
expect =>

View File

@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
$ENV{VERILATOR_TEST_NO_GDB} and skip("Skipping due to VERILATOR_TEST_NO_GDB");
compile(
lint(
v_flags => ["--debug-sigsegv"],
fails => 1,
expect =>

View File

@ -10,8 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(linter => 1);
compile(
verilator_flags2 => ['--lint-only'],
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(vlt_all => 1);
scenarios(vlt => 1);
top_filename("t/t_delay.v");
compile(
lint(
verilator_flags2 => ['-Wall -Wno-DECLFILENAME'],
fails => 1,
expect_filename => $Self->{golden_filename},

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename}
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
fails => 1,
verilator_flags2 => ['+invalid-plus'],
expect_filename => $Self->{golden_filename},

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
fails => 1,
verilator_flags2 => ['--invalid-dash'],
expect_filename => $Self->{golden_filename},

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
verilator_flags2 => ['--language 1-2-3-4'],
fails => 1,
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
v_flags2 => ["--top-module a "],
fails => 1,
expect_filename => $Self->{golden_filename},

View File

@ -12,7 +12,7 @@ scenarios(vlt => 1);
top_filename("t/t_flag_topmodule.v");
compile(
lint(
fails => 1,
nc => 0, # Need to get it not to give the prompt
expect_filename => $Self->{golden_filename},

View File

@ -12,7 +12,7 @@ scenarios(vlt => 1);
top_filename("t/t_flag_topmodule.v");
compile(
lint(
fails => 1,
v_flags2 => ["--top-module notfound"],
nc => 0, # Need to get it not to give the prompt

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(linter => 1);
compile(
lint(
verilator_flags2 => ['--lint-only'],
fails => 1,
expect_filename => $Self->{golden_filename},

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(linter => 1);
compile(
lint(
verilator_flags2 => ['--lint-only'],
fails => 1,
expect_filename => $Self->{golden_filename},

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(vlt => 1);
compile(
lint(
v_flags2 => ["--lint-only"],
fails => 1,
expect_filename => $Self->{golden_filename},

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -12,7 +12,7 @@ scenarios(vlt => 1);
top_filename("t/t_gen_missing.v");
compile(
lint(
v_flags2 => ['+define+T_GEN_MISSING_BAD'],
fails => 1,
expect_filename => $Self->{golden_filename},

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -10,9 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
$Self->{vlt_all} and unsupported("Verilator unsupported, bug1626");
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,12 +8,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
top_filename("t/t_langext_1.v");
# This is a compile only test.
compile(
# This is a lint only test.
lint(
v_flags2 => ["+verilog1995ext+v"],
fails => 1
);

View File

@ -8,12 +8,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
top_filename("t/t_langext_2.v");
# This is a compile only test.
compile(
# This is a lint only test.
lint(
v_flags2 => ["+1364-1995ext+v"],
fails => 1
);

View File

@ -8,12 +8,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
top_filename("t/t_langext_3.v");
# This is a compile only test.
compile(
# This is a lint only test.
lint(
v_flags2 => ["+1364-2001ext+v"],
fails => 1
);

View File

@ -8,12 +8,12 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
top_filename("t/t_langext_2.v");
# This is a compile only test.
compile(
# This is a lint only test.
lint(
v_flags2 => ["+1800-2005ext+v"],
fails => 1
);

View File

@ -8,14 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(vlt_all => 1);
scenarios(vlt => 1);
compile(
v_flags2 => ["--lint-only -Wall -Wno-DECLFILENAME --if-depth 10"],
lint(
v_flags2 => ["-Wall -Wno-DECLFILENAME --if-depth 10"],
fails => 1,
verilator_make_gmake => 0,
make_top_shell => 0,
make_main => 0,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(vlt_all => 1);
scenarios(vlt => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename}
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => $Self->{vlt_all},
nc => 0, # Need to get it not to give the prompt
expect_filename => $Self->{golden_filename},

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -12,7 +12,7 @@ scenarios(simulator => 1);
top_filename("t/t_multitop_sig.v");
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
verilator_flags2 => ['--stats'],
expect_filename => $Self->{golden_filename},

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
top_filename("t/t_struct_init.v");
compile(
lint(
v_flags2 => ['+define+T_STRUCT_INIT_BAD'],
fails => 1,
expect_filename => $Self->{golden_filename},

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => $Self->{vlt_all},
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => $Self->{vlt_all},
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(vlt => 1);
compile(
lint(
expect_filename => $Self->{golden_filename},
fails => 1,
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(simulator => 1);
compile(
lint(
fails => $Self->{vlt_all},
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(simulator => 1);
compile(
lint(
fails => $Self->{vlt_all},
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(linter => 1);
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
top_filename("t/t_var_rsvd_port.v");
compile(
lint(
fails => $Self->{vlt_all},
expect_filename => $Self->{golden_filename},
);

View File

@ -8,11 +8,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
scenarios(linter => 1);
$Self->{verilated_randReset} = 1; # allow checking if we initialize vars to zero only when needed
compile(
lint(
fails => 1,
expect_filename => $Self->{golden_filename},
);

View File

@ -8,9 +8,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(vlt_all => 1);
scenarios(vlt => 1);
compile(
lint(
verilator_flags2 => ["t/t_vlt_syntax_bad.vlt"],
fails => 1,
expect_filename => $Self->{golden_filename},