diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/util/selftest.pl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/util/selftest.pl b/src/lib/libcrypto/util/selftest.pl index 04b4425d7e..eb50d52ff8 100644 --- a/src/lib/libcrypto/util/selftest.pl +++ b/src/lib/libcrypto/util/selftest.pl | |||
| @@ -19,6 +19,7 @@ my $ok=0; | |||
| 19 | my $cc="cc"; | 19 | my $cc="cc"; |
| 20 | my $cversion="??"; | 20 | my $cversion="??"; |
| 21 | my $sep="-----------------------------------------------------------------------------\n"; | 21 | my $sep="-----------------------------------------------------------------------------\n"; |
| 22 | my $not_our_fault="\nPlease ask your system administrator/vendor for more information.\n[Problems with your operating system setup should not be reported\nto the OpenSSL project.]\n"; | ||
| 22 | 23 | ||
| 23 | open(OUT,">$report") or die; | 24 | open(OUT,">$report") or die; |
| 24 | 25 | ||
| @@ -76,16 +77,18 @@ print OUT "\n"; | |||
| 76 | 77 | ||
| 77 | print "Checking compiler...\n"; | 78 | print "Checking compiler...\n"; |
| 78 | if (open(TEST,">cctest.c")) { | 79 | if (open(TEST,">cctest.c")) { |
| 79 | print TEST "#include <stdio.h>\nmain(){printf(\"Hello world\\n\");}\n"; | 80 | print TEST "#include <stdio.h>\n#include <errno.h>\nmain(){printf(\"Hello world\\n\");}\n"; |
| 80 | close(TEST); | 81 | close(TEST); |
| 81 | system("$cc -o cctest cctest.c"); | 82 | system("$cc -o cctest cctest.c"); |
| 82 | if (`./cctest` !~ /Hello world/) { | 83 | if (`./cctest` !~ /Hello world/) { |
| 83 | print OUT "Compiler doesn't work.\n"; | 84 | print OUT "Compiler doesn't work.\n"; |
| 85 | print OUT $not_our_fault; | ||
| 84 | goto err; | 86 | goto err; |
| 85 | } | 87 | } |
| 86 | system("ar r cctest.a /dev/null"); | 88 | system("ar r cctest.a /dev/null"); |
| 87 | if (not -f "cctest.a") { | 89 | if (not -f "cctest.a") { |
| 88 | print OUT "Check your archive tool (ar).\n"; | 90 | print OUT "Check your archive tool (ar).\n"; |
| 91 | print OUT $not_our_fault; | ||
| 89 | goto err; | 92 | goto err; |
| 90 | } | 93 | } |
| 91 | } else { | 94 | } else { |
| @@ -102,6 +105,7 @@ if (open(TEST,">cctest.c")) { | |||
| 102 | } else { | 105 | } else { |
| 103 | print OUT "Can't compile test program!\n"; | 106 | print OUT "Can't compile test program!\n"; |
| 104 | } | 107 | } |
| 108 | print OUT $not_our_fault; | ||
| 105 | goto err; | 109 | goto err; |
| 106 | } | 110 | } |
| 107 | } else { | 111 | } else { |
| @@ -133,6 +137,13 @@ if (/no-/) | |||
| 133 | goto err; | 137 | goto err; |
| 134 | } | 138 | } |
| 135 | 139 | ||
| 140 | if (`echo 4+1 | bc` != 5) | ||
| 141 | { | ||
| 142 | print OUT "Can't run bc! Test skipped.\n"; | ||
| 143 | print OUT $not_our_fault; | ||
| 144 | goto err; | ||
| 145 | } | ||
| 146 | |||
| 136 | print "Running make test...\n"; | 147 | print "Running make test...\n"; |
| 137 | if (system("make test 2>&1 | tee maketest.log") > 255) | 148 | if (system("make test 2>&1 | tee maketest.log") > 255) |
| 138 | { | 149 | { |
