-
Notifications
You must be signed in to change notification settings - Fork 221
/
miri.sh
executable file
·34 lines (28 loc) · 1.32 KB
/
miri.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
# Convenience script for running Miri, also the same one that the CI runs!
set -e
# use half the available threads since miri can be a bit memory hungry
test_threads=$((($(nproc) - 1) / 2 + 1))
echo using $test_threads threads
# filters out long running tests
filter='not (test(100k) | test(map_test::wrap) | test(map_test::insert_same_key) | test(=mixed_create_merge)| test(=par_join_many_entities_and_systems) | test(=stillborn_entities))'
echo "using filter: \"$filter\""
# Miri currently reports leaks in some tests so we disable that check
# here (might be due to ptr-int-ptr in crossbeam-epoch so might be
# resolved in future versions of that crate).
#
# crossbeam-epoch doesn't pass with stacked borrows so we need to use tree-borrows
# https://github.com/crossbeam-rs/crossbeam/issues/545
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks -Zmiri-tree-borrows" \
cargo +nightly miri nextest run \
-E "$filter" \
--test-threads="$test_threads" \
# use nocapture or run miri directly to see warnings from miri
#--nocapture
# Run tests only available when parallel feature is disabled.
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks -Zmiri-tree-borrows" \
cargo +nightly miri nextest run \
--no-default-features \
-E "binary(no_parallel)" \
--test-threads="$test_threads"