Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(test_espefuse): Migrate tests from unittest to pytest
- Loading branch information
1 parent
1d18196
commit 2b42855
Showing
10 changed files
with
1,775 additions
and
2,209 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
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 |
---|---|---|
@@ -1,20 +1,31 @@ | ||
def pytest_addoption(parser): | ||
# test_esptool.py and test_espefuse.py | ||
parser.addoption( | ||
"--port", action="store", default="/dev/ttyUSB0", help="Serial port" | ||
) | ||
parser.addoption("--chip", action="store", default="esp32", help="Chip type") | ||
|
||
# test_esptool.py only | ||
parser.addoption("--baud", action="store", default=115200, help="Baud rate") | ||
parser.addoption("--with-trace", action="store_true", default=False, help="Trace") | ||
|
||
# test_espefuse.py only | ||
parser.addoption( | ||
"--with_trace", | ||
action="store_true", | ||
default=False, | ||
help="Trace interactions", | ||
"--reset-port", action="store", default=None, help="FPGA reset port" | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
global arg_port, arg_chip, arg_baud, arg_trace | ||
# test_esptool.py and test_espefuse.py | ||
global arg_port, arg_chip | ||
arg_port = config.getoption("--port") | ||
arg_chip = config.getoption("--chip") | ||
|
||
# test_esptool.py only | ||
global arg_baud, arg_trace | ||
arg_baud = config.getoption("--baud") | ||
arg_trace = config.getoption("--with_trace") | ||
arg_trace = config.getoption("--with-trace") | ||
|
||
# test_espefuse.py only | ||
global arg_reset_port | ||
arg_reset_port = config.getoption("--reset-port") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.