From b3d7289460c0448796608006339a0adc7375886d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 3 Sep 2020 20:18:33 +0200 Subject: [PATCH] test-clang-import: Only run tests if clang is in PATH --- test/cli/test-clang-import.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/cli/test-clang-import.py b/test/cli/test-clang-import.py index 9c34b1bc4..ade618c36 100644 --- a/test/cli/test-clang-import.py +++ b/test/cli/test-clang-import.py @@ -26,6 +26,12 @@ def get_debug_section(title, stdout): def check_symbol_database(code): + # Only compare symboldatabases if clang is found in PATH + try: + subprocess.call(['clang', '--version']) + except OSError: + return + testfile = 'test.cpp' with open(testfile, 'w+t') as f: f.write(code)