summaryrefslogtreecommitdiffstats
path: root/test/recipes
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2015-08-09 06:52:50 +0200
committerRichard Levitte <levitte@openssl.org>2015-09-07 16:10:58 +0200
commit53520ebe8757fea7d2e9ffe3d0c610dd6b9b9cc6 (patch)
tree1b0b38eba558cb069a3a5c468f7700ef71c564eb /test/recipes
parent2511c12bf2d5f07f329d1e90cde8791817e4357e (diff)
Check the validity of MINFO
MINFO may be an old file lying around, which might have 00-check_testexes.t produce incorrect results. To make sure this doesn't happen, check the variable VERSION in it against the same variable in the top Makefile. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/recipes')
-rw-r--r--test/recipes/00-check_testexes.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/recipes/00-check_testexes.t b/test/recipes/00-check_testexes.t
index 483d8830fe..3ab38c77af 100644
--- a/test/recipes/00-check_testexes.t
+++ b/test/recipes/00-check_testexes.t
@@ -8,13 +8,26 @@ use OpenSSL::Test qw/:DEFAULT top_file/;
setup("check_testexes");
+my $OpenSSL_ver = "";
+my $Makefile = top_file("Makefile");
+if (open(FH, $Makefile)) {
+ $OpenSSL_ver =
+ (map { chomp; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } <FH>)[0];
+ close FH;
+}
+
my $MINFO = top_file("MINFO");
plan skip_all => "because MINFO not found. If you want this test to run, please do 'perl util/mkfiles.pl > MINFO'"
unless open(FH,$MINFO);
+my $MINFO_ver = "";
+
while(<FH>) {
chomp;
+ if (/^VERSION=([^\s]*)\s*$/) {
+ $MINFO_ver = $1;
+ }
last if /^RELATIVE_DIRECTORY=test$/;
}
while(<FH>) {
@@ -23,6 +36,9 @@ while(<FH>) {
}
close FH;
+plan skip_all => "because MINFO is not from this OpenSSL version. If you want this test to run, please do 'perl util/mkfiles.pl > MINFO'"
+ unless $OpenSSL_ver eq $MINFO_ver;
+
s/^EXE=\s*//;
s/\s*$//;
my @expected_tests =