2020-05-04 22:42:15 +00:00
|
|
|
#!/usr/bin/env perl
|
2008-09-23 14:02:31 +00:00
|
|
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
2008-03-18 20:26:37 +00:00
|
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
|
|
#
|
2020-03-21 15:24:24 +00:00
|
|
|
# Copyright 2003-2009 by Wilson Snyder. This program is free software; you
|
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 21:07:57 +00:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
# Version 2.0.
|
2020-03-21 15:24:24 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2008-03-18 20:26:37 +00:00
|
|
|
|
2022-08-07 08:57:59 +00:00
|
|
|
use File::Basename;
|
|
|
|
|
2018-05-08 00:42:28 +00:00
|
|
|
scenarios(dist => 1);
|
2010-03-18 16:03:08 +00:00
|
|
|
|
2021-06-06 23:56:30 +00:00
|
|
|
# See also t_flag_version.pl
|
|
|
|
|
|
|
|
sub check {
|
|
|
|
my $interpreter = shift;
|
|
|
|
my $prog = shift;
|
|
|
|
|
2022-08-07 08:57:59 +00:00
|
|
|
my $logfile = "$Self->{obj_dir}/t_help__" . basename($prog) . ".log";
|
|
|
|
|
2021-06-06 23:56:30 +00:00
|
|
|
run(fails => 0,
|
|
|
|
cmd => [$interpreter, $prog, "--help"],
|
2022-08-07 08:57:59 +00:00
|
|
|
logfile => $logfile,
|
2021-06-06 23:56:30 +00:00
|
|
|
tee => 0,
|
|
|
|
verilator_run => 1,
|
|
|
|
);
|
|
|
|
|
2022-08-07 08:57:59 +00:00
|
|
|
file_grep($logfile, qr/(DISTRIBUTION|usage:)/i);
|
2021-06-06 23:56:30 +00:00
|
|
|
}
|
|
|
|
|
2022-08-07 08:57:59 +00:00
|
|
|
check("perl", "../bin/verilator");
|
|
|
|
check("perl", "../bin/verilator_coverage");
|
2008-03-18 20:26:37 +00:00
|
|
|
|
2021-06-06 23:56:30 +00:00
|
|
|
check("python3", "../bin/verilator_ccache_report");
|
2022-08-07 08:57:59 +00:00
|
|
|
check("python3", "../bin/verilator_difftree");
|
|
|
|
check("python3", "../bin/verilator_gantt");
|
|
|
|
check("python3", "../bin/verilator_profcfunc");
|
2021-06-06 23:56:30 +00:00
|
|
|
|
2008-03-18 20:26:37 +00:00
|
|
|
ok(1);
|
|
|
|
1;
|