From 582ebec9cf85f4e4ffb8f27124053855acaa5d9b Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Thu, 20 Jul 2023 10:37:27 +0200 Subject: [PATCH] fix python when compiler is not LDC --- tests/plugins/lit.local.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/plugins/lit.local.cfg b/tests/plugins/lit.local.cfg index 2e0d18046d5..6b869a60cda 100644 --- a/tests/plugins/lit.local.cfg +++ b/tests/plugins/lit.local.cfg @@ -31,8 +31,8 @@ if (config.plugins_supported): text1 = p.stdout.readline() # Ex.: "LDC - the LLVM D compiler (1.33.0-git-716f627)" text2 = p.stdout.readline() # Ex.: " based on DMD v2.103.1 and LLVM 14.0.0" text3 = p.stdout.readline() # Ex.: " built with LDC - the LLVM D compiler (1.33.0-beta2)" - host_version = re.compile(' built with LDC.* \(1\.([0-9]+).*\)').match(text3).group(1) - if (int(host_version) >= 18): + host_version = re.compile(' built with LDC.* \(1\.([0-9]+).*\)').match(text3) + if (host_version and int(host_version.group(1)) >= 18): config.available_features.add('ABI_compatible_with_host_D')