labgrid
labgrid copied to clipboard
Update protocols, make drivers follow protocols
Description
Make method args of CommandProtocol, FileTransferProtocol consistent/reflect driver reality. Now let drivers implementing protocols follow them strictly.
This PR includes converting run()'s/run_check()'s codec/decodeerrors kwargs to driver attributes.
Checklist
- [x] The arguments and description in doc/configuration.rst have been updated
- [ ] PR has been tested (parts of it)
Codecov Report
Merging #574 into master will increase coverage by
0.9%. The diff coverage is73.0%.
@@ Coverage Diff @@
## master #574 +/- ##
========================================
+ Coverage 58.1% 59.1% +0.9%
========================================
Files 123 123
Lines 8436 8658 +222
========================================
+ Hits 4909 5117 +208
- Misses 3527 3541 +14
| Impacted Files | Coverage Δ | |
|---|---|---|
| labgrid/driver/serialdigitaloutput.py | 56.2% <33.3%> (+2.9%) |
:arrow_up: |
| labgrid/driver/smallubootdriver.py | 47.2% <50.0%> (+3.1%) |
:arrow_up: |
| labgrid/driver/shelldriver.py | 28.4% <54.8%> (+1.1%) |
:arrow_up: |
| labgrid/driver/commandmixin.py | 60.0% <73.3%> (+1.0%) |
:arrow_up: |
| labgrid/driver/bareboxdriver.py | 62.7% <100.0%> (+1.5%) |
:arrow_up: |
| labgrid/driver/sshdriver.py | 72.2% <100.0%> (+0.2%) |
:arrow_up: |
| labgrid/driver/ubootdriver.py | 59.3% <100.0%> (+2.2%) |
:arrow_up: |
| labgrid/protocol/commandprotocol.py | 100.0% <100.0%> (ø) |
|
| labgrid/protocol/filetransferprotocol.py | 100.0% <100.0%> (ø) |
|
| labgrid/util/timeout.py | 100.0% <0.0%> (ø) |
|
| ... and 61 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update a630074...ba68a70. Read the comment docs.
Force-push:
- mentioned
codecanddecodeerrorsin CHANGES.rst's "Breaking" section - make
SSHDriver.run()pass timeout argument, set default timeout to 30 as specified by CommandProtocol
Force-push:
- rebased on current master
- remove default timeout of
CommandProtocolrun()andrun_check() - set default timeout of
SSHDriverrun()andrun_check()toNone - moved
decodeerrorstoCommandMixin
Note: the new process handling API being discussed in #552 will return bytes instead of strings. There is no need to decode for (sub)string search or regex matching when this is used.
Force-push: rebased on master
Rebased on current master to fix merge conflict in sshdriver.py.
@Bastian-Krause please recheck the rebase was done correctly.
@Emantor Rebase looks good.
Rebased it once again on current master.
Ping?