loom 369 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -x
  3. TESTCMD=(test)
  4. # if cargo nextest is installed, use it instead!
  5. if cargo list | grep -q "nextest"; then
  6. TESTCMD=(nextest run --cargo-profile loom)
  7. fi
  8. RUSTFLAGS="--cfg loom ${RUSTFLAGS}" \
  9. LOOM_LOG="${LOOM_LOG:-info}" \
  10. LOOM_MAX_PREEMPTIONS="${LOOM_MAX_PREEMPTIONS:-2}" \
  11. cargo ${TESTCMD[@]} \
  12. --profile loom \
  13. --lib \
  14. "$@"