40 lines · 1.1 KB · Shell
RawDownload
#!/usr/bin/env bash# The definition of done of every package (docs/PLAN.md section 0):#   cargo fmt --all -- --check#   cargo build --workspace --all-targets#   cargo test --workspace#   cargo clippy --workspace --all-targets -- -D warnings#   scripts/check-layers.sh##   scripts/check.sh          run the five checks#   scripts/check.sh --full   then run the spec-sized `#[ignore] full_*` tests:#                             SCION_FULL=1 cargo test --workspace --release -- --include-ignoredset -euo pipefailcd "$(dirname "$0")/.." FULL=0for arg in "$@"; do  case "$arg" in    --full) FULL=1 ;;    -h|--help) sed -n '2,12p' "$0"; exit 0 ;;    *) echo "usage: $0 [--full]" >&2; exit 2 ;;  esacdone step() {  echo "==> $*"  "$@"} step cargo fmt --all -- --checkstep cargo build --workspace --all-targetsstep cargo test --workspacestep cargo clippy --workspace --all-targets -- -D warningsstep scripts/check-layers.sh if [ "$FULL" = 1 ]; then  echo "==> SCION_FULL=1 cargo test --workspace --release -- --include-ignored"  SCION_FULL=1 cargo test --workspace --release -- --include-ignoredfi echo "check.sh: all checks passed"