From abc46db3c0a34582f8beca7c113a58d6eed89f26 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 25 Apr 2025 20:57:11 -0400 Subject: [PATCH] Tests: Cleanup some .cpp paths. No test functional change indended. --- test_regress/t/t_assert_ctl_arg_noinl.py | 5 +++-- test_regress/t/t_compiler_include_dpi.py | 2 +- test_regress/t/t_compiler_include_dpi_split.py | 2 +- test_regress/t/t_dpi_var_vlt.py | 3 ++- test_regress/t/t_opt_const_dfg.py | 3 ++- test_regress/t/t_opt_const_no_expand.py | 2 +- test_regress/t/t_trace_noflag_bad.py | 2 +- test_regress/t/t_trace_two_dump_cc.py | 3 ++- test_regress/t/t_trace_two_dump_sc.py | 3 ++- test_regress/t/t_trace_two_dumpfst_cc.py | 13 ++++++------- test_regress/t/t_trace_two_hdr_cc.py | 3 ++- test_regress/t/t_trace_two_hdr_sc.py | 3 ++- test_regress/t/t_trace_two_hdrfst_cc.py | 13 ++++++------- test_regress/t/t_trace_two_port_cc.py | 3 ++- test_regress/t/t_trace_two_port_sc.py | 3 ++- test_regress/t/t_trace_two_portfst_cc.py | 13 ++++++------- test_regress/t/t_verilated_threaded.py | 4 ++-- test_regress/t/t_vpi_dump.py | 3 +-- test_regress/t/t_vpi_dump_missing_scopes.py | 3 +-- test_regress/t/t_vpi_dump_no_inline.py | 2 +- test_regress/t/t_vpi_get_public_rw_switch.py | 3 +-- 21 files changed, 47 insertions(+), 44 deletions(-) diff --git a/test_regress/t/t_assert_ctl_arg_noinl.py b/test_regress/t/t_assert_ctl_arg_noinl.py index 212731c00..205ed60f4 100755 --- a/test_regress/t/t_assert_ctl_arg_noinl.py +++ b/test_regress/t/t_assert_ctl_arg_noinl.py @@ -11,12 +11,13 @@ import vltest_bootstrap test.scenarios('vlt') test.top_filename = "t_assert_ctl_arg.v" +test.pli_filename = "t/t_assert_ctl_arg.cpp" test.compile(make_top_shell=False, make_main=False, verilator_flags2=[ - "--assert", "--timing", "--coverage-user", "--exe", - test.t_dir + "/t_assert_ctl_arg.cpp", "-fno-inline" + "--assert", "--timing", "--coverage-user", "--exe", test.pli_filename, + "-fno-inline" ], nc_flags2=["+nccovoverwrite", "+nccoverage+all", "+nccovtest+" + test.name]) diff --git a/test_regress/t/t_compiler_include_dpi.py b/test_regress/t/t_compiler_include_dpi.py index b1b215937..af749e59f 100755 --- a/test_regress/t/t_compiler_include_dpi.py +++ b/test_regress/t/t_compiler_include_dpi.py @@ -15,7 +15,7 @@ test.top_filename = "t/t_compiler_include_dpi.v" test.compile(v_flags2=["t/t_compiler_include_dpi.cpp"], verilator_flags2=[ "-Wall -Wno-DECLFILENAME --compiler-include", - test.t_dir + "/t_compiler_include_dpi.h --output-split 0" + test.t_dir + "/t_compiler_include_dpi.h", "--output-split 0" ]) test.execute() diff --git a/test_regress/t/t_compiler_include_dpi_split.py b/test_regress/t/t_compiler_include_dpi_split.py index 97b694be1..6f69ac393 100755 --- a/test_regress/t/t_compiler_include_dpi_split.py +++ b/test_regress/t/t_compiler_include_dpi_split.py @@ -15,7 +15,7 @@ test.top_filename = "t/t_compiler_include_dpi.v" test.compile(v_flags2=["t/t_compiler_include_dpi.cpp"], verilator_flags2=[ "-Wall -Wno-DECLFILENAME --compiler-include", - test.t_dir + "/t_compiler_include_dpi.h --output-split 1" + test.t_dir + "/t_compiler_include_dpi.h", "--output-split 1" ]) test.execute() diff --git a/test_regress/t/t_dpi_var_vlt.py b/test_regress/t/t_dpi_var_vlt.py index 152593adc..ad82e250d 100755 --- a/test_regress/t/t_dpi_var_vlt.py +++ b/test_regress/t/t_dpi_var_vlt.py @@ -11,6 +11,7 @@ import vltest_bootstrap test.scenarios('simulator') test.top_filename = "t/t_dpi_var.v" +test.pli_filename = "t/t_dpi_var.cpp" out_filename = test.obj_dir + "/V" + test.name + ".tree.json" @@ -18,7 +19,7 @@ test.compile(make_top_shell=False, make_main=False, verilator_flags2=[ "--no-json-edit-nums", "--exe --no-l2name", test.t_dir + "/t_dpi_var.vlt", - test.t_dir + "/t_dpi_var.cpp" + test.pli_filename ]) if test.vlt_all: diff --git a/test_regress/t/t_opt_const_dfg.py b/test_regress/t/t_opt_const_dfg.py index 8efffeec9..ffdca2c4f 100755 --- a/test_regress/t/t_opt_const_dfg.py +++ b/test_regress/t/t_opt_const_dfg.py @@ -11,8 +11,9 @@ import vltest_bootstrap test.scenarios('simulator') test.top_filename = "t/t_opt_const.v" +test.pli_filename = "t/t_opt_const.cpp" -test.compile(verilator_flags2=["-Wno-UNOPTTHREADS", "--stats", test.t_dir + "/t_opt_const.cpp"]) +test.compile(verilator_flags2=["-Wno-UNOPTTHREADS", "--stats", test.pli_filename]) test.execute() diff --git a/test_regress/t/t_opt_const_no_expand.py b/test_regress/t/t_opt_const_no_expand.py index 34f51af28..e42265a8d 100755 --- a/test_regress/t/t_opt_const_no_expand.py +++ b/test_regress/t/t_opt_const_no_expand.py @@ -13,7 +13,7 @@ test.scenarios('simulator') test.top_filename = "t/t_opt_const.v" test.compile(verilator_flags2=[ - "-Wno-UNOPTTHREADS", "-fno-dfg", "-fno-expand", "--stats", test.t_dir + "/t_opt_const.cpp" + "-Wno-UNOPTTHREADS", "-fno-dfg", "-fno-expand", "--stats", "t/t_opt_const.cpp" ]) test.execute() diff --git a/test_regress/t/t_trace_noflag_bad.py b/test_regress/t/t_trace_noflag_bad.py index a61eb9bdd..e46f07308 100755 --- a/test_regress/t/t_trace_noflag_bad.py +++ b/test_regress/t/t_trace_noflag_bad.py @@ -14,7 +14,7 @@ test.scenarios('vlt') test.compile( # We need to list verilated_vcd_c.cpp because without --trace Verilator # won't build it itself automatically. - verilator_flags2=["--cc --exe", test.t_dir + "/" + test.name + "_c.cpp verilated_vcd_c.cpp"], + verilator_flags2=["--cc --exe", "t/" + test.name + "_c.cpp", "verilated_vcd_c.cpp"], make_top_shell=False, make_main=False) diff --git a/test_regress/t/t_trace_two_dump_cc.py b/test_regress/t/t_trace_two_dump_cc.py index 6170a75b7..7536b0171 100755 --- a/test_regress/t/t_trace_two_dump_cc.py +++ b/test_regress/t/t_trace_two_dump_cc.py @@ -12,6 +12,7 @@ import vltest_bootstrap test.scenarios('vlt_all') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_cc.cpp" test.compile(make_main=False, verilator_make_gmake=False, @@ -25,7 +26,7 @@ test.run( test.compile(make_main=False, top_filename='t_trace_two_a.v', - verilator_flags2=['-exe', '-trace', test.t_dir + "/t_trace_two_cc.cpp"], + verilator_flags2=['-exe', '-trace', test.pli_filename], v_flags2=['+define+TEST_DUMP']) test.execute() diff --git a/test_regress/t/t_trace_two_dump_sc.py b/test_regress/t/t_trace_two_dump_sc.py index 1dc86e098..2f28b7607 100755 --- a/test_regress/t/t_trace_two_dump_sc.py +++ b/test_regress/t/t_trace_two_dump_sc.py @@ -11,6 +11,7 @@ import vltest_bootstrap test.scenarios('simulator') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_sc.cpp" if not test.have_sc: test.skip("No SystemC installed") @@ -26,7 +27,7 @@ test.run(logfile=test.obj_dir + "/make_first_ALL.log", test.compile(make_main=False, top_filename='t_trace_two_a.v', - verilator_flags2=['-sc', '-exe', '-trace', test.t_dir + "/t_trace_two_sc.cpp"], + verilator_flags2=['-sc', '-exe', '-trace', test.pli_filename], v_flags2=['+define+TEST_DUMP']) test.execute() diff --git a/test_regress/t/t_trace_two_dumpfst_cc.py b/test_regress/t/t_trace_two_dumpfst_cc.py index 525c4698a..809dbc452 100755 --- a/test_regress/t/t_trace_two_dumpfst_cc.py +++ b/test_regress/t/t_trace_two_dumpfst_cc.py @@ -12,6 +12,7 @@ import vltest_bootstrap test.scenarios('vlt_all') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_cc.cpp" test.compile(make_main=False, verilator_make_gmake=False, @@ -22,13 +23,11 @@ test.compile(make_main=False, test.run(logfile=test.obj_dir + "/make_first_ALL.log", cmd=["make", "-C", test.obj_dir, "-f", "Vt_trace_two_b.mk", "Vt_trace_two_b__ALL.cpp"]) -test.compile(make_main=False, - top_filename='t_trace_two_a.v', - verilator_flags2=[ - '-exe', '--trace-fst --trace-threads 1', '-DTEST_FST', - test.t_dir + "/t_trace_two_cc.cpp" - ], - v_flags2=['+define+TEST_DUMP']) +test.compile( + make_main=False, + top_filename='t_trace_two_a.v', + verilator_flags2=['-exe', '--trace-fst --trace-threads 1', '-DTEST_FST', test.pli_filename], + v_flags2=['+define+TEST_DUMP']) test.execute() diff --git a/test_regress/t/t_trace_two_hdr_cc.py b/test_regress/t/t_trace_two_hdr_cc.py index 3aef38dc9..77ad85f64 100755 --- a/test_regress/t/t_trace_two_hdr_cc.py +++ b/test_regress/t/t_trace_two_hdr_cc.py @@ -12,6 +12,7 @@ import vltest_bootstrap test.scenarios('vlt_all') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_cc.cpp" test.compile(make_main=False, verilator_make_gmake=False, @@ -25,7 +26,7 @@ test.run(logfile=test.obj_dir + "/make_first_ALL.log", test.compile(make_main=False, top_filename='t_trace_two_a.v', make_flags=['CPPFLAGS_ADD=-DTEST_HDR_TRACE=1'], - verilator_flags2=['-exe', '-trace', test.t_dir + "/t_trace_two_cc.cpp"]) + verilator_flags2=['-exe', '-trace', test.pli_filename]) test.execute() diff --git a/test_regress/t/t_trace_two_hdr_sc.py b/test_regress/t/t_trace_two_hdr_sc.py index 5f2557ce7..ebd1ddb6e 100755 --- a/test_regress/t/t_trace_two_hdr_sc.py +++ b/test_regress/t/t_trace_two_hdr_sc.py @@ -11,6 +11,7 @@ import vltest_bootstrap test.scenarios('simulator') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_sc.cpp" if not test.have_sc: test.skip("No SystemC installed") @@ -27,7 +28,7 @@ test.run(logfile=test.obj_dir + "/make_first_ALL.log", test.compile(make_main=False, top_filename='t_trace_two_a.v', make_flags=['CPPFLAGS_ADD=-DTEST_HDR_TRACE'], - verilator_flags2=['-sc', '-exe', '-trace', test.t_dir + "/t_trace_two_sc.cpp"]) + verilator_flags2=['-sc', '-exe', '-trace', test.pli_filename]) test.execute() diff --git a/test_regress/t/t_trace_two_hdrfst_cc.py b/test_regress/t/t_trace_two_hdrfst_cc.py index 8b0157b74..0817439d8 100755 --- a/test_regress/t/t_trace_two_hdrfst_cc.py +++ b/test_regress/t/t_trace_two_hdrfst_cc.py @@ -12,6 +12,7 @@ import vltest_bootstrap test.scenarios('vlt_all') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_cc.cpp" test.compile(make_main=False, verilator_make_gmake=False, @@ -23,13 +24,11 @@ test.run( logfile=test.obj_dir + "/make_first_ALL.log", cmd=["make", "-C", "" + test.obj_dir, "-f", "Vt_trace_two_b.mk", "Vt_trace_two_b__ALL.cpp"]) -test.compile(make_main=False, - top_filename='t_trace_two_a.v', - make_flags=['CPPFLAGS_ADD="-DTEST_HDR_TRACE=1 -DTEST_FST=1"'], - verilator_flags2=[ - '-exe', '--trace-fst --trace-threads 1', '-DTEST_FST', - test.t_dir + "/t_trace_two_cc.cpp" - ]) +test.compile( + make_main=False, + top_filename='t_trace_two_a.v', + make_flags=['CPPFLAGS_ADD="-DTEST_HDR_TRACE=1 -DTEST_FST=1"'], + verilator_flags2=['-exe', '--trace-fst --trace-threads 1', '-DTEST_FST', test.pli_filename]) test.execute() diff --git a/test_regress/t/t_trace_two_port_cc.py b/test_regress/t/t_trace_two_port_cc.py index 4c3461f0d..9ada6cf8e 100755 --- a/test_regress/t/t_trace_two_port_cc.py +++ b/test_regress/t/t_trace_two_port_cc.py @@ -12,6 +12,7 @@ import vltest_bootstrap test.scenarios('vlt_all') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_cc.cpp" test.compile(make_main=False, verilator_make_gmake=False, @@ -24,7 +25,7 @@ test.run(logfile=test.obj_dir + "/make_first_ALL.log", test.compile(make_main=False, top_filename='t_trace_two_a.v', - verilator_flags2=['-exe', '-trace', test.t_dir + "/t_trace_two_cc.cpp"], + verilator_flags2=['-exe', '-trace', test.pli_filename], v_flags2=['+define+TEST_DUMPPORTS']) test.execute() diff --git a/test_regress/t/t_trace_two_port_sc.py b/test_regress/t/t_trace_two_port_sc.py index 051ed305b..239f3e938 100755 --- a/test_regress/t/t_trace_two_port_sc.py +++ b/test_regress/t/t_trace_two_port_sc.py @@ -15,6 +15,7 @@ if not test.have_sc: test.skip("No SystemC installed") top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_sc.cpp" test.compile(make_main=False, verilator_make_gmake=False, @@ -27,7 +28,7 @@ test.run(logfile=test.obj_dir + "/make_first_ALL.log", test.compile(make_main=False, top_filename='t_trace_two_a.v', - verilator_flags2=['-sc', '-exe', '-trace', test.t_dir + "/t_trace_two_sc.cpp"], + verilator_flags2=['-sc', '-exe', '-trace', test.pli_filename], v_flags2=['+define+TEST_DUMPPORTS']) test.execute() diff --git a/test_regress/t/t_trace_two_portfst_cc.py b/test_regress/t/t_trace_two_portfst_cc.py index 060eda528..470301806 100755 --- a/test_regress/t/t_trace_two_portfst_cc.py +++ b/test_regress/t/t_trace_two_portfst_cc.py @@ -12,6 +12,7 @@ import vltest_bootstrap test.scenarios('vlt_all') test.top_filename = "t_trace_two_a.v" +test.pli_filename = "t/t_trace_two_cc.cpp" test.compile(make_main=False, verilator_make_gmake=False, @@ -23,13 +24,11 @@ test.run( logfile=test.obj_dir + "/make_first_ALL.log", cmd=["make", "-C", "" + test.obj_dir, "-f", "Vt_trace_two_b.mk", "Vt_trace_two_b__ALL.cpp"]) -test.compile(make_main=False, - top_filename='t_trace_two_a.v', - verilator_flags2=[ - '-exe', '--trace-fst --trace-threads 1', '-DTEST_FST', - test.t_dir + "/t_trace_two_cc.cpp" - ], - v_flags2=['+define+TEST_DUMPPORTS']) +test.compile( + make_main=False, + top_filename='t_trace_two_a.v', + verilator_flags2=['-exe', '--trace-fst --trace-threads 1', '-DTEST_FST', test.pli_filename], + v_flags2=['+define+TEST_DUMPPORTS']) test.execute() diff --git a/test_regress/t/t_verilated_threaded.py b/test_regress/t/t_verilated_threaded.py index aec7efee3..f871f925e 100755 --- a/test_regress/t/t_verilated_threaded.py +++ b/test_regress/t/t_verilated_threaded.py @@ -17,8 +17,8 @@ root = ".." test.compile( # Can't use --coverage and --savable together, so cheat and compile inline verilator_flags2=[ - "--cc --coverage-toggle --coverage-line --coverage-user --trace-vcd --vpi " + root + - "/include/verilated_save.cpp", + "--cc --coverage-toggle --coverage-line --coverage-user --trace-vcd --vpi", + root + "/include/verilated_save.cpp", ("--timing" if test.have_coroutines else "--no-timing -Wno-STMTDLY") ], threads=1) diff --git a/test_regress/t/t_vpi_dump.py b/test_regress/t/t_vpi_dump.py index 6a54e966f..218f5e912 100755 --- a/test_regress/t/t_vpi_dump.py +++ b/test_regress/t/t_vpi_dump.py @@ -16,8 +16,7 @@ test.compile(make_top_shell=False, make_pli=True, iv_flags2=["-g2005-sv"], verilator_flags2=[ - "--exe --vpi --public-flat-rw --no-l2name", test.pli_filename, - test.t_dir + "/TestVpiMain.cpp" + "--exe --vpi --public-flat-rw --no-l2name", test.pli_filename, "t/TestVpiMain.cpp" ], make_flags=['CPPFLAGS_ADD=-DVL_NO_LEGACY']) diff --git a/test_regress/t/t_vpi_dump_missing_scopes.py b/test_regress/t/t_vpi_dump_missing_scopes.py index 6c016e888..686d688f4 100755 --- a/test_regress/t/t_vpi_dump_missing_scopes.py +++ b/test_regress/t/t_vpi_dump_missing_scopes.py @@ -17,8 +17,7 @@ test.compile(make_top_shell=False, make_pli=True, iv_flags2=["-g2005-sv"], verilator_flags2=[ - "--exe --vpi --public-flat-rw --no-l2name", test.pli_filename, - test.t_dir + "/TestVpiMain.cpp" + "--exe --vpi --public-flat-rw --no-l2name", test.pli_filename, "t/TestVpiMain.cpp" ], make_flags=['CPPFLAGS_ADD=-DVL_NO_LEGACY']) diff --git a/test_regress/t/t_vpi_dump_no_inline.py b/test_regress/t/t_vpi_dump_no_inline.py index 83dfce490..2f7379242 100755 --- a/test_regress/t/t_vpi_dump_no_inline.py +++ b/test_regress/t/t_vpi_dump_no_inline.py @@ -20,7 +20,7 @@ test.compile(make_top_shell=False, iv_flags2=["-g2005-sv"], verilator_flags2=[ "--exe --vpi --public-flat-rw --no-l2name --fno-inline", test.pli_filename, - test.t_dir + "/TestVpiMain.cpp" + "t/TestVpiMain.cpp" ], make_flags=['CPPFLAGS_ADD=-DVL_NO_LEGACY']) diff --git a/test_regress/t/t_vpi_get_public_rw_switch.py b/test_regress/t/t_vpi_get_public_rw_switch.py index 88e7cd71c..b6e094445 100755 --- a/test_regress/t/t_vpi_get_public_rw_switch.py +++ b/test_regress/t/t_vpi_get_public_rw_switch.py @@ -18,8 +18,7 @@ test.compile(make_top_shell=False, make_main=False, make_pli=True, verilator_flags2=[ - "--exe --vpi --public-flat-rw --prefix Vt_vpi_get --no-l2name", - test.t_dir + "/t_vpi_get.cpp" + "--exe --vpi --public-flat-rw --prefix Vt_vpi_get --no-l2name", test.pli_filename ], iv_flags2=["-g2005-sv -D USE_VPI_NOT_DPI"], v_flags2=["+define+USE_VPI_NOT_DPI"])