X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test%2F00-engine.t;h=0904a21aa4a720409989aef1cf6b00063709319f;hb=HEAD;hp=a3d1037857028d5a10f65b73f74ec354f70ac271;hpb=1d378c5620f0fad2310676bad4f519d5fd9f2f1a;p=openssl-gost%2Fengine.git diff --git a/test/00-engine.t b/test/00-engine.t index a3d1037..0904a21 100644 --- a/test/00-engine.t +++ b/test/00-engine.t @@ -1,24 +1,22 @@ #!/usr/bin/perl -use Test::More tests => 5; +use Test2::V0; +skip_all('This test is only suitable for the engine') + unless $ARGV[0] eq 'engine'; +plan(7); use Cwd 'abs_path'; # prepare data for -open F,">","testdata.dat"; -print F "12345670" x 128; -close F; +open (my $F,">","testdata.dat"); +print $F "12345670" x 128; +close $F; -# Set OPENSSL_ENGINES environment variable to just built engine -if(!defined $ENV{'OPENSSL_ENGINES'}){ - $ENV{'OPENSSL_ENGINES'} = abs_path("../.libs"); -} - -$key='0123456789abcdef' x 2; +my $key='0123456789abcdef' x 2; # # You can redefine engine to use using ENGINE_NAME environment variable # -$engine=$ENV{'ENGINE_NAME'}||"gost"; +my $engine=$ENV{'ENGINE_NAME'}||"gost"; # Reopen STDERR to eliminate extra output open STDERR, ">>","tests.err"; @@ -32,6 +30,8 @@ if (exists $ENV{'OPENSSL_CONF'}) { # ${ENGINE_NAME}.info into this directory if you use this test suite # to test other engine implementing GOST cryptography. # +my $engine_info; + if ( -f $engine . ".info") { diag("Reading $engine.info"); open F, "<", $engine . ".info"; @@ -40,7 +40,7 @@ if ( -f $engine . ".info") { $engine_info= <","test.cnf"; -print F <","test.cnf"; +print $F <