spyglass-plugin-xls/tools/gate/run-unit-tests.sh
Ian H. Pittwood 23892ce1ad Add unit tests for xls plugin CLI
This change implements unit tests for the Spyglass XLS plugin CLI.

Change-Id: I0761f8508f3134b1ffb77e78543a72bf1fcf5ca5
2019-06-17 11:06:31 -05:00

13 lines
294 B
Bash
Executable File

#!/usr/bin/env bash
set -e
posargs=$@
# cross-platform way to derive the number of logical cores
readonly num_cores=$(python -c 'import multiprocessing as mp; print(mp.cpu_count())')
if [ ${#posargs} -ge 1 ]; then
pytest -k ${posargs} -n $num_cores
else
pytest -n $num_cores
fi
set +e