From 96f660083278bc5c7498bf4819a4077b3ea109a1 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 6 Jun 2023 21:11:30 -0400 Subject: tests: avoid hard to debug error when llvm is found with only one method In commit 89146e84c9eab649d3847af101d61047cac45765 we added some complicated code to verify the llvm framework's "combination" matrix lookup. It expects to find llvm with both cmake and config-tool, with the same version. But the sanity check is wonky -- it checks that both have the same found status, instead, so if both are not found then we proceed to try to convert the string "unknown" to a mapping of semver integers, and this is guaranteed to fail. This can happen for example if the system llvm exists in the general case, but actual modules cannot be found because the system llvm does not distribute static modules. For example, this is the case on Gentoo. Abort more obviously by just insisting that both be found. If they aren't both found, then investigative efforts know to look at why they weren't found. --- test cases/frameworks/15 llvm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test cases') diff --git a/test cases/frameworks/15 llvm/meson.build b/test cases/frameworks/15 llvm/meson.build index 3b5f4ae..ab297ec 100644 --- a/test cases/frameworks/15 llvm/meson.build +++ b/test cases/frameworks/15 llvm/meson.build @@ -37,7 +37,7 @@ if(method == 'combination') ) endif - assert(llvm_ct_dep.found() == llvm_cm_dep.found(), 'config-tool and cmake results differ') + assert(llvm_ct_dep.found() and llvm_cm_dep.found(), 'config-tool and cmake both need to be found') cm_version_major = llvm_cm_dep.version().split('.')[0].to_int() cm_version_minor = llvm_cm_dep.version().split('.')[1].to_int() ct_version_major = llvm_ct_dep.version().split('.')[0].to_int() -- cgit v1.1