Skip to content

Commit

Permalink
test ESDM only on Linux
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Theil <theil.markus@gmail.com>
  • Loading branch information
thillux committed Aug 16, 2024
1 parent 7939181 commit 7b8ad64
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/scripts/test_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,23 @@ def test_rng(self):

user_rng.add_entropy('seed material...')

user_rng = botan.RandomNumberGenerator("esdm-full")
# execute ESDM tests only on Linux
if platform.system() != "Linux":
return

output1 = user_rng.get(32)
output2 = user_rng.get(32)
esdm_rng = botan.RandomNumberGenerator("esdm-full")

output1 = esdm_rng.get(32)
output2 = esdm_rng.get(32)

self.assertEqual(len(output1), 32)
self.assertEqual(len(output2), 32)
self.assertNotEqual(output1, output2)

user_rng = botan.RandomNumberGenerator("esdm-pr")
esdm_rng = botan.RandomNumberGenerator("esdm-pr")

output1 = user_rng.get(32)
output2 = user_rng.get(32)
output1 = esdm_rng.get(32)
output2 = esdm_rng.get(32)

self.assertEqual(len(output1), 32)
self.assertEqual(len(output2), 32)
Expand Down

0 comments on commit 7b8ad64

Please sign in to comment.