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>
This commit is contained in:
Robert Baldyga
2019-10-03 14:43:21 +02:00
parent b9b39fdb46
commit 1525e85805
4 changed files with 26 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
#!/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)))