Open ElenaGrigore opened 1 year ago
I looked at this recently, to clear the pexpect buffer you can simply expect anyting:
serial = target.get("SerialDriver")
serial.expect(r'.+')
This will clear the expect buffer. The problem is that this is timing based, which means that you'll want to wait until the problematic sequences have appeared on the console, and than clean the buffer. So the solution is to probably run the expect in a loop for a certain (target specific) time.
I have the following sequence which fails:
one negative test which:
one test to boot from nfs/tftp
How can I cleanup the environment after test 1 (deactivating drivers serial, uboot, shell doesn't work) ?