diff options
author | Richard Levitte <levitte@openssl.org> | 2016-01-30 01:05:33 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-09 11:43:20 +0100 |
commit | 42e0ccdfe851c9a153d3e90746a2b8561dc9b1e3 (patch) | |
tree | 32b3a8b198c14f54ad5138598ae543dac45d2446 /test | |
parent | d7465918867b107058228938e7f5c9fa032ef708 (diff) |
unified build scheme: adjust test framework for out of source build tree
To be able to run tests when we've built in a directory other than
the source tree, the testing framework needs a few adjustments.
test/testlib/OpenSSL/Test.pm needs to know where it can find
shlib_wrap.sh, and a number of other tests need to be told a different
place to find engines than what they may be able to figure out on
their own. Relying to $TOP is not enough, $SRCTOP and $BLDTOP can be
used as an alternative.
As part of this change, top_file and top_dir are removed and
srctop_file, bldtop_file, srctop_dir and bldtop_dir take their place.
Reviewed-by: Ben Laurie <ben@openssl.org>
Diffstat (limited to 'test')
34 files changed, 229 insertions, 164 deletions
diff --git a/test/recipes/00-check_testexes.t b/test/recipes/00-check_testexes.t index c086f7f8cc..9da85f26af 100644 --- a/test/recipes/00-check_testexes.t +++ b/test/recipes/00-check_testexes.t @@ -4,19 +4,19 @@ use strict; use File::Spec::Functions; use File::Basename; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT bldtop_file/; setup("check_testexes"); my $OpenSSL_ver = ""; -my $Makefile = top_file("Makefile"); +my $Makefile = bldtop_file("Makefile"); if (open(FH, $Makefile)) { $OpenSSL_ver = (map { s/\R//; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } <FH>)[0]; close FH; } -my $MINFO = top_file("MINFO"); +my $MINFO = bldtop_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); @@ -50,7 +50,7 @@ my @expected_tests = plan tests => scalar @expected_tests; my @found_tests = - map { basename($_) } glob(top_file("test", "recipes", "*.t")); + map { basename($_) } glob(bldtop_file("test", "recipes", "*.t")); foreach my $test (sort @expected_tests) { ok(scalar(grep(/^[0-9][0-9]-test_$test\.t$/, @found_tests)), diff --git a/test/recipes/01-test_ordinals.t b/test/recipes/01-test_ordinals.t index 6c5efff7df..ffda0f705c 100755 --- a/test/recipes/01-test_ordinals.t +++ b/test/recipes/01-test_ordinals.t @@ -53,14 +53,14 @@ # Hudson (tjh@cryptsoft.com). use strict; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_ordinals"); plan tests => 2; -ok(testordinals(top_file("util", "libeay.num")), "Test libeay.num"); -ok(testordinals(top_file("util", "ssleay.num")), "Test ssleay.num"); +ok(testordinals(srctop_file("util", "libeay.num")), "Test libeay.num"); +ok(testordinals(srctop_file("util", "ssleay.num")), "Test ssleay.num"); sub testordinals { diff --git a/test/recipes/10-test_bn.t b/test/recipes/10-test_bn.t index a01d9bfef0..7e728f4e16 100644 --- a/test/recipes/10-test_bn.t +++ b/test/recipes/10-test_bn.t @@ -5,13 +5,13 @@ use warnings; use Math::BigInt; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_bn"); plan tests => 3; -require_ok(top_file("test","recipes","bc.pl")); +require_ok(srctop_file("test","recipes","bc.pl")); my $testresults = "tmp.bntest"; my $init = ok(run(test(["bntest"], stdout => $testresults)), 'initialize'); diff --git a/test/recipes/15-test_dsa.t b/test/recipes/15-test_dsa.t index 5a1917dced..22f971cebf 100644 --- a/test/recipes/15-test_dsa.t +++ b/test/recipes/15-test_dsa.t @@ -4,14 +4,14 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; use OpenSSL::Test::Utils; setup("test_dsa"); plan tests => 6; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); ok(run(test(["dsatest"])), "running dsatest"); ok(run(test(["dsatest", "-app2_1"])), "running dsatest -app2_1"); @@ -21,13 +21,13 @@ ok(run(test(["dsatest", "-app2_1"])), "running dsatest -app2_1"); if disabled("dsa"); subtest 'dsa conversions -- private key' => sub { - tconversion("dsa", top_file("test","testdsa.pem")); + tconversion("dsa", srctop_file("test","testdsa.pem")); }; subtest 'dsa conversions -- private key PKCS#8' => sub { - tconversion("dsa", top_file("test","testdsa.pem"), "pkey"); + tconversion("dsa", srctop_file("test","testdsa.pem"), "pkey"); }; subtest 'dsa conversions -- public key' => sub { - tconversion("dsa", top_file("test","testdsapub.pem"), "dsa", + tconversion("dsa", srctop_file("test","testdsapub.pem"), "dsa", "-pubin", "-pubout"); }; } diff --git a/test/recipes/15-test_ec.t b/test/recipes/15-test_ec.t index 4701dc80db..48b8ce8cda 100644 --- a/test/recipes/15-test_ec.t +++ b/test/recipes/15-test_ec.t @@ -4,14 +4,14 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; use OpenSSL::Test::Utils; setup("test_ec"); plan tests => 5; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); ok(run(test(["ectest"])), "running ectest"); @@ -20,12 +20,12 @@ ok(run(test(["ectest"])), "running ectest"); if disabled("ec"); subtest 'ec conversions -- private key' => sub { - tconversion("ec", top_file("test","testec-p256.pem")); + tconversion("ec", srctop_file("test","testec-p256.pem")); }; subtest 'ec conversions -- private key PKCS#8' => sub { - tconversion("ec", top_file("test","testec-p256.pem"), "pkey"); + tconversion("ec", srctop_file("test","testec-p256.pem"), "pkey"); }; subtest 'ec conversions -- public key' => sub { - tconversion("ec", top_file("test","testecpub-p256.pem"), "ec", "-pubin", "-pubout"); + tconversion("ec", srctop_file("test","testecpub-p256.pem"), "ec", "-pubin", "-pubout"); }; } diff --git a/test/recipes/15-test_rsa.t b/test/recipes/15-test_rsa.t index 6418ff7edd..42bba1d0ba 100644 --- a/test/recipes/15-test_rsa.t +++ b/test/recipes/15-test_rsa.t @@ -4,14 +4,14 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; use OpenSSL::Test::Utils; setup("test_rsa"); plan tests => 5; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); ok(run(test(["rsa_test"])), "running rsatest"); @@ -20,13 +20,13 @@ ok(run(test(["rsa_test"])), "running rsatest"); if disabled("rsa"); subtest 'rsa conversions -- private key' => sub { - tconversion("rsa", top_file("test","testrsa.pem")); + tconversion("rsa", srctop_file("test","testrsa.pem")); }; subtest 'rsa conversions -- private key PKCS#8' => sub { - tconversion("rsa", top_file("test","testrsa.pem"), "pkey"); + tconversion("rsa", srctop_file("test","testrsa.pem"), "pkey"); }; subtest 'rsa conversions -- public key' => sub { - tconversion("rsa", top_file("test","testrsapub.pem"), "rsa", + tconversion("rsa", srctop_file("test","testrsapub.pem"), "rsa", "-pubin", "-pubout"); }; } diff --git a/test/recipes/20-test_enc.t b/test/recipes/20-test_enc.t index 55f39421fe..2efcf70020 100644 --- a/test/recipes/20-test_enc.t +++ b/test/recipes/20-test_enc.t @@ -7,14 +7,14 @@ use File::Spec::Functions qw/catfile/; use File::Copy; use File::Compare qw/compare_text/; use File::Basename; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_enc"); # We do it this way, because setup() may have moved us around, # so the directory portion of $0 might not be correct any more. # However, the name hasn't changed. -my $testsrc = top_file("test","recipes",basename($0)); +my $testsrc = srctop_file("test","recipes",basename($0)); my $test = catfile(".", "p"); diff --git a/test/recipes/25-test_crl.t b/test/recipes/25-test_crl.t index 6779a0b1af..8650bfc9f9 100644 --- a/test/recipes/25-test_crl.t +++ b/test/recipes/25-test_crl.t @@ -4,14 +4,14 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_crl"); plan tests => 2; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); subtest 'crl conversions' => sub { - tconversion("crl", top_file("test","testcrl.pem")); + tconversion("crl", srctop_file("test","testcrl.pem")); }; diff --git a/test/recipes/25-test_gen.t b/test/recipes/25-test_gen.t index dc8ca6ac05..ce4a5ee260 100644 --- a/test/recipes/25-test_gen.t +++ b/test/recipes/25-test_gen.t @@ -4,7 +4,7 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; use OpenSSL::Test::Utils; setup("test_gen"); @@ -13,7 +13,7 @@ plan tests => 1; my $T = "testcert"; my $KEY = 512; -my $CA = top_file("certs", "testca.pem"); +my $CA = srctop_file("certs", "testca.pem"); unlink "$T.1", "$T.2", "$T.key"; open RND, ">>", ".rnd"; @@ -23,7 +23,7 @@ close RND; subtest "generating certificate requests" => sub { my @req_new; if (disabled("rsa")) { - @req_new = ("-newkey", "dsa:".top_file("apps", "dsa512.pem")); + @req_new = ("-newkey", "dsa:".srctop_file("apps", "dsa512.pem")); } else { @req_new = ("-new"); note("There should be a 2 sequences of .'s and some +'s."); @@ -34,11 +34,11 @@ subtest "generating certificate requests" => sub { plan tests => 2; - ok(run(app(["openssl", "req", "-config", top_file("test", "test.cnf"), + ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"), @req_new, "-out", "testreq.pem"])), "Generating request"); - ok(run(app(["openssl", "req", "-config", top_file("test", "test.cnf"), + ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"), "-verify", "-in", "testreq.pem", "-noout"])), "Verifying signature on request"); }; diff --git a/test/recipes/25-test_pkcs7.t b/test/recipes/25-test_pkcs7.t index 3a4dbb47bd..6e9b397175 100644 --- a/test/recipes/25-test_pkcs7.t +++ b/test/recipes/25-test_pkcs7.t @@ -4,17 +4,17 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_pkcs7"); plan tests => 3; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); subtest 'pkcs7 conversions -- pkcs7' => sub { - tconversion("p7", top_file("test", "testp7.pem"), "pkcs7"); + tconversion("p7", srctop_file("test", "testp7.pem"), "pkcs7"); }; subtest 'pkcs7 conversions -- pkcs7d' => sub { - tconversion("p7d", top_file("test", "pkcs7-1.pem"), "pkcs7"); + tconversion("p7d", srctop_file("test", "pkcs7-1.pem"), "pkcs7"); }; diff --git a/test/recipes/25-test_req.t b/test/recipes/25-test_req.t index ce1f869e2b..fac97719e6 100644 --- a/test/recipes/25-test_req.t +++ b/test/recipes/25-test_req.t @@ -4,15 +4,15 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_req"); plan tests => 3; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); -my @openssl_args = ("req", "-config", "../apps/openssl.cnf"); +my @openssl_args = ("req", "-config", srctop_file("apps", "openssl.cnf")); run_conversion('req conversions', "testreq.pem"); diff --git a/test/recipes/25-test_sid.t b/test/recipes/25-test_sid.t index b223c0dd4f..84444b3b61 100644 --- a/test/recipes/25-test_sid.t +++ b/test/recipes/25-test_sid.t @@ -4,14 +4,14 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_sid"); plan tests => 2; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); subtest 'sid conversions' => sub { - tconversion("sid", top_file("test","testsid.pem"), "sess_id"); + tconversion("sid", srctop_file("test","testsid.pem"), "sess_id"); }; diff --git a/test/recipes/25-test_verify.t b/test/recipes/25-test_verify.t index 444f69b694..c1d222bb80 100644 --- a/test/recipes/25-test_verify.t +++ b/test/recipes/25-test_verify.t @@ -4,7 +4,7 @@ use strict; use warnings; use File::Spec::Functions qw/canonpath/; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_verify"); @@ -13,9 +13,9 @@ sub verify { my @args = qw(openssl verify -purpose); my @path = qw(test certs); push(@args, "$purpose", @opts); - for (@$trusted) { push(@args, "-trusted", top_file(@path, "$_.pem")) } - for (@$untrusted) { push(@args, "-untrusted", top_file(@path, "$_.pem")) } - push(@args, top_file(@path, "$cert.pem")); + for (@$trusted) { push(@args, "-trusted", srctop_file(@path, "$_.pem")) } + for (@$untrusted) { push(@args, "-untrusted", srctop_file(@path, "$_.pem")) } + push(@args, srctop_file(@path, "$cert.pem")); run(app([@args])); } diff --git a/test/recipes/25-test_x509.t b/test/recipes/25-test_x509.t index e2d795a6c4..1572a06d71 100644 --- a/test/recipes/25-test_x509.t +++ b/test/recipes/25-test_x509.t @@ -4,20 +4,20 @@ use strict; use warnings; use File::Spec; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_x509"); plan tests => 4; -require_ok(top_file('test','recipes','tconversion.pl')); +require_ok(srctop_file('test','recipes','tconversion.pl')); subtest 'x509 -- x.509 v1 certificate' => sub { - tconversion("x509", top_file("test","testx509.pem")); + tconversion("x509", srctop_file("test","testx509.pem")); }; subtest 'x509 -- first x.509 v3 certificate' => sub { - tconversion("x509", top_file("test","v3-cert1.pem")); + tconversion("x509", srctop_file("test","v3-cert1.pem")); }; subtest 'x509 -- second x.509 v3 certificate' => sub { - tconversion("x509", top_file("test","v3-cert2.pem")); + tconversion("x509", srctop_file("test","v3-cert2.pem")); }; diff --git a/test/recipes/30-test_evp.t b/test/recipes/30-test_evp.t index 9d5ce6f187..9ee24f46b4 100644 --- a/test/recipes/30-test_evp.t +++ b/test/recipes/30-test_evp.t @@ -3,10 +3,10 @@ use strict; use warnings; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_evp"); plan tests => 1; -ok(run(test(["evp_test", top_file("test", "evptests.txt")])), +ok(run(test(["evp_test", srctop_file("test", "evptests.txt")])), "running evp_test evptests.txt"); diff --git a/test/recipes/40-test_rehash.t b/test/recipes/40-test_rehash.t index c4c6abcd93..f0a8faecd6 100644 --- a/test/recipes/40-test_rehash.t +++ b/test/recipes/40-test_rehash.t @@ -6,7 +6,7 @@ use warnings; use File::Spec::Functions; use File::Copy; use File::Basename; -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT bldtop_file/; setup("test_rehash"); @@ -51,7 +51,7 @@ indir "rehash.$$" => sub { sub prepare { my @sourcefiles = - sort map { glob(top_file('certs', 'demo', "*.$_")) } ('pem', + sort map { glob(bldtop_file('certs', 'demo', "*.$_")) } ('pem', 'crt', 'cer', 'crl'); diff --git a/test/recipes/70-test_sslcertstatus.t b/test/recipes/70-test_sslcertstatus.t index 814ca0abf1..a7f2d8a2b1 100755 --- a/test/recipes/70-test_sslcertstatus.t +++ b/test/recipes/70-test_sslcertstatus.t @@ -53,7 +53,7 @@ # Hudson (tjh@cryptsoft.com). use strict; -use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/; +use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; @@ -69,12 +69,12 @@ plan skip_all => "$test_name needs the engine feature enabled" plan skip_all => "$test_name can only be performed with OpenSSL configured shared" if disabled("shared"); -$ENV{OPENSSL_ENGINES} = top_dir("engines"); +$ENV{OPENSSL_ENGINES} = bldtop_dir("engines"); $ENV{OPENSSL_ia32cap} = '~0x200000200000000'; my $proxy = TLSProxy::Proxy->new( \&certstatus_filter, cmdstr(app(["openssl"])), - top_file("apps", "server.pem") + srctop_file("apps", "server.pem") ); plan tests => 1; diff --git a/test/recipes/70-test_sslextension.t b/test/recipes/70-test_sslextension.t index 3c9caadb97..f7ac9f4d58 100755 --- a/test/recipes/70-test_sslextension.t +++ b/test/recipes/70-test_sslextension.t @@ -53,7 +53,7 @@ # Hudson (tjh@cryptsoft.com). use strict; -use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/; +use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; @@ -69,12 +69,12 @@ plan skip_all => "$test_name needs the engine feature enabled" plan skip_all => "$test_name can only be performed with OpenSSL configured shared" if disabled("shared"); -$ENV{OPENSSL_ENGINES} = top_dir("engines"); +$ENV{OPENSSL_ENGINES} = bldtop_dir("engines"); $ENV{OPENSSL_ia32cap} = '~0x200000200000000'; my $proxy = TLSProxy::Proxy->new( \&extension_filter, cmdstr(app(["openssl"])), - top_file("apps", "server.pem") + srctop_file("apps", "server.pem") ); plan tests => 1; diff --git a/test/recipes/70-test_sslsessiontick.t b/test/recipes/70-test_sslsessiontick.t index 7e5ccad5aa..f2c00daece 100755 --- a/test/recipes/70-test_sslsessiontick.t +++ b/test/recipes/70-test_sslsessiontick.t @@ -53,7 +53,7 @@ # Hudson (tjh@cryptsoft.com). use strict; -use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/; +use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; use File::Temp qw(tempfile); @@ -70,7 +70,7 @@ plan skip_all => "$test_name needs the engine feature enabled" plan skip_all => "$test_name can only be performed with OpenSSL configured shared" if disabled("shared"); -$ENV{OPENSSL_ENGINES} = top_dir("engines"); +$ENV{OPENSSL_ENGINES} = bldtop_dir("engines"); $ENV{OPENSSL_ia32cap} = '~0x200000200000000'; sub checkmessages($$$$$$); @@ -84,7 +84,7 @@ my $ticketseen = 0; my $proxy = TLSProxy::Proxy->new( undef, cmdstr(app(["openssl"])), - top_file("apps", "server.pem") + srctop_file("apps", "server.pem") ); plan tests => 8; diff --git a/test/recipes/70-test_sslskewith0p.t b/test/recipes/70-test_sslskewith0p.t index 8261238f00..0e6a780404 100755 --- a/test/recipes/70-test_sslskewith0p.t +++ b/test/recipes/70-test_sslskewith0p.t @@ -53,7 +53,7 @@ # Hudson (tjh@cryptsoft.com). use strict; -use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/; +use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; @@ -72,12 +72,12 @@ plan skip_all => "$test_name can only be performed with OpenSSL configured share plan skip_all => "dh is not supported by this OpenSSL build" if disabled("dh"); -$ENV{OPENSSL_ENGINES} = top_dir("engines"); +$ENV{OPENSSL_ENGINES} = bldtop_dir("engines"); $ENV{OPENSSL_ia32cap} = '~0x200000200000000'; my $proxy = TLSProxy::Proxy->new( \&ske_0_p_filter, cmdstr(app(["openssl"])), - top_file("apps", "server.pem") + srctop_file("apps", "server.pem") ); plan tests => 1; diff --git a/test/recipes/70-test_sslvertol.t b/test/recipes/70-test_sslvertol.t index e5eef31bc4..b12abee876 100755 --- a/test/recipes/70-test_sslvertol.t +++ b/test/recipes/70-test_sslvertol.t @@ -53,7 +53,7 @@ # Hudson (tjh@cryptsoft.com). use strict; -use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/; +use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; @@ -69,12 +69,12 @@ plan skip_all => "$test_name needs the engine feature enabled" plan skip_all => "$test_name can only be performed with OpenSSL configured shared" if disabled("shared"); -$ENV{OPENSSL_ENGINES} = top_dir("engines"); +$ENV{OPENSSL_ENGINES} = bldtop_dir("engines"); $ENV{OPENSSL_ia32cap} = '~0x200000200000000'; my $proxy = TLSProxy::Proxy->new( \&vers_tolerance_filter, cmdstr(app(["openssl"])), - top_file("apps", "server.pem") + srctop_file("apps", "server.pem") ); plan tests => 2; diff --git a/test/recipes/70-test_tlsextms.t b/test/recipes/70-test_tlsextms.t index 8e3b41434e..a4419f5d24 100644 --- a/test/recipes/70-test_tlsextms.t +++ b/test/recipes/70-test_tlsextms.t @@ -53,7 +53,7 @@ # Hudson (tjh@cryptsoft.com). use strict; -use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/; +use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/; use OpenSSL::Test::Utils; use TLSProxy::Proxy; use File::Temp qw(tempfile); @@ -70,7 +70,7 @@ plan skip_all => "$test_name needs the engine feature enabled" plan skip_all => "$test_name can only be performed with OpenSSL configured shared" if disabled("shared"); -$ENV{OPENSSL_ENGINES} = top_dir("engines"); +$ENV{OPENSSL_ENGINES} = bldtop_dir("engines"); $ENV{OPENSSL_ia32cap} = '~0x200000200000000'; sub checkmessages($$$$$); @@ -86,7 +86,7 @@ my $fullhand = 0; my $proxy = TLSProxy::Proxy->new( \&extms_filter, cmdstr(app(["openssl"])), - top_file("apps", "server.pem"), + srctop_file("apps", "server.pem"), 1 ); diff --git a/test/recipes/70-test_verify_extra.t b/test/recipes/70-test_verify_extra.t index eec8904ca9..8c213e8a2f 100644 --- a/test/recipes/70-test_verify_extra.t +++ b/test/recipes/70-test_verify_extra.t @@ -1,12 +1,12 @@ #! /usr/bin/perl -use OpenSSL::Test qw/:DEFAULT top_file/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_verify_extra"); plan tests => 1; ok(run(test(["verify_extra_test", - top_file("test", "certs", "roots.pem"), - top_file("test", "certs", "untrusted.pem"), - top_file("test", "certs", "bad.pem")]))); + srctop_file("test", "certs", "roots.pem"), + srctop_file("test", "certs", "untrusted.pem"), + srctop_file("test", "certs", "bad.pem")]))); diff --git a/test/recipes/80-test_ca.t b/test/recipes/80-test_ca.t index e97a83fbc4..97e44c8d99 100644 --- a/test/recipes/80-test_ca.t +++ b/test/recipes/80-test_ca.t @@ -5,24 +5,24 @@ use warnings; use POSIX; use File::Path 2.00 qw/remove_tree/; -use OpenSSL::Test qw/:DEFAULT cmdstr top_file/; +use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file/; setup("test_ca"); $ENV{OPENSSL} = cmdstr(app(["openssl"])); -my $std_openssl_cnf = $^O eq "VMS" - ? top_file("apps", "openssl-vms.cnf") : top_file("apps", "openssl.cnf"); +my $std_openssl_cnf = + srctop_file("apps", $^O eq "VMS" ? "openssl-vms.cnf" : "openssl.cnf"); remove_tree("demoCA", { safe => 0 }); plan tests => 4; SKIP: { - $ENV{OPENSSL_CONFIG} = "-con |