From 4178768599bab6f20292b87275d27c4b81ed2478 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Fri, 1 Mar 2019 12:22:33 +0100 Subject: [PATCH] Skip clang-tidy if not available --- test/test_linter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_linter.py b/test/test_linter.py index 7d550c87..8d6b6839 100644 --- a/test/test_linter.py +++ b/test/test_linter.py @@ -1,5 +1,7 @@ import os from glob import glob +import shutil +import unittest import pqclean from helpers import run_subprocess @@ -12,6 +14,8 @@ def test_clang_tidy(): 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')) common_files = glob(os.path.join('..', 'common', '*.c')) run_subprocess(['clang-tidy',