Reference implementations of PQC
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
698 B

  1. """
  2. Runs functional tests for common crypto functions (e.g., fips202, sha2, aes).
  3. Doesn't currently need isolation for parallelisation
  4. """
  5. import os
  6. import re
  7. import helpers
  8. def pytest_generate_tests(metafunc):
  9. argvalues = []
  10. for d in os.listdir('test_common'):
  11. primitive = re.sub(r"\.c$", "", d)
  12. argvalues.append(primitive)
  13. metafunc.parametrize('primitive', argvalues)
  14. @helpers.skip_windows()
  15. @helpers.filtered_test
  16. def test_common(primitive):
  17. binname = os.path.join('..', 'bin', 'test_common_'+primitive)
  18. helpers.make(binname)
  19. helpers.run_subprocess([binname])
  20. if __name__ == '__main__':
  21. import pytest
  22. import sys
  23. pytest.main(sys.argv)