commit
323b49ca6b
@ -80,6 +80,15 @@ def skip_windows(message="This test is not supported on Windows"):
|
|||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
|
def slow_test(f):
|
||||||
|
@functools.wraps(f)
|
||||||
|
def wrapper(*args, **kwargs):
|
||||||
|
if 'CI' in os.environ and 'RUN_SLOW' not in os.environ:
|
||||||
|
raise unittest.SkipTest("Slow test skipped on CI run")
|
||||||
|
return f(*args, **kwargs)
|
||||||
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
def ensure_available(executable):
|
def ensure_available(executable):
|
||||||
"""
|
"""
|
||||||
Checks if a command is available.
|
Checks if a command is available.
|
||||||
|
@ -42,6 +42,7 @@ def check_functest(implementation):
|
|||||||
|
|
||||||
|
|
||||||
@helpers.skip_windows()
|
@helpers.skip_windows()
|
||||||
|
@helpers.slow_test
|
||||||
def check_functest_sanitizers(implementation):
|
def check_functest_sanitizers(implementation):
|
||||||
env = None
|
env = None
|
||||||
if platform.machine() == 'ppc' and os.environ.get('CC', 'gcc') == 'clang':
|
if platform.machine() == 'ppc' and os.environ.get('CC', 'gcc') == 'clang':
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
import os
|
|
||||||
from glob import glob
|
|
||||||
|
|
||||||
import pqclean
|
import pqclean
|
||||||
import helpers
|
import helpers
|
||||||
|
|
||||||
@ -29,6 +26,7 @@ def check_preprocessor(implementation: pqclean.Implementation):
|
|||||||
"Prohibited use of preprocessor conditional" + "".join(errors)
|
"Prohibited use of preprocessor conditional" + "".join(errors)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
import nose2
|
import nose2
|
||||||
|
@ -17,12 +17,11 @@ def test_functest():
|
|||||||
yield check_valgrind, implementation
|
yield check_valgrind, implementation
|
||||||
|
|
||||||
|
|
||||||
|
@helpers.slow_test
|
||||||
def check_valgrind(implementation: pqclean.Implementation):
|
def check_valgrind(implementation: pqclean.Implementation):
|
||||||
if (platform.machine() not in ('i386', 'x86_64') or
|
if (platform.machine() not in ('i386', 'x86_64') or
|
||||||
platform.system() != 'Linux'):
|
platform.system() != 'Linux'):
|
||||||
raise unittest.SkipTest()
|
raise unittest.SkipTest()
|
||||||
if os.environ.get('CIRCLECI') == 'true' and os.environ.get('ARCH') == 'i386' and (implementation.scheme.name == 'frodokem1344aes' or implementation.scheme.name == 'frodokem1344shake'):
|
|
||||||
raise unittest.SkipTest('Skipping too-slow valgrind test')
|
|
||||||
|
|
||||||
helpers.make(TYPE=implementation.scheme.type,
|
helpers.make(TYPE=implementation.scheme.type,
|
||||||
SCHEME=implementation.scheme.name,
|
SCHEME=implementation.scheme.name,
|
||||||
|
Loading…
Reference in New Issue
Block a user