summaryrefslogtreecommitdiffstats
path: root/test/run_tests.pl
diff options
context:
space:
mode:
authorNicola Tuveri <nic.tuv@gmail.com>2020-06-30 09:23:56 +0200
committerNicola Tuveri <nic.tuv@gmail.com>2020-07-02 15:47:17 +0200
commita20c9075d6a72f484d1f27d99a54483a7e96fc51 (patch)
treed7723493bd65a0276cd0c6711ec25b3c56e17f06 /test/run_tests.pl
parentFix memory leaks on OSSL_SERIALIZER_CTX_new_by_EVP_PKEY (diff)
downloadopenssl-a20c9075d6a72f484d1f27d99a54483a7e96fc51.tar.xz
openssl-a20c9075d6a72f484d1f27d99a54483a7e96fc51.zip
Run tests in parallel
The environment variable `HARNESS_JOBS` can be used to control how many jobs to run in parallel. The default is still to run jobs sequentially. This commit does not define custom `rules`, and different versions of `TAP::Harness` come with different strategies regarding the default `rules` that define which test recipes can be run in parallel. In recent versions of Perl, unless specified otherwise any task can be run in parallel. Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/12326)
Diffstat (limited to '')
-rw-r--r--test/run_tests.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/run_tests.pl b/test/run_tests.pl
index 8306c6018a..5eddaf8468 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -30,6 +30,7 @@ my $srctop = $ENV{SRCTOP} || $ENV{TOP};
my $bldtop = $ENV{BLDTOP} || $ENV{TOP};
my $recipesdir = catdir($srctop, "test", "recipes");
my $libdir = rel2abs(catdir($srctop, "util", "perl"));
+my $jobs = $ENV{HARNESS_JOBS};
$ENV{OPENSSL_CONF} = rel2abs(catdir($srctop, "apps", "openssl.cnf"));
$ENV{OPENSSL_CONF_INCLUDE} = rel2abs(catdir($bldtop, "providers"));
@@ -44,6 +45,8 @@ my %tapargs =
merge => 1,
);
+$tapargs{jobs} = $jobs if defined $jobs;
+
# Additional OpenSSL special TAP arguments. Because we can't pass them via
# TAP::Harness->new(), they will be accessed directly, see the
# TAP::Parser::OpenSSL implementation further down