run-partition.sh 928 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env bash
  2. set -eo pipefail
  3. here="$(dirname "$0")"
  4. #shellcheck source=ci/common/shared-functions.sh
  5. source "$here"/../common/shared-functions.sh
  6. #shellcheck source=ci/common/limit-threads.sh
  7. source "$here"/../common/limit-threads.sh
  8. #shellcheck source=ci/stable/common.sh
  9. source "$here"/common.sh
  10. # check partition info
  11. INDEX=${1:-"$BUILDKITE_PARALLEL_JOB"} # BUILDKITE_PARALLEL_JOB from 0 to (BUILDKITE_PARALLEL_JOB_COUNT - 1)
  12. : "${INDEX:?}"
  13. # if LIMIT = 3, the valid INDEX is 0~2
  14. LIMIT=${2:-"$BUILDKITE_PARALLEL_JOB_COUNT"}
  15. : "${LIMIT:?}"
  16. if [ ! "$LIMIT" -gt "$INDEX" ]; then
  17. echo "LIMIT(\$2) should greater than INDEX(\$1)"
  18. exit 1
  19. fi
  20. ARGS=(
  21. --profile ci
  22. --config-file ./nextest.toml
  23. --workspace
  24. --tests
  25. --jobs "$JOBS"
  26. --partition hash:"$((INDEX + 1))/$LIMIT"
  27. --verbose
  28. --exclude solana-local-cluster
  29. --exclude solana-cargo-build-sbf
  30. --no-tests=warn
  31. )
  32. _ cargo nextest run "${ARGS[@]}"