Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tox makes it much easier to run the FuseSoC tests in an isolated environment without installing fusesoc first, or overwriting a production version. Simply run `tox` in the FuseSoC root source directory to run all tests. Fixes #213
- Loading branch information
Showing
2 changed files
with
36 additions
and
4 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
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,25 @@ | ||
[tox] | ||
envlist = py3 | ||
|
||
[testenv] | ||
# Some tests need an initialized FuseSoC library to be present. To make tests | ||
# reproducible tox doesn't use the library installed into the user's home | ||
# directory, but creates an isolated home directory within the tox working | ||
# directory, and clears it out after each test. | ||
deps = pytest | ||
commands = | ||
/bin/rm -rf {toxworkdir}/.tmp/homedir | ||
fusesoc init -y | ||
fusesoc list-cores | ||
fusesoc library update | ||
pytest {posargs} | ||
|
||
setenv = | ||
MODEL_TECH = dummy_value | ||
HOME = {toxworkdir}/.tmp/homedir | ||
XDG_CACHE_HOME = {toxworkdir}/.tmp/homedir/.cache | ||
XDG_DATA_HOME= {toxworkdir}/.tmp/homedir/.local/share | ||
XDG_CONFIG_HOME = {toxworkdir}/.tmp/homedir/.config | ||
|
||
whitelist_externals = | ||
/bin/rm |