maint: add a dependency check to coverage
This commit implements a dependency check to the `maint/coverage` script, that checks for the rustup, python3, and grcov binaries in $PATH; the bs4 and lxml python packages; and the llvm-tools Rust component. Fixes #776
This commit is contained in:
parent
943e4414fe
commit
b4b8d040a0
|
@ -30,6 +30,29 @@ cd "$TOPDIR"
|
|||
UNIT=no
|
||||
INTEGRATION=no
|
||||
|
||||
# Check if all dependencies are satisfied
|
||||
DEPS_BINARY=("rustup" "python3" "grcov")
|
||||
DEPS_PYTHON=("bs4" "lxml")
|
||||
|
||||
for bin in "${DEPS_BINARY[@]}"; do
|
||||
if ! type "$bin" > /dev/null; then
|
||||
echo "Missing $bin in PATH"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for pkg in "${DEPS_PYTHON[@]}"; do
|
||||
if ! python3 -c "import $pkg" > /dev/null; then
|
||||
echo "Missing python package $pkg"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if ! rustup component list --installed | grep llvm-tools &> /dev/null; then
|
||||
echo "Missing llvm-tools in the Rust toolchain"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while getopts "ch" opt ; do
|
||||
case "$opt" in
|
||||
h) usage
|
||||
|
|
Loading…
Reference in New Issue