wycheproof: add a failfast mode
This commit is contained in:
parent
52ab9ca179
commit
d6235df66f
@ -12,7 +12,8 @@ sub slurp ($fh) { local $/; <$fh> }
|
|||||||
|
|
||||||
sub usage ()
|
sub usage ()
|
||||||
{
|
{
|
||||||
say STDERR "Usage: $progname -x runner json_file [json_files ...]";
|
say STDERR "Usage: $progname [-Fv] -x runner json_file ",
|
||||||
|
"[json_files ...]";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ sub main ()
|
|||||||
my %opts;
|
my %opts;
|
||||||
my $rc = 0;
|
my $rc = 0;
|
||||||
|
|
||||||
getopts("vx:", \%opts) && @ARGV > 0 or usage;
|
getopts("Fvx:", \%opts) && @ARGV > 0 or usage;
|
||||||
usage unless defined $opts{"x"};
|
usage unless defined $opts{"x"};
|
||||||
|
|
||||||
for my $f (@ARGV) {
|
for my $f (@ARGV) {
|
||||||
@ -56,6 +57,7 @@ sub main ()
|
|||||||
"$test->{comment} [",
|
"$test->{comment} [",
|
||||||
join(",", $test->{flags}->@*),
|
join(",", $test->{flags}->@*),
|
||||||
"]";
|
"]";
|
||||||
|
exit 1 if $opts{"F"};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@ sub slurp ($fh) { local $/; <$fh> }
|
|||||||
|
|
||||||
sub usage ()
|
sub usage ()
|
||||||
{
|
{
|
||||||
say STDERR "Usage: $progname -x runner json_file [json_files ...]";
|
say STDERR "Usage: $progname [-Fv] -x runner json_file ",
|
||||||
|
"[json_files ...]";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ sub main ()
|
|||||||
my %opts;
|
my %opts;
|
||||||
my $rc = 0;
|
my $rc = 0;
|
||||||
|
|
||||||
getopts("vx:", \%opts) && @ARGV > 0 or usage;
|
getopts("Fvx:", \%opts) && @ARGV > 0 or usage;
|
||||||
usage unless defined $opts{"x"};
|
usage unless defined $opts{"x"};
|
||||||
|
|
||||||
for my $f (@ARGV) {
|
for my $f (@ARGV) {
|
||||||
@ -52,6 +53,7 @@ sub main ()
|
|||||||
"$test->{comment} [",
|
"$test->{comment} [",
|
||||||
join(",", $test->{flags}->@*),
|
join(",", $test->{flags}->@*),
|
||||||
"]";
|
"]";
|
||||||
|
exit 1 if $opts{"F"};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user