Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: disable serialisation tests when miri is active
Browse files Browse the repository at this point in the history
doug-q committed Apr 26, 2024
1 parent ef5485a commit 6252861
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions hugr/src/hugr/serialize.rs
Original file line number Diff line number Diff line change
@@ -260,8 +260,7 @@ impl TryFrom<SerHugrV1> for Hugr {
}
}

#[cfg(test)]
#[cfg_attr(miri, ignore = "miri does not support 'life before main'")]
#[cfg(all(test, not(miri)))]
// Miri doesn't run the extension registration required by `typetag` for
// registering `CustomConst`s. https://github.com/rust-lang/miri/issues/450
pub mod test {
3 changes: 1 addition & 2 deletions hugr/src/hugr/validate.rs
Original file line number Diff line number Diff line change
@@ -104,8 +104,7 @@ impl<'a, 'b> ValidationContext<'a, 'b> {
// TODO: We should also verify that the serialized hugr matches the
// in-tree schema. For now, our serialized hugr does not match the
// schema. When this is fixed we should pass true below.
#[cfg(test)]
#[cfg_attr(miri, ignore = "miri does not support 'life before main'")]
#[cfg(all(test, not(miri)))]
crate::hugr::serialize::test::check_hugr_roundtrip(self.hugr, false);

Ok(())

0 comments on commit 6252861

Please sign in to comment.