2024-09-08 17:00:03 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
|
|
#
|
|
|
|
# Copyright 2024 by Wilson Snyder. This program is free software; you
|
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
# Version 2.0.
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
|
|
|
|
import vltest_bootstrap
|
|
|
|
|
|
|
|
test.scenarios('dist')
|
|
|
|
|
|
|
|
# See also t_flag_version.py
|
|
|
|
|
|
|
|
|
2024-10-18 09:06:28 +00:00
|
|
|
def check(prog):
|
2024-09-08 17:00:03 +00:00
|
|
|
logfile = test.obj_dir + "/t_help__" + os.path.basename(prog) + ".log"
|
|
|
|
|
2024-10-18 09:06:28 +00:00
|
|
|
test.run(fails=False, cmd=[prog, "--help"], logfile=logfile, tee=False, verilator_run=True)
|
2024-09-08 17:00:03 +00:00
|
|
|
|
|
|
|
test.file_grep(logfile, r'(DISTRIBUTION|usage:)')
|
|
|
|
|
|
|
|
|
2024-10-18 09:06:28 +00:00
|
|
|
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator")
|
|
|
|
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator_coverage")
|
2024-09-08 17:00:03 +00:00
|
|
|
|
2024-10-18 09:06:28 +00:00
|
|
|
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator_ccache_report")
|
|
|
|
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator_gantt")
|
|
|
|
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator_profcfunc")
|
2024-09-08 17:00:03 +00:00
|
|
|
|
|
|
|
if os.path.exists(os.environ["VERILATOR_ROOT"] + "/bin/verilator_difftree"):
|
2024-10-18 09:06:28 +00:00
|
|
|
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator_difftree")
|
2024-09-08 17:00:03 +00:00
|
|
|
|
|
|
|
test.passes()
|