The selftest sometimes lacked important information

This commit is contained in:
Ulf Möller 2000-03-04 00:22:56 +00:00
parent 7f1120994e
commit c7fecee8b5
2 changed files with 19 additions and 3 deletions

View File

@ -7,5 +7,7 @@ outinc
rehash.time rehash.time
testlog testlog
make.log make.log
maketest.log
cctest cctest
cctest.c cctest.c
cctest.a

View File

@ -25,7 +25,7 @@ open(OUT,">$report") or die;
print OUT "OpenSSL self-test report:\n\n"; print OUT "OpenSSL self-test report:\n\n";
$uname=`uname -a`; $uname=`uname -a`;
$uname="??" if $uname eq ""; $uname="??\n" if $uname eq "";
$c=`sh config -t`; $c=`sh config -t`;
foreach $_ (split("\n",$c)) { foreach $_ (split("\n",$c)) {
@ -83,6 +83,11 @@ if (open(TEST,">cctest.c")) {
print OUT "Compiler doesn't work.\n"; print OUT "Compiler doesn't work.\n";
goto err; goto err;
} }
system("ar r cctest.a");
if (not -f "cctest.a") {
print OUT "Check your linker (ar).\n";
goto err;
}
} else { } else {
print OUT "Can't create cctest.c\n"; print OUT "Can't create cctest.c\n";
} }
@ -129,14 +134,14 @@ if (/no-/)
} }
print "Running make test...\n"; print "Running make test...\n";
if (system("make test 2>&1 | tee make.log") > 255) if (system("make test 2>&1 | tee maketest.log") > 255)
{ {
print OUT "make test failed!\n"; print OUT "make test failed!\n";
} else { } else {
$ok=1; $ok=1;
} }
if ($ok and open(IN,"<make.log")) { if ($ok and open(IN,"<maketest.log")) {
while (<IN>) { while (<IN>) {
$ok=2 if /^platform: $platform/; $ok=2 if /^platform: $platform/;
} }
@ -155,6 +160,15 @@ if ($ok != 2) {
} else { } else {
print OUT "make.log not found!\n"; print OUT "make.log not found!\n";
} }
if (open(IN,"<maketest.log")) {
while (<IN>) {
print OUT;
}
close(IN);
print OUT $sep;
} else {
print OUT "maketest.log not found!\n";
}
} else { } else {
print OUT "Test passed.\n"; print OUT "Test passed.\n";
} }