verilator/test_regress/t/t_flag_help.py
Geza Lore 55661e7f71
Install public executables into bindir instead of pkgdatadir (#5140) (#5544)
Instead of installing redirect scripts in to bindir, and real
executables in to pkgdatadir/bin, we now put the real executables into
bindir, and add redirect scripts into pkgdatadir/bin. (That is, we
redirect in the opposite direction as before).

This enables the same relocatable and testable installations as before
without putting architecture specific binaries into pkgdatadir, so
hopefully we now conform to the Linux Filesystem Hierarchy Standard.

This requires a small fixup in the installed `verilator` script to
hardcode the relative path between bindir and pkgdatadir.

Fixes #5140
2024-10-18 10:06:28 +01:00

36 lines
1.2 KiB
Python
Executable File

#!/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
def check(prog):
logfile = test.obj_dir + "/t_help__" + os.path.basename(prog) + ".log"
test.run(fails=False, cmd=[prog, "--help"], logfile=logfile, tee=False, verilator_run=True)
test.file_grep(logfile, r'(DISTRIBUTION|usage:)')
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator")
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator_coverage")
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")
if os.path.exists(os.environ["VERILATOR_ROOT"] + "/bin/verilator_difftree"):
check(os.environ["VERILATOR_ROOT"] + "/bin/verilator_difftree")
test.passes()