Reference implementations of PQC
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

33 行
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)