1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00

Add test to check for existence of both makefiles

This commit is contained in:
Joost Rijneveld 2019-04-30 11:35:29 +02:00
parent d219bd7a16
commit cec568d235
No known key found for this signature in database
GPG Key ID: A4FE39CF49CBC553

30
test/test_makefiles.py Normal file
View File

@ -0,0 +1,30 @@
"""
Checks that a Makefile and a Makefile.Microsoft_nmake file is present for every
implementation of the specified scheme.
"""
import os
import pqclean
import helpers
def test_makefiles():
for scheme in pqclean.Scheme.all_schemes():
for implementation in scheme.implementations:
yield check_makefiles, implementation
@helpers.filtered_test
def check_makefiles(implementation):
p1 = os.path.join(implementation.path(), 'Makefile')
p2 = os.path.join(implementation.path(), 'Makefile.Microsoft_nmake')
assert(os.path.isfile(p1) and os.path.isfile(p2))
if __name__ == '__main__':
try:
import nose2
nose2.main()
except ImportError:
import nose
nose.runmodule()