This is an archive of the discontinued Mercurial Phabricator instance.

unit-tests: Fix `cargo test` on 32-bit platforms
ClosedPublic

Authored by SimonSapin on Apr 9 2021, 6:08 AM.

Details

Summary

Fixes https://bz.mercurial-scm.org/show_bug.cgi?id=6506

This makes IndexEntryBuilder::build, which is only used in unit tests, use
u32 or u64 instead of platform-dependent usize when packing binary data
to be used at test input.

To run Rust unit tests in 32-bit mode in a x86-64 environment, use:

rustup target add i686-unknown-linux-gnu  # Once
(cd rust && cargo test --target i686-unknown-linux-gnu)

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Apr 9 2021, 6:08 AM
pulkit accepted this revision.Apr 11 2021, 5:29 PM
This revision is now accepted and ready to land.Apr 11 2021, 5:29 PM
This revision was automatically updated to reflect the committed changes.