Files
wasmtime/lib/cretonne/meta/check.sh
Jakob Stoklund Olesen d7a479de6d Run mypy if it's available.
The Python tools pyliint, flake8, and mypy are only run if they exist in
$PATH.
2016-10-26 15:15:51 -07:00

23 lines
443 B
Bash
Executable File

#!/bin/bash
set -e
cd $(dirname "$0")
echo "=== Python unit tests ==="
python -m unittest discover
runif() {
if command -v "$1" > /dev/null; then
echo "=== $1 ==="
"$@"
else
echo "$1 not found"
fi
}
# Check Python sources for Python 3 compatibility using pylint.
#
# Install pylint with 'pip install pylint'.
runif pylint --py3k --reports=no -- *.py cretonne isa
runif flake8 .
runif mypy --py2 build.py