You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
587 B

  1. """
  2. Runs functional tests for common crypto functions (e.g., fips202, sha2, aes).
  3. """
  4. import os
  5. import re
  6. import helpers
  7. @helpers.skip_windows()
  8. def test_common():
  9. for d in os.listdir('common'):
  10. primitive = re.sub(r"\.c$", "", d)
  11. yield check_common, primitive
  12. def check_common(primitive):
  13. binname = os.path.join('..', 'bin', 'test_'+primitive)
  14. helpers.make(binname)
  15. helpers.run_subprocess([binname])
  16. if __name__ == '__main__':
  17. try:
  18. import nose2
  19. nose2.main()
  20. except ImportError:
  21. import nose
  22. nose.runmodule()