summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-03-15 05:45:50 +0000
committerLars Wirzenius <liw@liw.fi>2024-03-15 05:45:50 +0000
commitd19841b087996784f1437a743a6916a443f4911b (patch)
tree93dff6e69da88b75b6b3bdb74a6eee22cef08280 /check
parented1c8990707b451580e45aea0169b9a82fe739f2 (diff)
parentf29c6e680baefec5289d4fb75d7bf96118b62d84 (diff)
downloadobnam-benchmark-main.tar.gz
Merge branch 'fixes' into 'main'HEADmain
fixes See merge request obnam/obnam-benchmark!16
Diffstat (limited to 'check')
-rwxr-xr-xcheck20
1 files changed, 14 insertions, 6 deletions
diff --git a/check b/check
index cc8ef6c..ea6f30d 100755
--- a/check
+++ b/check
@@ -2,12 +2,20 @@
set -euo pipefail
+offline=
+if [ "$#" -gt 0 ] && [ "$1" = "--offline" ]; then
+ offline=--offline
+ shift 1
+fi
+
cargo clippy -q --all-targets -- -D clippy::all
-cargo build --all-targets -q
-chronic cargo test -q
-subplot docgen obnam-benchmark.md -o obnam-benchmark.html
-subplot docgen obnam-benchmark.md -o obnam-benchmark.pdf
-subplot codegen obnam-benchmark.md -o test.py
-chronic python3 test.py --log test.log "$@"
+cargo build --all-targets -q $offline
+chronic cargo test -q $offline
+subplot docgen obnam-benchmark.subplot -o obnam-benchmark.html
+subplot codegen obnam-benchmark.subplot -o test.py
+if ! chronic python3 test.py --log test.log "$@"; then
+ cat test.log
+ exit 1
+fi
cargo fmt -- --check
echo A-OK