From c52df697788004830709af50d49509b4278277bf Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 13 Jan 2024 17:20:51 +0200 Subject: tests(check): add --offline option Signed-off-by: Lars Wirzenius Sponsored-by: author --- check | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'check') diff --git a/check b/check index c143a4a..5dfe653 100755 --- a/check +++ b/check @@ -3,6 +3,7 @@ set -eu verbose=false +offline= moar=true while [ "$#" -gt 0 ] && $moar; do case "$1" in @@ -10,6 +11,10 @@ while [ "$#" -gt 0 ] && $moar; do verbose=true shift 1 ;; + --offline) + offline=--offline + shift 1 + ;; esac done @@ -35,14 +40,14 @@ docgen() { subplot docgen "$1" --output "$2" } -$hideok cargo build --all-targets +$hideok cargo build --all-targets $offline if cargo --list | awk '{ print $1 }' | grep 'clippy$' >/dev/null; then # shellcheck disable=SC2086 - cargo clippy $quiet + cargo clippy $quiet $offline fi # shellcheck disable=SC2086 -$hideok cargo test $quiet +$hideok cargo test $quiet $offline if cargo fmt --help >/dev/null 2>/dev/null; then $hideok cargo fmt -- --check -- cgit v1.2.1