mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-06 00:03:35 -04:00
Filter some tests
This commit is contained in:
parent
52ccd7729a
commit
e3a949a31a
@ -4,12 +4,14 @@ import os
|
||||
import os.path
|
||||
import pytest
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.parametrize('program', ['example_kem', 'example_sig', 'test_aes', 'test_sha3'])
|
||||
def test_program(program):
|
||||
helpers.run_subprocess(
|
||||
[os.path.join('tests', program)],
|
||||
)
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.parametrize('kem_name', helpers.available_kems_by_name())
|
||||
def test_kem(kem_name):
|
||||
if not(helpers.is_kem_enabled_by_name(kem_name)): pytest.skip('Not enabled')
|
||||
@ -17,6 +19,7 @@ def test_kem(kem_name):
|
||||
[os.path.join('tests', 'test_kem'), kem_name],
|
||||
)
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.parametrize('sig_name', helpers.available_sigs_by_name())
|
||||
def test_sig(sig_name):
|
||||
if not(helpers.is_sig_enabled_by_name(sig_name)): pytest.skip('Not enabled')
|
||||
|
@ -3,6 +3,7 @@ import helpers
|
||||
import os.path
|
||||
import pytest
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.parametrize('msg', ['', 'a', 'abc', '1234567890123456789012345678901678901567890'])
|
||||
def test_sha256(msg):
|
||||
output = helpers.run_subprocess(
|
||||
@ -12,6 +13,7 @@ def test_sha256(msg):
|
||||
)
|
||||
assert(output.rstrip() == hashlib.sha256(msg.encode()).hexdigest())
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.parametrize('msg', ['', 'a', 'abc', '1234567890123456789012345678901678901567890'])
|
||||
def test_sha384(msg):
|
||||
output = helpers.run_subprocess(
|
||||
@ -21,6 +23,7 @@ def test_sha384(msg):
|
||||
)
|
||||
assert(output.rstrip() == hashlib.sha384(msg.encode()).hexdigest())
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.parametrize('msg', ['', 'a', 'abc', '1234567890123456789012345678901678901567890'])
|
||||
def test_sha512(msg):
|
||||
output = helpers.run_subprocess(
|
||||
|
@ -4,6 +4,7 @@ import os
|
||||
import os.path
|
||||
import pytest
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.parametrize('kem_name', helpers.available_kems_by_name())
|
||||
def test_kem(kem_name):
|
||||
if kem_name.startswith('Sidh'): pytest.skip('KATs not available for SIDH')
|
||||
|
@ -1,9 +1,12 @@
|
||||
import helpers
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
# Check if liboqs contains any non-namespaced global symbols
|
||||
# See https://github.com/open-quantum-safe/liboqs/wiki/Coding-conventions for function naming conventions
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not needed on Windows")
|
||||
def test_namespace():
|
||||
out = helpers.run_subprocess(
|
||||
['nm', '-g', '.libs/liboqs.a']
|
||||
|
@ -5,6 +5,7 @@ import os.path
|
||||
import pytest
|
||||
|
||||
@helpers.filtered_test
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not needed on Windows")
|
||||
def test_style():
|
||||
|
||||
modified_files = helpers.run_subprocess(
|
||||
|
Loading…
x
Reference in New Issue
Block a user