From 2e5919549c386992fd8385d3642103fcf5c1bb2a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 29 Nov 2018 19:50:09 -0500 Subject: [PATCH] Tests: Separate make_main flag from verilator_make_gcc flag. --- test_regress/driver.pl | 5 ++--- test_regress/t/t_cdc_async_bad.pl | 2 ++ test_regress/t/t_flag_future.pl | 4 ++-- test_regress/t/t_flag_getenv.pl | 2 +- test_regress/t/t_flag_relinc.pl | 2 +- test_regress/t/t_gate_unsup.pl | 4 ++-- test_regress/t/t_hierarchy_unnamed.pl | 2 +- test_regress/t/t_inst_overwide.pl | 3 ++- test_regress/t/t_inst_overwide_bad.pl | 3 ++- test_regress/t/t_lint_infinite.pl | 2 +- test_regress/t/t_lint_once_bad.pl | 4 ++-- test_regress/t/t_lint_only.pl | 4 ++-- test_regress/t/t_lint_realcvt_bad.pl | 4 ++-- test_regress/t/t_lint_width.pl | 2 +- test_regress/t/t_mod_dup_ign.pl | 4 ++-- test_regress/t/t_pipe_exit_bad.pl | 2 ++ test_regress/t/t_pipe_filter.pl | 2 ++ test_regress/t/t_preproc.pl | 2 ++ test_regress/t/t_preproc_comments.pl | 2 ++ test_regress/t/t_preproc_def09.pl | 2 ++ test_regress/t/t_preproc_defines.pl | 2 ++ test_regress/t/t_preproc_noline.pl | 2 ++ test_regress/t/t_preproc_persist.pl | 1 + test_regress/t/t_preproc_ttempty.pl | 1 + test_regress/t/t_select_index2.pl | 2 +- test_regress/t/t_udp_lint.pl | 4 ++-- test_regress/t/t_var_pins_cc.pl | 2 ++ test_regress/t/t_var_ref_bad1.pl | 2 +- test_regress/t/t_var_ref_bad2.pl | 2 +- test_regress/t/t_var_ref_bad3.pl | 2 +- test_regress/t/t_vlt_warn.pl | 2 +- test_regress/t/t_xml_first.pl | 2 ++ test_regress/t/t_xml_tag.pl | 2 ++ 33 files changed, 54 insertions(+), 29 deletions(-) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 549f3fd08..6fb3d6cca 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -764,9 +764,8 @@ sub compile { return 1; } - if (!$param{fails} && $param{verilator_make_gcc} - && $param{make_main}) { - $self->_make_main(); + if (!$param{fails} && $param{make_main}) { + $self->_make_main(); } $self->_run(logfile=>"$self->{obj_dir}/vlt_compile.log", diff --git a/test_regress/t/t_cdc_async_bad.pl b/test_regress/t/t_cdc_async_bad.pl index ba7a4260f..456c3e1fe 100755 --- a/test_regress/t/t_cdc_async_bad.pl +++ b/test_regress/t/t_cdc_async_bad.pl @@ -12,6 +12,8 @@ scenarios(vlt => 1); compile( v_flags => ['--cdc'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, fails => 1, expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_flag_future.pl b/test_regress/t/t_flag_future.pl index 056d0c358..6d9a5c0a0 100755 --- a/test_regress/t/t_flag_future.pl +++ b/test_regress/t/t_flag_future.pl @@ -10,10 +10,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); compile( - make_top_shell => 0, - make_main => 0, verilator_flags2 => [qw(--lint-only -Wfuture-FUTURE1 -Wfuture-FUTURE2)], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); ok(1); diff --git a/test_regress/t/t_flag_getenv.pl b/test_regress/t/t_flag_getenv.pl index 46a0f5603..7f8dbadbc 100755 --- a/test_regress/t/t_flag_getenv.pl +++ b/test_regress/t/t_flag_getenv.pl @@ -16,9 +16,9 @@ compile( expect => 'gotit ', + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, ); ok(1); diff --git a/test_regress/t/t_flag_relinc.pl b/test_regress/t/t_flag_relinc.pl index 6471e8f90..c506495d1 100755 --- a/test_regress/t/t_flag_relinc.pl +++ b/test_regress/t/t_flag_relinc.pl @@ -12,9 +12,9 @@ scenarios(vlt => 1); compile( v_flags2 => ["--relative-includes", "--lint-only $Self->{t_dir}/t_flag_relinc_dir/chip/t_flag_relinc_sub.v"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, ); ok(1); diff --git a/test_regress/t/t_gate_unsup.pl b/test_regress/t/t_gate_unsup.pl index a45d22739..c60d85dea 100755 --- a/test_regress/t/t_gate_unsup.pl +++ b/test_regress/t/t_gate_unsup.pl @@ -11,10 +11,10 @@ scenarios(simulator => 1); compile( # Unsupported: UDP Tables - make_top_shell => 0, - make_main => 0, verilator_flags2 => ["--lint-only --bbox-unsup"], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); ok(1); diff --git a/test_regress/t/t_hierarchy_unnamed.pl b/test_regress/t/t_hierarchy_unnamed.pl index dd4decbdb..76bfa062d 100755 --- a/test_regress/t/t_hierarchy_unnamed.pl +++ b/test_regress/t/t_hierarchy_unnamed.pl @@ -11,9 +11,9 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, ); ok(1); diff --git a/test_regress/t/t_inst_overwide.pl b/test_regress/t/t_inst_overwide.pl index dfea2018b..c47c13f1f 100755 --- a/test_regress/t/t_inst_overwide.pl +++ b/test_regress/t/t_inst_overwide.pl @@ -10,9 +10,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - make_top_shell => 0, verilator_flags2 => [qw(-sc -Wno-WIDTH)], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); #No execute() diff --git a/test_regress/t/t_inst_overwide_bad.pl b/test_regress/t/t_inst_overwide_bad.pl index 413bd59e7..7185d952f 100755 --- a/test_regress/t/t_inst_overwide_bad.pl +++ b/test_regress/t/t_inst_overwide_bad.pl @@ -13,9 +13,10 @@ top_filename("t/t_inst_overwide.v"); compile( v_flags2 => ["--lint-only"], - make_top_shell => 0, verilator_flags => [qw(-cc)], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, fails => $Self->{vlt_all}, expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_lint_infinite.pl b/test_regress/t/t_lint_infinite.pl index 9b5936a1d..d561c4636 100755 --- a/test_regress/t/t_lint_infinite.pl +++ b/test_regress/t/t_lint_infinite.pl @@ -11,9 +11,9 @@ scenarios(vlt_all => 1); compile( v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, fails => 1, expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_lint_once_bad.pl b/test_regress/t/t_lint_once_bad.pl index 3a4d5630a..2eb1edcac 100755 --- a/test_regress/t/t_lint_once_bad.pl +++ b/test_regress/t/t_lint_once_bad.pl @@ -10,10 +10,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt_all => 1); compile( - make_top_shell => 0, - make_main => 0, verilator_flags2 => ["--lint-only -Wwarn-UNUSED"], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, fails => 1, expect => '%Warning-UNUSED: t/t_lint_once_bad.v:\d+: Signal is not driven, nor used: unus1 diff --git a/test_regress/t/t_lint_only.pl b/test_regress/t/t_lint_only.pl index c96b4b96e..7ac59147b 100755 --- a/test_regress/t/t_lint_only.pl +++ b/test_regress/t/t_lint_only.pl @@ -10,10 +10,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt_all => 1); compile( - make_top_shell => 0, - make_main => 0, v_flags2 => ["--lint-only"], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); foreach my $file (glob("$Self->{obj_dir}/*t_lint_only*")) { diff --git a/test_regress/t/t_lint_realcvt_bad.pl b/test_regress/t/t_lint_realcvt_bad.pl index 40a534f14..f7cea6254 100755 --- a/test_regress/t/t_lint_realcvt_bad.pl +++ b/test_regress/t/t_lint_realcvt_bad.pl @@ -10,10 +10,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt_all => 1); compile( - make_top_shell => 0, - make_main => 0, v_flags2 => ["--lint-only -Wwarn-REALCVT"], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, fails => 1, expect => '%Warning-REALCVT: t/t_lint_realcvt_bad.v:\d+: Implicit conversion of real to integer diff --git a/test_regress/t/t_lint_width.pl b/test_regress/t/t_lint_width.pl index 09495b14b..523059007 100755 --- a/test_regress/t/t_lint_width.pl +++ b/test_regress/t/t_lint_width.pl @@ -11,9 +11,9 @@ scenarios(vlt_all => 1); compile( v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, ); ok(1); diff --git a/test_regress/t/t_mod_dup_ign.pl b/test_regress/t/t_mod_dup_ign.pl index cb7f7d6fe..5c0335015 100755 --- a/test_regress/t/t_mod_dup_ign.pl +++ b/test_regress/t/t_mod_dup_ign.pl @@ -10,10 +10,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt_all => 1); compile( - make_top_shell => 0, - make_main => 0, v_flags2 => ["--lint-only"], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); ok(1); diff --git a/test_regress/t/t_pipe_exit_bad.pl b/test_regress/t/t_pipe_exit_bad.pl index c190c3dd7..24a1c6b73 100755 --- a/test_regress/t/t_pipe_exit_bad.pl +++ b/test_regress/t/t_pipe_exit_bad.pl @@ -14,6 +14,8 @@ top_filename("t/t_pipe_filter.v"); compile( verilator_flags2 => ['-E --pipe-filter \'perl t/t_pipe_exit_bad.pf\' '], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, fails => 1, expect => diff --git a/test_regress/t/t_pipe_filter.pl b/test_regress/t/t_pipe_filter.pl index a616db88d..b8b07ffbc 100755 --- a/test_regress/t/t_pipe_filter.pl +++ b/test_regress/t/t_pipe_filter.pl @@ -14,6 +14,8 @@ my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; compile( verilator_flags2 => ['-E --pipe-filter \'perl t/t_pipe_filter.pf\' '], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc.pl b/test_regress/t/t_preproc.pl index ba75f9c70..d0525f7ff 100755 --- a/test_regress/t/t_preproc.pl +++ b/test_regress/t/t_preproc.pl @@ -14,6 +14,8 @@ my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; compile( verilator_flags2 => ['-DDEF_A0 -DPREDEF_COMMAND_LINE -E'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_comments.pl b/test_regress/t/t_preproc_comments.pl index b6095f8a0..3673fe720 100755 --- a/test_regress/t/t_preproc_comments.pl +++ b/test_regress/t/t_preproc_comments.pl @@ -16,6 +16,8 @@ my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; compile( verilator_flags2 => ['-DDEF_A0 -DPREDEF_COMMAND_LINE -E --pp-comments'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_def09.pl b/test_regress/t/t_preproc_def09.pl index 3fada6b05..35d35492b 100755 --- a/test_regress/t/t_preproc_def09.pl +++ b/test_regress/t/t_preproc_def09.pl @@ -14,6 +14,8 @@ my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; compile( verilator_flags2 => ['-E'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_defines.pl b/test_regress/t/t_preproc_defines.pl index 7d80de403..947c5992b 100755 --- a/test_regress/t/t_preproc_defines.pl +++ b/test_regress/t/t_preproc_defines.pl @@ -16,6 +16,8 @@ my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; compile( verilator_flags2 => ['-DDEF_A0 -DPREDEF_COMMAND_LINE -E --dump-defines'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_noline.pl b/test_regress/t/t_preproc_noline.pl index 1c054033f..482a70a32 100755 --- a/test_regress/t/t_preproc_noline.pl +++ b/test_regress/t/t_preproc_noline.pl @@ -16,6 +16,8 @@ top_filename("t/t_preproc_noline.v"); compile( verilator_flags2 => ['-E -P'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_persist.pl b/test_regress/t/t_preproc_persist.pl index cdbe7417e..f0e6d86bb 100755 --- a/test_regress/t/t_preproc_persist.pl +++ b/test_regress/t/t_preproc_persist.pl @@ -20,6 +20,7 @@ compile( verilator_flags3 => ['',], verilator_make_gcc => 0, make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_preproc_ttempty.pl b/test_regress/t/t_preproc_ttempty.pl index 88e53c4b1..519ed2255 100755 --- a/test_regress/t/t_preproc_ttempty.pl +++ b/test_regress/t/t_preproc_ttempty.pl @@ -19,6 +19,7 @@ compile( verilator_flags3 => ['',], verilator_make_gcc => 0, make_top_shell => 0, + make_main => 0, stdout_filename => $stdout_filename, ); diff --git a/test_regress/t/t_select_index2.pl b/test_regress/t/t_select_index2.pl index dd4decbdb..76bfa062d 100755 --- a/test_regress/t/t_select_index2.pl +++ b/test_regress/t/t_select_index2.pl @@ -11,9 +11,9 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, ); ok(1); diff --git a/test_regress/t/t_udp_lint.pl b/test_regress/t/t_udp_lint.pl index 38f3852a1..89674913f 100755 --- a/test_regress/t/t_udp_lint.pl +++ b/test_regress/t/t_udp_lint.pl @@ -13,10 +13,10 @@ top_filename("t/t_udp.v"); compile( # Unsupported: UDP Tables - make_top_shell => 0, - make_main => 0, verilator_flags2 => ["--lint-only --bbox-unsup"], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); ok(1); diff --git a/test_regress/t/t_var_pins_cc.pl b/test_regress/t/t_var_pins_cc.pl index f2563c238..27b91183f 100755 --- a/test_regress/t/t_var_pins_cc.pl +++ b/test_regress/t/t_var_pins_cc.pl @@ -14,6 +14,8 @@ top_filename("t/t_var_pinsizes.v"); compile( verilator_flags2 => ['-cc'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); { diff --git a/test_regress/t/t_var_ref_bad1.pl b/test_regress/t/t_var_ref_bad1.pl index c9662e035..1486932d8 100755 --- a/test_regress/t/t_var_ref_bad1.pl +++ b/test_regress/t/t_var_ref_bad1.pl @@ -11,9 +11,9 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, fails => 1, expect => q{%Error: t/t_var_ref_bad1.v:\d+: Ref connection 'bad_sub_ref' requires matching types; ref requires BASICDTYPE 'real' but connection is BASICDTYPE 'bit'. diff --git a/test_regress/t/t_var_ref_bad2.pl b/test_regress/t/t_var_ref_bad2.pl index a256f2b17..7c2a13f47 100755 --- a/test_regress/t/t_var_ref_bad2.pl +++ b/test_regress/t/t_var_ref_bad2.pl @@ -11,9 +11,9 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, fails => 1, expect => q{%Error: t/t_var_ref_bad2.v:\d+: Assigning to const ref variable: bad_const_set diff --git a/test_regress/t/t_var_ref_bad3.pl b/test_regress/t/t_var_ref_bad3.pl index 34b9a8a59..3cccb2103 100755 --- a/test_regress/t/t_var_ref_bad3.pl +++ b/test_regress/t/t_var_ref_bad3.pl @@ -11,9 +11,9 @@ scenarios(simulator => 1); compile( v_flags2 => ["--lint-only"], + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, fails => 1, expect => q{%Error: t/t_var_ref_bad3.v:\d+: Unsupported: ref/const ref as primary input/output: bad_primary_ref diff --git a/test_regress/t/t_vlt_warn.pl b/test_regress/t/t_vlt_warn.pl index 0888801bc..59af0f958 100755 --- a/test_regress/t/t_vlt_warn.pl +++ b/test_regress/t/t_vlt_warn.pl @@ -10,9 +10,9 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); compile( + verilator_make_gcc => 0, make_top_shell => 0, make_main => 0, - verilator_make_gcc => 0, v_flags2 => ["--lint-only t/t_vlt_warn.vlt"], ); diff --git a/test_regress/t/t_xml_first.pl b/test_regress/t/t_xml_first.pl index 38d223ae9..fa8199153 100755 --- a/test_regress/t/t_xml_first.pl +++ b/test_regress/t/t_xml_first.pl @@ -14,6 +14,8 @@ my $out_filename = "$Self->{obj_dir}/V$Self->{name}.xml"; compile( verilator_flags2 => ['--xml-only'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); files_identical("$out_filename", "t/$Self->{name}.out"); diff --git a/test_regress/t/t_xml_tag.pl b/test_regress/t/t_xml_tag.pl index 38d223ae9..fa8199153 100755 --- a/test_regress/t/t_xml_tag.pl +++ b/test_regress/t/t_xml_tag.pl @@ -14,6 +14,8 @@ my $out_filename = "$Self->{obj_dir}/V$Self->{name}.xml"; compile( verilator_flags2 => ['--xml-only'], verilator_make_gcc => 0, + make_top_shell => 0, + make_main => 0, ); files_identical("$out_filename", "t/$Self->{name}.out");