Files
infix/test/case/meta/reproducible.py
T
Mattias Walström dce9a9c53d test: Add new sanity check tests
One to verify it is the correct version on the duts and one
that check that it is the correct bootorder.
2025-09-05 16:34:11 +02:00

17 lines
442 B
Python
Executable File

#!/usr/bin/env python3
import os
import infamy
with infamy.Test() as test:
with test.step("$PYTHONHASHSEED is set"):
seed = os.environ.get("PYTHONHASHSEED")
if seed == None:
print("$PYTHONHASHSEED must be set in order to create a reproducible test environment")
test.fail()
else:
print(f"Specify PYTHONHASHSEED={seed} to reproduce this test environment")
test.succeed()