2019-04-10 15:02:45 +01:00
|
|
|
"""
|
|
|
|
Runs functional tests for common crypto functions (e.g., fips202, sha2, aes).
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
|
|
|
|
import helpers
|
|
|
|
|
|
|
|
|
2019-04-10 15:34:44 +01:00
|
|
|
@helpers.skip_windows()
|
2019-04-10 15:02:45 +01:00
|
|
|
def test_common():
|
2019-07-26 09:26:14 +01:00
|
|
|
for d in os.listdir('test_common'):
|
2019-04-10 15:34:44 +01:00
|
|
|
primitive = re.sub(r"\.c$", "", d)
|
2019-04-18 09:00:08 +01:00
|
|
|
if helpers.permit_test('common', None):
|
|
|
|
yield check_common, primitive
|
2019-04-10 15:42:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
def check_common(primitive):
|
2019-04-11 08:54:52 +01:00
|
|
|
binname = os.path.join('..', 'bin', 'test_common_'+primitive)
|
2019-04-10 15:42:28 +01:00
|
|
|
helpers.make(binname)
|
|
|
|
helpers.run_subprocess([binname])
|
2019-04-10 15:02:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
try:
|
|
|
|
import nose2
|
|
|
|
nose2.main()
|
|
|
|
except ImportError:
|
|
|
|
import nose
|
|
|
|
nose.runmodule()
|