aboutsummaryrefslogtreecommitdiffstats
path: root/test/testlib
Commit message (Collapse)AuthorAgeFilesLines
* testlib/OpenSSL/Test.pm: remove redundant 'cmd /c', MSWin32 Perl can take ↵Andy Polyakov2015-10-131-2/+0
| | | | | | care of itself. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Test suite: minimal required to get mingw 'make test' work under Linux.Andy Polyakov2015-10-132-3/+11
| | | | | | (part by Alessandro Ghedini) Reviewed-by: Richard Levitte <levitte@openssl.org>
* Simplify Simple.pm further, and make it more verboseRichard Levitte2015-09-201-5/+4
| | | | Reviewed-by: Stephen Henson <steve@openssl.org>
* typoDr. Stephen Henson2015-09-201-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update Simple.pm to use disabled()Dr. Stephen Henson2015-09-201-1/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add Utils.pmDr. Stephen Henson2015-09-201-0/+84
| | | | | | | | Add Utils.pm for test utilities. This currently just contains one function: disabled which checks if a feature is disabled based on the output of openssl list -disabled Reviewed-by: Richard Levitte <levitte@openssl.org>
* Make sure the temporary error log resides in a well defined locationRichard Levitte2015-09-091-1/+2
| | | | | | | | | | | | | | | | | | | If a test recipe does something like this: indir "foo.$$" => sub { chmod 0500, File::Spec->curdir(); ok(run(app(["something"]))); } we get a problem, because we were storing the temporary stderr file in the current directory at all times (so while inside the 'indir', we would attemp to store it in "foo.$$"). So, change our ways to always store that temporary file in the exact same location, defined by the environment variable RESULT_D, or failing that TEST_D, or failing that $TOP/test. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Small fix in OpenSSL::TestRichard Levitte2015-09-071-2/+4
| | | | | | | | Be careful when shifting in a function argument, you end up changing the caller's value. Instead, when it is an array, make a shallow copy and shift in that instead. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Document OpenSSL::Test and OpenSSL::Test::SimpleRichard Levitte2015-09-072-183/+577
| | | | | | | For OpenSSL::Test, it meant rearranging the code to better suite the structure of the documentation. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Change OpenSSL::Test to be an extension of Test::MoreRichard Levitte2015-09-072-4/+5
| | | | | | | | | | | It became tedious as well as error prone to have all recipes use Test::More as well as OpenSSL::Test. The easier way is to make OpenSSL::Test an extension of Test::More, thereby having all version checks as well as future checks firmly there. Additionally, that allows us to extend existing Test::More functions if the need would arise. Reviewed-by: Rich Salz <rsalz@openssl.org>
* New feature: STOPTESTRichard Levitte2015-09-071-0/+11
| | | | | | | | When the environment variable STOPTEST is defined (with any value other than the empty string), the test machinery in OpenSSL::Test goes into a different mode that will stop all testing at the end of a failing recipe. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add version numbers on some modules we use.Richard Levitte2015-09-072-3/+3
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Simplify very simple test recipes further.Richard Levitte2015-09-071-0/+32
| | | | | | | | | | | | | | Very simple test recipes easily become tedious, so they might benefit from being made as simple as possible. Therefore, OpenSSL::Test::Simple is born. It currently provides but one function, simple_test(), which takes a minimum of two parameters (test name and program to run), with the optional third, being the algorithm to be checked for before running the test itself. All recipes with that simple thing to do have been rewritten to be as minimal as possible. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Groundwork for a perl based testing frameworkRichard Levitte2015-09-071-0/+379
The idea with this perl based testing framework is to make use of what's delivered with perl and exists on all sorts of platforms. The choice came to using Test::More and Test::Harness, as that seems to be the most widely spread foundation, even if perl is aged. The main runner of the show is run_tests.pl. As it currently stands, it's designed to run from inside Makefile, but it's absolutely possible to run it from the command line as well, like so: cd test OPENSSL_SRCDIR=.. perl run_tests.pl The tester scripts themselves are stored in the subdirectory recipes/, and initially, we have two such scripts, recipes/00-check_testalltests.t and recipes/00-check_testexes.t. recipes/00-check_testalltests.t will pick out the dependencies of "alltests" in test/Makefile, and check if it can find recipes with corresponding names. recipes/00-check_testexes.t does something similar, but bases it on existing compiled test binaries. They make it easy to figure out what's to be added, and will be removed when this effort is finished. Individual recipes can be run as well, of course, as they are perl scripts in themselves. For example, you can run only recipes/00-check_testexes.t like so: cd test OPENSSL_SRCDIR=.. perl recipes/00-check_testexes.t To make coding easier, there's a routine library OpenSSL::Test, which is reachable in a perl script like so: use lib 'testlib'; use OpenSSL::Test; Reviewed-by: Rich Salz <rsalz@openssl.org>