tests: avoid hard to debug error when llvm is found with only one method

In commit 89146e84c9 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.
pull/11853/head
Eli Schwartz 2 years ago
parent 2be09bbc92
commit 96f6600832
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      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()

Loading…
Cancel
Save