diff options
Diffstat (limited to 'debug/gdbserver.py')
-rwxr-xr-x | debug/gdbserver.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 5450adb..f457b86 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -11,6 +11,7 @@ import os import re import itertools +from datetime import datetime import targets import testlib from testlib import assertEqual, assertNotEqual @@ -2194,6 +2195,14 @@ def main(): module = sys.modules[__name__] + # initialize PRNG + selected_seed = parsed.seed + if parsed.seed is None: + selected_seed = int(datetime.now().timestamp()) + print(f"PRNG seed for {target.name} is generated automatically") + print(f"PRNG seed for {target.name} is {selected_seed}") + random.seed(selected_seed) + return testlib.run_all_tests(module, target, parsed) # TROUBLESHOOTING TIPS |