Skip to content

Commit

Permalink
Modify test_speed.py to hit corner cases [full tests]
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Wilson <[email protected]>
  • Loading branch information
SWilson4 committed Nov 19, 2024
1 parent 507d030 commit 458f042
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,25 @@
@helpers.filtered_test
@pytest.mark.parametrize('kem_name', helpers.available_kems_by_name())
def test_kem(kem_name):
kats = helpers.get_kats("kem")
if not(helpers.is_kem_enabled_by_name(kem_name)): pytest.skip('Not enabled')
helpers.run_subprocess( [helpers.path_to_executable('speed_kem'), kem_name, "-f"] )

@helpers.filtered_test
@pytest.mark.parametrize('sig_name', helpers.available_sigs_by_name())
def test_sig(sig_name):
kats = helpers.get_kats("sig")
if not(helpers.is_sig_enabled_by_name(sig_name)): pytest.skip('Not enabled')
helpers.run_subprocess( [helpers.path_to_executable('speed_sig'), sig_name, "-f"])

@helpers.filtered_test
@pytest.mark.parametrize('sig_stfl_name', helpers.available_sig_stfls_by_name())
def test_sig(sig_stfl_name):
kats = helpers.get_kats("sig_stfl")
if not(helpers.is_sig_stfl_enabled_by_name(sig_stfl_name)):
pytest.skip('Not enabled')
elif sig_stfl_name.find("_10")==-1 and sig_stfl_name.find("H10")==-1:
pytest.skip('Test skipped')
#elif sig_stfl_name.find("_10")==-1 and sig_stfl_name.find("H10")==-1:
#pytest.skip('Test skipped')
else:
helpers.run_subprocess( [helpers.path_to_executable('speed_sig_stfl'), sig_stfl_name, "-f"])
# run speed_sig_stfl with different flags to force corner cases
helpers.run_subprocess( [helpers.path_to_executable('speed_sig_stfl'), sig_stfl_name, "-d", "10"])

if __name__ == "__main__":
import sys
Expand Down

0 comments on commit 458f042

Please sign in to comment.