From 9da91cb8d33520a678c620009016b8ab321b2e6d Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 14 Nov 2020 11:28:50 -0600 Subject: [PATCH] wvtest.py: respect BUP_TEST_SEED Without this, the test counts can vary given (for example) the tests in validate_vfs_{streaming,seeking}* in tvfs.py. Signed-off-by: Rob Browning Tested-by: Rob Browning --- wvtest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wvtest.py b/wvtest.py index 8451b3e..0f284bf 100755 --- a/wvtest.py +++ b/wvtest.py @@ -14,10 +14,17 @@ exec "$bup_python" "$0" ${1+"$@"} # from __future__ import absolute_import, print_function + +import os +import random + +_wvtest_random_seed = os.environ.get('BUP_TEST_SEED') +if _wvtest_random_seed: + random.seed(int(_wvtest_random_seed)) + from os.path import relpath import atexit import inspect -import os import re import sys import traceback -- 2.39.2