Skip to content

Commit

Permalink
only enable rng depletition tests when AUTOBAHN_CI_ENABLE_RNG_DEPLETI… (
Browse files Browse the repository at this point in the history
#1292)

* only enable rng depletition tests when AUTOBAHN_CI_ENABLE_RNG_DEPLETION_TESTS is set

* fix flake
  • Loading branch information
oberstet committed Jan 14, 2020
1 parent 2f70d65 commit 1a2d833
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autobahn/test/test_rng.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#
###############################################################################

import os
import sys
import unittest

Expand All @@ -34,6 +35,7 @@
from autobahn import util


@unittest.skipIf('AUTOBAHN_CI_ENABLE_RNG_DEPLETION_TESTS' not in os.environ, 'entropy depletion tests not enabled (env var AUTOBAHN_CI_ENABLE_RNG_DEPLETION_TESTS not set)')
@unittest.skipIf(not sys.platform.startswith('linux'), 'entropy depletion tests only available on Linux')
class TestEntropy(unittest.TestCase):

Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ setenv =
asyncio: USE_ASYNCIO = 1
tw189,tw1910,twtrunk: USE_TWISTED = 1

# this enables "autobahn/test/test_rng.py" (on Linux),
# which tests entropy depletion, and tests how to correctly
# read _real_ entropy and block if not enough _real_ entropy is currently avail
# also: https://github.com/crossbario/autobahn-python/issues/1275
AUTOBAHN_CI_ENABLE_RNG_DEPLETION_TESTS = 1


[testenv:flake8]
skip_install = True
Expand Down

0 comments on commit 1a2d833

Please sign in to comment.