Comments (6)
Note: there's also console.sendcontrol("c")
since #981.
from labgrid.
If the shell is busy waiting for a command to terminate, it's obviously not idle. The "open quote" issue should not happen in the first place. Sending Ctrl-C seems pretty intrusive.
What's the concrete issue your facing that makes you want to send Ctrl-C?
from labgrid.
There are cases where a previous test run fails due to a timeout and the Shell is left in a "open quote" state.
When starting a new test run how to recover such a non-idle state?
from labgrid.
This can be done by using a fixture with yield, which will execute your code after the test case was run. Something like (untested):
pytest.fixture(scope="function")
def ensure_stopped(target):
yield
console = target.get_driver("ConsoleProtocol")
console.sendcontrol("c")
def test_needs_to_be_stopped(ensure_stopped,…)
Edit: Updated according to comment from @Bastian-Krause
from labgrid.
Thank you for the helpful input. Indeed, using the underlying ConsoleProtocol allows aborting a process as expected.
However, should it not be the concern of the ShellDriver to fully manage the ConsoleProtocol and also be able to recover from such a case?
from labgrid.
Related Issues (20)
- Installing Labgrid on Raspberry PI HOT 1
- Structuring multiple boards in environment config HOT 10
- ssh error: <name> too long for Unix domain socket HOT 10
- How to create a new resource that can be listed in exporter's yaml?
- labgrid plugin breaks pytest if logging plugin is disabled HOT 3
- Coordinator: Failed to import class 'labgrid.remote.authenticator.AuthenticatorSession HOT 1
- How can we clean the pexpect buffer?
- ManagedFile NFS heuristic doesn't compare canonical paths
- pyyaml 5.4.1 is broken HOT 3
- modbusrtu/dev extras make pyserial overwrite pyserial-labgrid HOT 1
- reservations: get machine-readable place name
- release --kick doesn't clean the reservations table
- Change log level of OpenOCDDriver HOT 10
- Using multiple serial drivers from yaml environment
- Gude EPC 1202 incompatible with existing gude power backends HOT 5
- Trying to set up USBMassStorage labgrid.exceptions.NoSupplierFoundError HOT 6
- BaseProviderDriver sets wrong host for local resources HOT 2
- Add local CAN resource HOT 2
- Add remote CAN resource HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from labgrid.