summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-06-06 21:11:30 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-06-07 16:40:51 -0400
commit96f660083278bc5c7498bf4819a4077b3ea109a1 (patch)
tree88ec1e686e8d10ef34777872df7b0ae240299dc9
parent2be09bbc929e1ba4dc4e47a0f6b67f2d81480725 (diff)
downloadmeson-96f660083278bc5c7498bf4819a4077b3ea109a1.tar.gz
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.
-rw-r--r--test cases/frameworks/15 llvm/meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/test cases/frameworks/15 llvm/meson.build b/test cases/frameworks/15 llvm/meson.build
index 3b5f4ae52..ab297ec53 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()