1--disable_query_log 2--disable_result_log 3let OPENSSL_EXEC_LOG= $MYSQLTEST_VARDIR/log/openssl_exec_log.txt; 4let OPENSSL_CONFIG_INC= $MYSQLTEST_VARDIR/log/openssl_binary_config.inc; 5--error 0,1 6--remove_file $OPENSSL_EXEC_LOG 7--error 0,1 8--remove_file $OPENSSL_CONFIG_INC 9 10--error 0,1, 127 11--exec openssl version 2> $OPENSSL_EXEC_LOG 12let STATUS_VAR= $__error; 13if ($STATUS_VAR) 14{ 15 --error 0,1 16 --remove_file $OPENSSL_EXEC_LOG 17 --skip Test requires openssl binary 18} 19 20perl; 21 use strict; 22 my $search_file= $ENV{'OPENSSL_EXEC_LOG'}; 23 my $search_pattern_1= "can't open config file"; 24 my $search_pattern_2= "Unable to load config info"; 25 my $content= ""; 26 my $dir= $ENV{'MYSQLTEST_VARDIR'}; 27 open(CONFIG_INC, ">$dir/log/openssl_binary_config.inc"); 28 open(FILE, "$search_file") or die("Unable to open '$search_file' : $!\n"); 29 30 read(FILE, $content, 100, 0); 31 close(FILE); 32 33 if ( ($content =~ m{$search_pattern_1}) || ($content =~ m{$search_pattern_2}) ) { 34 print CONFIG_INC "let \$STATUS_VAR = 1;\n"; 35 } 36 else { 37 print CONFIG_INC "let \$STATUS_VAR = 0;\n"; 38 } 39 40 close(CONFIG_INC); 41EOF 42 43--source $OPENSSL_CONFIG_INC 44 45if ($STATUS_VAR) 46{ 47 --error 0,1 48 --remove_file $OPENSSL_EXEC_LOG 49 --error 0,1 50 --remove_file $OPENSSL_CONFIG_INC 51 --skip Test requires openssl binary but either config file for openssl is not found or openssl is unable to load config from the file 52} 53 54--error 0,1 55--remove_file $OPENSSL_EXEC_LOG 56--error 0,1 57--remove_file $OPENSSL_CONFIG_INC 58 59--enable_query_log 60--enable_result_log 61