Skip clang-tidy if not available
This commit is contained in:
parent
e8c4cf949b
commit
4178768599
@ -1,5 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
import shutil
|
||||||
|
import unittest
|
||||||
|
|
||||||
import pqclean
|
import pqclean
|
||||||
from helpers import run_subprocess
|
from helpers import run_subprocess
|
||||||
@ -12,6 +14,8 @@ def test_clang_tidy():
|
|||||||
|
|
||||||
|
|
||||||
def check_tidy(implementation: pqclean.Implementation):
|
def check_tidy(implementation: pqclean.Implementation):
|
||||||
|
if shutil.which('clang-tidy') is None:
|
||||||
|
raise unittest.SkipTest("clang-tidy unavailable in PATH")
|
||||||
cfiles = glob(os.path.join(implementation.path(), '*.c'))
|
cfiles = glob(os.path.join(implementation.path(), '*.c'))
|
||||||
common_files = glob(os.path.join('..', 'common', '*.c'))
|
common_files = glob(os.path.join('..', 'common', '*.c'))
|
||||||
run_subprocess(['clang-tidy',
|
run_subprocess(['clang-tidy',
|
||||||
|
Loading…
Reference in New Issue
Block a user