-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
TEST_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
ROOT_DIR="${TEST_DIR}/../" | ||
|
||
echo "[-] Running make check" | ||
pushd ${ROOT_DIR} | ||
rm -rf build | ||
./configure.sh -f | ||
make check | ||
popd | ||
|
||
echo "[-] Running cmake unit-tests" | ||
rm -rf build && mkdir build && pushd build | ||
cmake ${ROOT_DIR} | ||
make check-ut | ||
popd | ||
|
||
echo "[-] Creating an isolated environment.." | ||
pushd ${TEST_DIR} | ||
rm -rf __pycache__/ | ||
rm -rf .venv ${ROOT_DIR}/python/{build,dist,libosdp.egg-info,vendor} | ||
python3 -m venv .venv | ||
source ./.venv/bin/activate | ||
pip install --upgrade pip | ||
|
||
echo "[-] Installing dependencies.." | ||
pushd "${ROOT_DIR}/tests/pytest" | ||
pip install -r requirements.txt | ||
|
||
echo "[-] Installing libosdp.." | ||
pip install "${ROOT_DIR}/python" | ||
|
||
echo "[-] Running tests capturing all output.." | ||
pytest -vv --show-capture=all | ||
popd |