2020-05-04 22:42:15 +00:00
|
|
|
#!/usr/bin/env perl
|
2009-12-03 01:05:12 +00:00
|
|
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
|
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
|
|
#
|
2020-03-21 15:24:24 +00:00
|
|
|
# Copyright 2003 by Wilson Snyder. This program is free software; you
|
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
2009-12-03 01:05:12 +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
|
2009-12-03 01:05:12 +00:00
|
|
|
|
|
|
|
use IO::File;
|
|
|
|
|
2018-05-08 00:42:28 +00:00
|
|
|
scenarios(dist => 1);
|
|
|
|
|
2009-12-03 01:05:12 +00:00
|
|
|
my $root = "..";
|
|
|
|
my $Debug;
|
|
|
|
|
|
|
|
if (!-r "$root/.git") {
|
2018-05-08 00:42:28 +00:00
|
|
|
skip("Not in a git repository");
|
2009-12-03 01:05:12 +00:00
|
|
|
} else {
|
|
|
|
### Must trim output before and after our file list
|
|
|
|
my $files = `cd $root && git ls-files --exclude-standard`;
|
|
|
|
print "ST $files\n" if $Debug;
|
2021-09-07 23:27:46 +00:00
|
|
|
my %names;
|
|
|
|
|
2009-12-03 01:05:12 +00:00
|
|
|
$files =~ s/\s+/ /g;
|
2021-09-07 23:27:46 +00:00
|
|
|
my @batch;
|
|
|
|
my $n = 0;
|
2023-01-26 00:42:28 +00:00
|
|
|
my $re = qr/(FIX[M]E|BO[Z]O)/;
|
2021-09-07 23:27:46 +00:00
|
|
|
foreach my $file (split /\s+/, $files) {
|
2023-01-26 00:42:28 +00:00
|
|
|
my $wholefile = file_contents($root . "/" . $file);
|
|
|
|
if ($wholefile =~ /$re/) {
|
|
|
|
$names{$file} = 1;
|
2018-05-07 02:39:18 +00:00
|
|
|
}
|
2021-09-07 23:27:46 +00:00
|
|
|
}
|
|
|
|
if (scalar(%names) >= 1) {
|
2021-09-08 03:50:28 +00:00
|
|
|
error("Files with FIX" . "MEs: ", join(' ', sort keys %names));
|
2009-12-03 01:05:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ok(1);
|
|
|
|
1;
|