From cec568d2359af61a04df0a6076a8d2864bbe53e3 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Tue, 30 Apr 2019 11:35:29 +0200 Subject: [PATCH] Add test to check for existence of both makefiles --- test/test_makefiles.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/test_makefiles.py diff --git a/test/test_makefiles.py b/test/test_makefiles.py new file mode 100644 index 00000000..fc101ac3 --- /dev/null +++ b/test/test_makefiles.py @@ -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()