Tests: Avoid t_dist failures on deleted files.
This commit is contained in:
parent
921fd919b5
commit
7e1980af7a
|
|
@ -26,6 +26,7 @@ if (!-r catfile($root, ".git")) {
|
||||||
next if $file =~ m!include/vltstd/vpi_user.h!; # IEEE Standard file - can't change it
|
next if $file =~ m!include/vltstd/vpi_user.h!; # IEEE Standard file - can't change it
|
||||||
next if $file =~ m!include/gtkwave/!; # Standard file - can't change it
|
next if $file =~ m!include/gtkwave/!; # Standard file - can't change it
|
||||||
my $filename = catfile($root, $file);
|
my $filename = catfile($root, $file);
|
||||||
|
next if !-r $filename;
|
||||||
@lines = split /\n/, file_contents($filename);
|
@lines = split /\n/, file_contents($filename);
|
||||||
@include_lines = grep(/include/, @lines);
|
@include_lines = grep(/include/, @lines);
|
||||||
foreach my $line (@include_lines) {
|
foreach my $line (@include_lines) {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||||
use IO::File;
|
use IO::File;
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
use strict;
|
use strict;
|
||||||
|
use File::Spec::Functions 'catfile';
|
||||||
|
|
||||||
scenarios(dist => 1);
|
scenarios(dist => 1);
|
||||||
|
|
||||||
|
|
@ -74,8 +75,10 @@ if (!-r "$root/.git") {
|
||||||
$added{$1} = 1;
|
$added{$1} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $filename (sort keys %files) {
|
foreach my $file (sort keys %files) {
|
||||||
my $fh = IO::File->new("<$root/$filename") or error("$! $filename");
|
my $filename = catfile($root, $file);
|
||||||
|
next if !-r $filename;
|
||||||
|
my $fh = IO::File->new("<$filename") or error("$! $filename");
|
||||||
next if !$fh;
|
next if !$fh;
|
||||||
my $spdx;
|
my $spdx;
|
||||||
my $copyright;
|
my $copyright;
|
||||||
|
|
@ -86,12 +89,12 @@ if (!-r "$root/.git") {
|
||||||
} elsif ($line =~ /Copyright 20[0-9][0-9]/) {
|
} elsif ($line =~ /Copyright 20[0-9][0-9]/) {
|
||||||
$copyright = $line;
|
$copyright = $line;
|
||||||
if ($line =~ /Wilson Snyder/) {
|
if ($line =~ /Wilson Snyder/) {
|
||||||
} elsif (!$added{$filename} && $line =~ /Antmicro|Geza Lore|Todd Strader/) {
|
} elsif (!$added{$file} && $line =~ /Antmicro|Geza Lore|Todd Strader/) {
|
||||||
} elsif ($filename =~ /$Exempt_Author_Re/) {
|
} elsif ($file =~ /$Exempt_Author_Re/) {
|
||||||
} else {
|
} else {
|
||||||
my $yeardash = ($filename =~ m!test_regress/t!) ? $year : $year."-".$year;
|
my $yeardash = ($file =~ m!test_regress/t!) ? $year : $year."-".$year;
|
||||||
warn " ".$copyright;
|
warn " ".$copyright;
|
||||||
error("$filename: Please use standard 'Copyright $yeardash by Wilson Snyder'");
|
error("$file: Please use standard 'Copyright $yeardash by Wilson Snyder'");
|
||||||
}
|
}
|
||||||
} elsif ($line =~ m!Creative Commons Public Domain!
|
} elsif ($line =~ m!Creative Commons Public Domain!
|
||||||
|| $line =~ m!freely copied and/or distributed!
|
|| $line =~ m!freely copied and/or distributed!
|
||||||
|
|
@ -100,14 +103,14 @@ if (!-r "$root/.git") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $release_note;
|
my $release_note;
|
||||||
if ($release && $filename !~ /$Release_Ok_Re/) {
|
if ($release && $file !~ /$Release_Ok_Re/) {
|
||||||
$release_note = " (has copyright release, but not part of $Release_Ok_Re)";
|
$release_note = " (has copyright release, but not part of $Release_Ok_Re)";
|
||||||
}
|
}
|
||||||
if (!$copyright && (!$release || $release_note)) {
|
if (!$copyright && (!$release || $release_note)) {
|
||||||
error("$filename: Please add standard 'Copyright $year ...', similar to in other files" . $release_note);
|
error("$file: Please add standard 'Copyright $year ...', similar to in other files" . $release_note);
|
||||||
}
|
}
|
||||||
if (!$spdx) {
|
if (!$spdx) {
|
||||||
error("$filename: Please add standard 'SPDX-License_Identifier: ...', similar to in other files");
|
error("$file: Please add standard 'SPDX-License_Identifier: ...', similar to in other files");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
use IO::File;
|
use IO::File;
|
||||||
|
use File::Spec::Functions 'catfile';
|
||||||
|
|
||||||
scenarios(dist => 1);
|
scenarios(dist => 1);
|
||||||
|
|
||||||
|
|
@ -28,7 +29,9 @@ if (!-r "$root/.git") {
|
||||||
my $n = 0;
|
my $n = 0;
|
||||||
my $re = qr/(FIX[M]E|BO[Z]O)/;
|
my $re = qr/(FIX[M]E|BO[Z]O)/;
|
||||||
foreach my $file (split /\s+/, $files) {
|
foreach my $file (split /\s+/, $files) {
|
||||||
my $wholefile = file_contents($root . "/" . $file);
|
my $filename = catfile($root, $file);
|
||||||
|
next if !-r $filename;
|
||||||
|
my $wholefile = file_contents($filename);
|
||||||
if ($wholefile =~ /$re/) {
|
if ($wholefile =~ /$re/) {
|
||||||
$names{$file} = 1;
|
$names{$file} = 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue