File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Usage (from parent dir of this dir):
4+ # [PY_VERSION=<python_version>] test/run.sh [optional pytest arg]
5+ #
6+ # Examples:
7+ # Run all tests:
8+ # test/run.sh
9+ #
10+ # Run only tests in test_parameters.py
11+ # Include INFO logging messages in the output, i.e. all compilation messages.
12+ # test/run.sh --log-cli-level=INFO test_parameters.py
13+ #
14+ # Same but use python 3.13
15+ # PY_VERSION=3.13 test/run.sh --log-cli-level=INFO test_parameters.py
16+
317set -e
418
519cd " $( dirname " $0 " ) "
@@ -15,7 +29,8 @@ if exists ccache; then
1529fi
1630
1731# Initialize venv
18- python3 -m venv .venv
32+ _PYTHON=" python${PY_VERSION:- 3.11} "
33+ " $_PYTHON " -m venv .venv
1934source .venv/bin/activate
2035
2136# Install
@@ -24,9 +39,9 @@ python -m pip install -e ..
2439python -m pip install -r requirements.txt pytest-parallel
2540
2641# Run unit tests while collecting coverage
27- pytest --cov=systemrdl
42+ pytest --cov=systemrdl " $@ "
2843export SYSTEMRDL_DISABLE_ACCELERATOR=1
29- pytest
44+ pytest " $@ "
3045
3146# Generate coverage report
3247coverage html -i -d htmlcov
You can’t perform that action at this time.
0 commit comments