Skip to content

Commit

Permalink
tox-envfile: add support for env file
Browse files Browse the repository at this point in the history
  • Loading branch information
jia200x authored and fjmolinas committed Sep 28, 2021
1 parent 9287224 commit b5d0ffa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .devdata.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Use this file as a template for .devdata.env

### General

# Path to RIOTBASE
# RIOTBASE=/path/to/RIOT
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test-report.xml
.devdata.env

#### joe made this: http://goel.io/joe

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,17 @@ tox -- -k spec03 -k "task01 or task05"

is identical to the first example.

##### Using an env file to keep persistent environment variables

Most tests require a set of user specific environment variable (path to
RIOTBASE, LoRaWAN keys, etc). In order to keep these variables persistent, a
.devdata.env file can be place in the root directory. For that, please make
a copy of ".devdata.env.sample" and modify accordingly:

```sh
cp .devdata.env.sample .devdata.env
```

[pytest]: https://pytest.org
[riotctrl]: https://pypi.org/project/riotctrl/
[IoT-LAB saclay site]: https://www.iot-lab.info/deployment/saclay/
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
envlist = test,flake8,pylint
skipsdist = True
requires = tox-envfile

[testenv]
basepython = python3
Expand Down

0 comments on commit b5d0ffa

Please sign in to comment.