]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test: document the random test ordering env variable
authorPauli <paul.dale@oracle.com>
Sat, 12 Dec 2020 11:38:17 +0000 (21:38 +1000)
committerPauli <paul.dale@oracle.com>
Tue, 15 Dec 2020 10:03:07 +0000 (20:03 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13672)

test/README.md

index 43f8471120edc66c5d70de034802194ac2dcdaee..9a5c91953ddb78e78648749fde98e52daf45a2c9 100644 (file)
@@ -148,3 +148,23 @@ for `TAP::Harness` to know more.
 To run up to four tests in parallel at any given time:
 
     $ make HARNESS_JOBS=4 test
+
+Randomisation of Test Ordering
+------------------------------
+
+By default, the test harness will execute tests in the order they were added.
+By setting the `OPENSSL_TEST_RAND_ORDER` environment variable to zero, the
+test ordering will be randomised.  If a randomly ordered test fails, the
+seed value used will be reported.  Setting the `OPENSSL_TEST_RAND_ORDER`
+environment variable to this value will rerun the tests in the same
+order.  This assures repeatability of randomly ordered test runs.
+This repeatability is independent of the operating system, processor or
+platform used.
+
+To randomise the test ordering:
+
+    $ make OPENSSL_TEST_RAND_ORDER=0 test
+
+To run the tests using the order defined by the random seed `42`:
+
+    $ make OPENSSL_TEST_RAND_ORDER=42 test