summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rwxr-xr-xcheck9
1 files changed, 7 insertions, 2 deletions
diff --git a/check b/check
index 2db4c0e..642dfbe 100755
--- a/check
+++ b/check
@@ -33,13 +33,18 @@ $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 '{}' +
+if command -v black >/dev/null; then
+ $hideok find . -type f -name '*.py' ! -name test.py -exec black --check '{}' +
+fi
$hideok subplot docgen jt.subplot --output jt.html
$hideok subplot codegen jt.subplot --output test.py
rm -f test.log
-target="$(cargo metadata --format-version=1 | jq -r .target_directory)"
+target="$(
+ cargo metadata --format-version=1 |
+ python3 -c 'import json, sys; o = json.load(sys.stdin); print (o["target_directory"])'
+)"
if ! $hideok python3 test.py --log test.log --env "CARGO_TARGET_DIR=$target" "$@"; then
cat test.log
fi