mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 06:32:59 -04:00
sci-electronics/circt: fix test failure when Z3 unavailable
The circt-synth mig.mlir integration test was missing the libz3 and circt-lec-jit REQUIRES guards that every sibling LEC test carries, so it ran its circt-lec JIT commands and failed on unresolved Z3 symbols instead of being skipped. Patch it to add the guards. Closes: https://bugs.gentoo.org/977874 Signed-off-by: Huang Rui <vowstar@gmail.com>
This commit is contained in:
@@ -63,6 +63,17 @@ DOCS=(
|
||||
"${S_CIRCT}/circt-LICENSE"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# mig.mlir lacks the libz3/circt-lec-jit REQUIRES guards its sibling
|
||||
# circt-synth LEC tests carry, so it runs and fails when Z3 is
|
||||
# unavailable instead of being skipped. See
|
||||
# https://bugs.gentoo.org/977874
|
||||
pushd "${S_CIRCT}" > /dev/null || die
|
||||
eapply "${FILESDIR}"/${PN}-1.140.0-mig-require-libz3.patch
|
||||
popd > /dev/null || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
python_setup
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
Add the libz3/circt-lec-jit REQUIRES guards that every other circt-synth
|
||||
LEC test already carries. Without them mig.mlir runs its circt-lec
|
||||
--shared-libs=%libz3 commands even when Z3 is unavailable, and the JIT
|
||||
aborts on unresolved Z3 symbols instead of the test being skipped.
|
||||
|
||||
https://bugs.gentoo.org/977874
|
||||
|
||||
--- a/integration_test/circt-synth/mig.mlir
|
||||
+++ b/integration_test/circt-synth/mig.mlir
|
||||
@@ -1,3 +1,5 @@
|
||||
+// REQUIRES: libz3
|
||||
+// REQUIRES: circt-lec-jit
|
||||
// RUN: circt-opt %s --pass-pipeline='builtin.module(hw.module(hw-aggregate-to-comb,convert-comb-to-synth{target-ir=mig},convert-synth-to-comb))' -o %t.mlir
|
||||
// RUN: circt-lec %t.mlir %s -c1=bit_logical -c2=bit_logical --shared-libs=%libz3 | FileCheck %s --check-prefix=COMB_BIT_LOGICAL
|
||||
// COMB_BIT_LOGICAL: c1 == c2
|
||||
Reference in New Issue
Block a user