ocf/tests/functional/utils/configure_random.py
Robert Baldyga 1525e85805 Add global random seed config
This is needed to make fuzzy tests work with xdist as each
xdist gateway expects to receive the same set of parameter
values, which for random generators may be achieved only by
providing globally shared seed.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-10-03 16:31:05 +02:00

14 lines
236 B
Python
Executable File

#!/usr/bin/env python3
#
# Copyright(c) 2012-2018 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
import sys
import random
with open("config/random.cfg", "w") as f:
f.write(str(random.randint(0, sys.maxsize)))