fix arg splitting, capture exit code

pull/1799/head
alpharush 2 years ago
parent 437e0c7d66
commit 18bbe56186
  1. 7
      .github/scripts/integration_test_runner.sh
  2. 10
      .github/scripts/tool_test_runner.sh
  3. 10
      .github/scripts/unit_test_runner.sh

@ -6,8 +6,13 @@ npm install hardhat
popd || exit
# used to pass --cov=$path and --cov-append to pytest
pytest "$1" tests/e2e/ -n auto
if [ "$1" != "" ]; then
pytest "$1" tests/e2e/ -n auto
status_code=$?
python -m coverage report
else
pytest tests/e2e/ -n auto
status_code=$?
fi
exit "$status_code"

@ -2,7 +2,13 @@
npm install --global ganache
# used to pass --cov=$path and --cov-append to pytest
pytest "$1" tests/tools/read-storage/test_read_storage.py
if [ "$1" != "" ]; then
pytest "$1" tests/tools/read-storage/test_read_storage.py
status_code=$?
python -m coverage report
fi
else
pytest tests/tools/read-storage/test_read_storage.py
status_code=$?
fi
exit "$status_code"

@ -1,7 +1,13 @@
#!/usr/bin/env bash
# used to pass --cov=$path and --cov-append to pytest
pytest "$1" tests/unit/
if [ "$1" != "" ]; then
pytest "$1" tests/unit/
status_code=$?
python -m coverage report
fi
else
pytest tests/unit/
status_code=$?
fi
exit "$status_code"
Loading…
Cancel
Save