swc/scripts/ci/test-concurrent.sh

18 lines
415 B
Bash
Raw Normal View History

2022-06-13 14:15:18 +03:00
#!/usr/bin/env bash
set -eu
echo "Checking if '$1' has feature 'concurrent'"
# Get crates with feature named `concurrent`
CRATES=$(./scripts/cargo/list-crates.sh | \
jq -r 'select(.features.concurrent != null) | .name')
if [[ "swc" == "$1" ]]; then
echo "Skipping swc itself"
exit 0
fi
if [[ $CRATES == *"$1"* ]]; then
cargo test --color always -p $1 --all-targets --features "$1/concurrent"
2022-06-13 14:15:18 +03:00
fi