diff --git a/dev_tools/test_libs.sh b/dev_tools/test_libs.sh index c640f91a8..7efa58f73 100755 --- a/dev_tools/test_libs.sh +++ b/dev_tools/test_libs.sh @@ -16,11 +16,15 @@ set -eo pipefail -o errtrace declare -r usage="Usage: ${0##*/} [-h | --help | help] [bazel options ...] -Run the programs in tests/, and on Linux, also build the programs in apps/. + +Invokes Bazel to run the programs in tests/, and on Linux, also build the +sample programs in apps/. If the first option on the command line is -h, --help, or help, this help text will be printed and the program will exit. Any other options on the command -line are passed directly to Bazel." +line are passed directly to Bazel. + +This script makes use of the Python package 'py-cpuinfo'." # Exit early if the user requested help. if [[ "$1" == "-h" || "$1" == "--help" || "$1" == "help" ]]; then @@ -28,6 +32,11 @@ if [[ "$1" == "-h" || "$1" == "--help" || "$1" == "help" ]]; then exit 0 fi +if ! python -m pip show -qq py-cpuinfo 2>/dev/null; then + echo "Error: missing 'py-cpuinfo'. Please install dev-requirements.txt." >&2 + exit 1 +fi + # Look for AVX and SSE in the processor's feature flags. declare features="" declare filters=""