mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 18:15:35 +00:00
Make some perl scripts usable with git bisect run
For that they need to return between 0 and 124 on error, while die returns 255, causing bisect-run to abort.
This commit is contained in:
parent
66a36b03c6
commit
a7c4c8a46c
|
@ -36,14 +36,16 @@ my @curves = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` );
|
||||||
system( "cp $config_h $config_h.bak" ) and die;
|
system( "cp $config_h $config_h.bak" ) and die;
|
||||||
sub abort {
|
sub abort {
|
||||||
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
||||||
die $_[0];
|
warn $_[0];
|
||||||
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for my $curve (@curves) {
|
for my $curve (@curves) {
|
||||||
system( "cp $config_h.bak $config_h" ) and die "$config_h not restored\n";
|
system( "cp $config_h.bak $config_h" ) and die "$config_h not restored\n";
|
||||||
|
system( "make clean" ) and die;
|
||||||
|
|
||||||
# depends on a specific curve. Also, ignore error if it wasn't enabled
|
# depends on a specific curve. Also, ignore error if it wasn't enabled
|
||||||
system( "scripts/config.pl unset MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED" );
|
system( "scripts/config.pl unset MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED" );
|
||||||
system( "make clean" ) and die;
|
|
||||||
|
|
||||||
print "\n******************************************\n";
|
print "\n******************************************\n";
|
||||||
print "* Testing without curve: $curve\n";
|
print "* Testing without curve: $curve\n";
|
||||||
|
|
|
@ -44,7 +44,8 @@ my @hashes = split( /\s+/,
|
||||||
system( "cp $config_h $config_h.bak" ) and die;
|
system( "cp $config_h $config_h.bak" ) and die;
|
||||||
sub abort {
|
sub abort {
|
||||||
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
||||||
die $_[0];
|
warn $_[0];
|
||||||
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for my $hash (@hashes) {
|
for my $hash (@hashes) {
|
||||||
|
|
|
@ -50,7 +50,8 @@ my %algs = (
|
||||||
system( "cp $config_h $config_h.bak" ) and die;
|
system( "cp $config_h $config_h.bak" ) and die;
|
||||||
sub abort {
|
sub abort {
|
||||||
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
||||||
die $_[0];
|
warn $_[0];
|
||||||
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while( my ($alg, $extras) = each %algs ) {
|
while( my ($alg, $extras) = each %algs ) {
|
||||||
|
|
|
@ -33,7 +33,8 @@ my @kexes = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` );
|
||||||
system( "cp $config_h $config_h.bak" ) and die;
|
system( "cp $config_h $config_h.bak" ) and die;
|
||||||
sub abort {
|
sub abort {
|
||||||
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
||||||
die $_[0];
|
warn $_[0];
|
||||||
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for my $kex (@kexes) {
|
for my $kex (@kexes) {
|
||||||
|
|
|
@ -55,7 +55,8 @@ my $config_h = 'include/mbedtls/config.h';
|
||||||
system( "cp $config_h $config_h.bak" ) and die;
|
system( "cp $config_h $config_h.bak" ) and die;
|
||||||
sub abort {
|
sub abort {
|
||||||
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
|
||||||
die $_[0];
|
warn $_[0];
|
||||||
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while( my ($conf, $data) = each %configs ) {
|
while( my ($conf, $data) = each %configs ) {
|
||||||
|
|
Loading…
Reference in a new issue