Reorganize test dir to ensure test of installed pkg

This commit is contained in:
Alex Mykyta
2022-02-28 23:08:41 -08:00
parent a8bf3c5132
commit 54d783e1ab
138 changed files with 15 additions and 19 deletions

29
tests/run.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
set -e
this_dir="$( cd "$(dirname "$0")" ; pwd -P )"
# Initialize venv
venv_bin=$this_dir/.venv/bin
python3 -m venv $this_dir/.venv
source $this_dir/.venv/bin/activate
# Install test dependencies
pip install -U pip setuptools wheel
pip install -r $this_dir/requirements.txt
# Install dut
cd $this_dir/../
pip install .
cd $this_dir
# Run unit tests
export SKIP_SYNTH_TESTS=1
pytest --workers auto
# Run lint
pylint --rcfile $this_dir/pylint.rc ../src/peakrdl
# Run static type checking
mypy $this_dir/../src/peakrdl