diff --git a/include/verilated.cpp b/include/verilated.cpp index a43b00c6b..c3f44dbde 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -72,7 +72,7 @@ # include # define _VL_HAVE_STACKTRACE #endif -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) # include # include # define _VL_HAVE_GETRLIMIT diff --git a/test_regress/driver.py b/test_regress/driver.py index 5c6f2d8de..6c0573b0a 100755 --- a/test_regress/driver.py +++ b/test_regress/driver.py @@ -2809,6 +2809,7 @@ if __name__ == '__main__': if 'TEST_REGRESS' in os.environ: sys.exit("%Error: TEST_REGRESS environment variable is already set") os.environ['TEST_REGRESS'] = os.getcwd() + os.environ['TERM'] = "dumb" Start = time.time() _Parameter_Next_Level = None diff --git a/test_regress/t/t_ccache_report.py b/test_regress/t/t_ccache_report.py index 40d5882b9..6109fa46b 100755 --- a/test_regress/t/t_ccache_report.py +++ b/test_regress/t/t_ccache_report.py @@ -31,8 +31,8 @@ test.files_identical(report, "t/" + test.name + "__ccache_report_initial.out") # Now rebuild again (should be all up to date) test.run(logfile=test.obj_dir + "/rebuild.log", cmd=[ - "make", "-C " + test.obj_dir, "-f " + test.vm_prefix + ".mk", test.vm_prefix, - "ccache-report" + os.environ["MAKE"], "-C " + test.obj_dir, "-f " + test.vm_prefix + ".mk", + test.vm_prefix, "ccache-report" ]) test.files_identical(report, "t/" + test.name + "__ccache_report_rebuild.out") diff --git a/test_regress/t/t_dist_lint_py.py b/test_regress/t/t_dist_lint_py.py index 8c8b9a2f6..f011fb1f8 100755 --- a/test_regress/t/t_dist_lint_py.py +++ b/test_regress/t/t_dist_lint_py.py @@ -18,6 +18,6 @@ if 'VERILATOR_TEST_NO_LINT_PY' in os.environ: if not os.path.exists(root + "/.git"): test.skip("Not in a git repository") -test.run(cmd=["cd " + root + " && make lint-py"]) +test.run(cmd=["cd " + root + " && " + os.environ["MAKE"] + " lint-py"]) test.passes() diff --git a/test_regress/t/t_gantt_numa.py b/test_regress/t/t_gantt_numa.py index 39651ecf0..db25d0d87 100755 --- a/test_regress/t/t_gantt_numa.py +++ b/test_regress/t/t_gantt_numa.py @@ -38,7 +38,7 @@ for trial in range(0, trials): ]) test.file_grep(gantt_log, r'CPU info:') - test.file_grep(gantt_log, r'NUMA status += assigned') + test.file_grep(gantt_log, r'NUMA status += (assigned|%Warning: no /proc/cpuinfo)') # False fails occasionally # test.file_grep_not(gantt_log, r'%Warning:') # e.g. There were fewer CPUs (1) than threads (3). diff --git a/test_regress/t/t_prof.py b/test_regress/t/t_prof.py index e5ebf6147..429e6a0ac 100755 --- a/test_regress/t/t_prof.py +++ b/test_regress/t/t_prof.py @@ -14,6 +14,8 @@ test.scenarios('vlt_all') if re.search(r'clang', test.cxx_version) and 'aarch64' in platform.processor(): test.skip("Known compiler profile issues on clang aarch64") +if platform.libc_ver()[0] != "glibc": + test.skip("The test depends on GMON_OUT_PREFIX which is glibc-specific") test.compile(verilator_flags2=["--stats --prof-cfuncs +define+T_PROF"]) diff --git a/test_regress/t/t_prof_timing.py b/test_regress/t/t_prof_timing.py index 59f233265..6f3f7a570 100755 --- a/test_regress/t/t_prof_timing.py +++ b/test_regress/t/t_prof_timing.py @@ -15,6 +15,8 @@ test.top_filename = "t/t_prof.v" if re.search(r'clang', test.cxx_version) and 'aarch64' in platform.processor(): test.skip("Known compiler profile issues on clang aarch64") +if platform.libc_ver()[0] != "glibc": + test.skip("The test depends on GMON_OUT_PREFIX which is glibc-specific") # TODO below might no longer be required as configure checks for -pg if 'VERILATOR_TEST_NO_GPROF' in os.environ: diff --git a/test_regress/t/t_profc.py b/test_regress/t/t_profc.py index 74f928bb9..a70fca363 100755 --- a/test_regress/t/t_profc.py +++ b/test_regress/t/t_profc.py @@ -8,10 +8,16 @@ # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap +import platform test.scenarios('vlt') test.top_filename = "t_prof.v" +if re.search(r'clang', test.cxx_version) and 'aarch64' in platform.processor(): + test.skip("Known compiler profile issues on clang aarch64") +if platform.libc_ver()[0] != "glibc": + test.skip("The test depends on GMON_OUT_PREFIX which is glibc-specific") + test.compile(verilator_flags2=["--stats --prof-c +define+T_PROF"]) # TODO below might no longer be required as configure checks for -pg diff --git a/test_regress/t/t_trace_two_dump_cc.py b/test_regress/t/t_trace_two_dump_cc.py index 7536b0171..a51b7661e 100755 --- a/test_regress/t/t_trace_two_dump_cc.py +++ b/test_regress/t/t_trace_two_dump_cc.py @@ -20,9 +20,11 @@ test.compile(make_main=False, vm_prefix='Vt_trace_two_b', verilator_flags2=['-trace']) -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.run(logfile=test.obj_dir + "/make_first_ALL.log", + cmd=[ + os.environ["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', diff --git a/test_regress/t/t_trace_two_dump_sc.py b/test_regress/t/t_trace_two_dump_sc.py index 2f28b7607..00db26b57 100755 --- a/test_regress/t/t_trace_two_dump_sc.py +++ b/test_regress/t/t_trace_two_dump_sc.py @@ -23,7 +23,10 @@ test.compile(make_main=False, verilator_flags2=['-sc -trace']) 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"]) + cmd=[ + os.environ["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', diff --git a/test_regress/t/t_trace_two_dumpfst_cc.py b/test_regress/t/t_trace_two_dumpfst_cc.py index 809dbc452..625f3c8ac 100755 --- a/test_regress/t/t_trace_two_dumpfst_cc.py +++ b/test_regress/t/t_trace_two_dumpfst_cc.py @@ -21,7 +21,10 @@ test.compile(make_main=False, verilator_flags2=['--trace-fst --trace-threads 1 -DTEST_FST']) 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"]) + cmd=[ + os.environ["MAKE"], "-C", test.obj_dir, "-f", "Vt_trace_two_b.mk", + "Vt_trace_two_b__ALL.cpp" + ]) test.compile( make_main=False, diff --git a/test_regress/t/t_trace_two_hdr_cc.py b/test_regress/t/t_trace_two_hdr_cc.py index 77ad85f64..a6212983e 100755 --- a/test_regress/t/t_trace_two_hdr_cc.py +++ b/test_regress/t/t_trace_two_hdr_cc.py @@ -21,7 +21,10 @@ test.compile(make_main=False, verilator_flags2=['-trace']) 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"]) + cmd=[ + os.environ["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', diff --git a/test_regress/t/t_trace_two_hdr_sc.py b/test_regress/t/t_trace_two_hdr_sc.py index ebd1ddb6e..f189d58f0 100755 --- a/test_regress/t/t_trace_two_hdr_sc.py +++ b/test_regress/t/t_trace_two_hdr_sc.py @@ -23,7 +23,10 @@ test.compile(make_main=False, verilator_flags2=['-sc -trace']) 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"]) + cmd=[ + os.environ["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', diff --git a/test_regress/t/t_trace_two_hdrfst_cc.py b/test_regress/t/t_trace_two_hdrfst_cc.py index 0817439d8..3836a14ad 100755 --- a/test_regress/t/t_trace_two_hdrfst_cc.py +++ b/test_regress/t/t_trace_two_hdrfst_cc.py @@ -20,9 +20,11 @@ test.compile(make_main=False, vm_prefix='Vt_trace_two_b', verilator_flags2=['--trace-fst --trace-threads 1']) -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.run(logfile=test.obj_dir + "/make_first_ALL.log", + cmd=[ + os.environ["MAKE"], "-C", "" + test.obj_dir, "-f", "Vt_trace_two_b.mk", + "Vt_trace_two_b__ALL.cpp" + ]) test.compile( make_main=False, diff --git a/test_regress/t/t_trace_two_port_cc.py b/test_regress/t/t_trace_two_port_cc.py index 9ada6cf8e..e4317efaa 100755 --- a/test_regress/t/t_trace_two_port_cc.py +++ b/test_regress/t/t_trace_two_port_cc.py @@ -21,7 +21,10 @@ test.compile(make_main=False, verilator_flags2=['-trace']) 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"]) + cmd=[ + os.environ["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', diff --git a/test_regress/t/t_trace_two_port_sc.py b/test_regress/t/t_trace_two_port_sc.py index 239f3e938..b26f20592 100755 --- a/test_regress/t/t_trace_two_port_sc.py +++ b/test_regress/t/t_trace_two_port_sc.py @@ -24,7 +24,10 @@ test.compile(make_main=False, verilator_flags2=['-sc -trace']) 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"]) + cmd=[ + os.environ["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', diff --git a/test_regress/t/t_trace_two_portfst_cc.py b/test_regress/t/t_trace_two_portfst_cc.py index 470301806..b1048f6a9 100755 --- a/test_regress/t/t_trace_two_portfst_cc.py +++ b/test_regress/t/t_trace_two_portfst_cc.py @@ -20,9 +20,11 @@ test.compile(make_main=False, vm_prefix='Vt_trace_two_b', verilator_flags2=['--trace-fst --trace-threads 1']) -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.run(logfile=test.obj_dir + "/make_first_ALL.log", + cmd=[ + os.environ["MAKE"], "-C", "" + test.obj_dir, "-f", "Vt_trace_two_b.mk", + "Vt_trace_two_b__ALL.cpp" + ]) test.compile( make_main=False,