cargo-test-miri.sh 1.2 KB

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. # Copyright Materialize, Inc. and contributors. All rights reserved.
  3. #
  4. # Use of this software is governed by the Business Source License
  5. # included in the LICENSE file at the root of this repository.
  6. #
  7. # As of the Change Date specified in that file, in accordance with
  8. # the Business Source License, use of this software will be governed
  9. # by the Apache License, Version 2.0.
  10. #
  11. # cargo-test-miri.sh — runs subset of unit tests under miri to check for
  12. # undefined behaviour.
  13. set -euo pipefail
  14. # miri artifacts are thoroughly incompatible with normal build artifacts,
  15. # so keep them away from the `target` directory.
  16. export CARGO_TARGET_DIR="$PWD/miri-target"
  17. export MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-strict-provenance"
  18. PARTITION=$((${BUILDKITE_PARALLEL_JOB:-0}+1))
  19. TOTAL=${BUILDKITE_PARALLEL_JOB_COUNT:-1}
  20. # exclude network-based and more complex tests which run out of memory
  21. cargo miri nextest run -j"$(nproc)" --partition "count:$PARTITION/$TOTAL" --no-fail-fast --workspace --exclude 'mz-environmentd*' --exclude 'mz-compute-client*' --exclude 'mz-compute-types*' --exclude 'mz-ssh-util*' --exclude 'mz-rocksdb*' --exclude 'mz-fivetran-destination*'