Skip to content

Commit

Permalink
Only run test on 64-bit little endian architectures.
Browse files Browse the repository at this point in the history
Hash value is different depenidng on bitness and endianess so we
only run this test on 64-bit little endian platforms.
  • Loading branch information
hkratz committed Oct 25, 2021
1 parent 6c1bc24 commit b5590ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cargo/core/source/source_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,13 @@ impl Ord for SourceKind {
// you're able to restore the hash to its original value, please do so!
// Otherwise please just leave a comment in your PR as to why the hash value is
// changing and why the old value can't be easily preserved.
//
// The hash value differs depending on endianess and bit-width since Rust 1.45
// (see https://github.com/rust-lang/rust/issues/74215). We run this test only
// on 64-bit little-endian platforms which are most commonly used for
// development and tested in CI.
#[test]
#[cfg(all(target_endian = "little", target_pointer_width = "64"))]
fn test_cratesio_hash() {
let config = Config::default().unwrap();
let crates_io = SourceId::crates_io(&config).unwrap();
Expand Down

0 comments on commit b5590ca

Please sign in to comment.