summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-13 17:48:42 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-13 17:48:42 +0200
commit9d6bdf66738bbe997785d4172af04bef17e9b311 (patch)
treeb4d0cd696a77ad79c44cc02b4c113eff4cd52c97
parent841c766c942982f021aa97c1827faaa23715dee7 (diff)
downloadjt2-9d6bdf66738bbe997785d4172af04bef17e9b311.tar.gz
tests(check): add --offline option, for Ambient
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rwxr-xr-xcheck13
1 files changed, 9 insertions, 4 deletions
diff --git a/check b/check
index 3151caa..2db4c0e 100755
--- a/check
+++ b/check
@@ -3,12 +3,17 @@
set -eu
verbose=false
+offline=
if [ "$#" -gt 0 ]; then
case "$1" in
verbose | -v | --verbose)
verbose=true
shift
;;
+ --offline)
+ offline=--offline
+ shift
+ ;;
esac
fi
@@ -22,10 +27,10 @@ if $verbose; then
hideok=
fi
-$hideok cargo check --all-targets
-cargo clippy -q
-$hideok cargo build --all-targets
-$hideok cargo test
+$hideok cargo check --all-targets $offline
+cargo clippy -q $offline
+$hideok cargo build --all-targets $offline
+$hideok cargo test $offline
$hideok cargo fmt -- --check
$hideok find . -type f -name '*.py' ! -name test.py -exec black --check '{}' +