Skip to content

Commit e11cd81

Browse files
committed
Auto merge of #10011 - hkratz:disable-failing-test, r=joshtriplett
Fix test: hash value depends on endianness and bitness. The test fails on 32-bit systems and on big-endian systems since Rust 1.44. Fixes #10004.
2 parents 2e2a16e + aa00def commit e11cd81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cargo/core/source/source_id.rs

+5
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,12 @@ impl Ord for SourceKind {
617617
// you're able to restore the hash to its original value, please do so!
618618
// Otherwise please just leave a comment in your PR as to why the hash value is
619619
// changing and why the old value can't be easily preserved.
620+
//
621+
// The hash value depends on endianness and bit-width, so we only run this test on
622+
// little-endian 64-bit CPUs (such as x86-64 and ARM64) where it matches the
623+
// well-known value.
620624
#[test]
625+
#[cfg(all(target_endian = "little", target_pointer_width = "64"))]
621626
fn test_cratesio_hash() {
622627
let config = Config::default().unwrap();
623628
let crates_io = SourceId::crates_io(&config).unwrap();

0 commit comments

Comments
 (0)