summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/selftest.pl
diff options
context:
space:
mode:
authorbeck <>2000-04-15 06:18:51 +0000
committerbeck <>2000-04-15 06:18:51 +0000
commitb608c7f2b175e121f2c22d53341a317153afdc8e (patch)
treee94b160b3fcd8180df79e4251d68d24d665f0195 /src/lib/libcrypto/util/selftest.pl
parentc8d6701c396cebdcd0d45eac73b762e9498f6b01 (diff)
downloadopenbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.tar.gz
openbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.tar.bz2
openbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.zip
OpenSSL 0.9.5a merge
Diffstat (limited to 'src/lib/libcrypto/util/selftest.pl')
-rw-r--r--src/lib/libcrypto/util/selftest.pl20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lib/libcrypto/util/selftest.pl b/src/lib/libcrypto/util/selftest.pl
index 91e962a312..04b4425d7e 100644
--- a/src/lib/libcrypto/util/selftest.pl
+++ b/src/lib/libcrypto/util/selftest.pl
@@ -25,7 +25,7 @@ open(OUT,">$report") or die;
25print OUT "OpenSSL self-test report:\n\n"; 25print OUT "OpenSSL self-test report:\n\n";
26 26
27$uname=`uname -a`; 27$uname=`uname -a`;
28$uname="??" if $uname eq ""; 28$uname="??\n" if $uname eq "";
29 29
30$c=`sh config -t`; 30$c=`sh config -t`;
31foreach $_ (split("\n",$c)) { 31foreach $_ (split("\n",$c)) {
@@ -83,6 +83,11 @@ if (open(TEST,">cctest.c")) {
83 print OUT "Compiler doesn't work.\n"; 83 print OUT "Compiler doesn't work.\n";
84 goto err; 84 goto err;
85 } 85 }
86 system("ar r cctest.a /dev/null");
87 if (not -f "cctest.a") {
88 print OUT "Check your archive tool (ar).\n";
89 goto err;
90 }
86} else { 91} else {
87 print OUT "Can't create cctest.c\n"; 92 print OUT "Can't create cctest.c\n";
88} 93}
@@ -129,14 +134,14 @@ if (/no-/)
129} 134}
130 135
131print "Running make test...\n"; 136print "Running make test...\n";
132if (system("make test 2>&1 | tee make.log") > 255) 137if (system("make test 2>&1 | tee maketest.log") > 255)
133 { 138 {
134 print OUT "make test failed!\n"; 139 print OUT "make test failed!\n";
135} else { 140} else {
136 $ok=1; 141 $ok=1;
137} 142}
138 143
139if ($ok and open(IN,"<make.log")) { 144if ($ok and open(IN,"<maketest.log")) {
140 while (<IN>) { 145 while (<IN>) {
141 $ok=2 if /^platform: $platform/; 146 $ok=2 if /^platform: $platform/;
142 } 147 }
@@ -155,6 +160,15 @@ if ($ok != 2) {
155 } else { 160 } else {
156 print OUT "make.log not found!\n"; 161 print OUT "make.log not found!\n";
157 } 162 }
163 if (open(IN,"<maketest.log")) {
164 while (<IN>) {
165 print OUT;
166 }
167 close(IN);
168 print OUT $sep;
169 } else {
170 print OUT "maketest.log not found!\n";
171 }
158} else { 172} else {
159 print OUT "Test passed.\n"; 173 print OUT "Test passed.\n";
160} 174}