mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-26 09:21:28 +00:00
1399c7fd1f
use randombytes in functest Got dropped by the rebase Work around missing clang-tidy on Travis Also check if valgrind is available
29 lines
724 B
Python
29 lines
724 B
Python
import pqclean
|
|
from helpers import run_subprocess, ensure_available
|
|
|
|
|
|
def test_formatting():
|
|
for scheme in pqclean.Scheme.all_schemes():
|
|
for implementation in scheme.implementations:
|
|
yield check_format, implementation
|
|
|
|
|
|
def check_format(implementation: pqclean.Implementation):
|
|
ensure_available('astyle')
|
|
cfiles = implementation.cfiles()
|
|
hfiles = implementation.hfiles()
|
|
run_subprocess(['astyle',
|
|
'--dry-run',
|
|
'--options=../.astylerc',
|
|
*cfiles,
|
|
*hfiles])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
try:
|
|
import nose2
|
|
nose2.main()
|
|
except ImportError:
|
|
import nose
|
|
nose.runmodule()
|