Auto merge of #1523 - RalfJung:test-matrix, r=RalfJung

tweak test matrix

* test big-endian architecture
* test less on macOS host (it is slow)
This commit is contained in:
bors 2020-08-22 16:09:48 +00:00
commit 222093e815
3 changed files with 8 additions and 5 deletions

3
ci.sh
View file

@ -43,9 +43,8 @@ if [ "${TRAVIS_OS_NAME:-}" == linux ]; then
MIRI_TEST_TARGET=x86_64-apple-darwin run_tests
MIRI_TEST_TARGET=i686-pc-windows-msvc run_tests
elif [ "${TRAVIS_OS_NAME:-}" == osx ]; then
MIRI_TEST_TARGET=i686-unknown-linux-gnu run_tests
MIRI_TEST_TARGET=mips64-unknown-linux-gnuabi64 run_tests # big-endian architecture
MIRI_TEST_TARGET=x86_64-pc-windows-msvc run_tests
MIRI_TEST_TARGET=i686-pc-windows-gnu run_tests
elif [ "${CI_WINDOWS:-}" == True ]; then
MIRI_TEST_TARGET=x86_64-unknown-linux-gnu run_tests
MIRI_TEST_TARGET=x86_64-apple-darwin run_tests

View file

@ -1,9 +1,13 @@
fn main() {
#[cfg(target_pointer_width="64")]
#[cfg(all(target_endian="little", target_pointer_width="64"))]
let bad = unsafe {
std::mem::transmute::<u128, &[u8]>(42)
};
#[cfg(target_pointer_width="32")]
#[cfg(all(target_endian="big", target_pointer_width="64"))]
let bad = unsafe {
std::mem::transmute::<u128, &[u8]>(42 << 64)
};
#[cfg(all(target_endian="little", target_pointer_width="32"))]
let bad = unsafe {
std::mem::transmute::<u64, &[u8]>(42)
};

View file

@ -1 +1 @@
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', $DIR/transmute_fat2.rs:11:5
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', $DIR/transmute_fat2.rs:15:5