Skip to main content

How to get status of practice script over pyrcl - Community / Test Automation - Lauterbach Support

1

How to get status of practice script over pyrcl Awaiting Agent

Hello,
I am trying to get the status of a PRACTICE-script over the python-api.
For example:
dbg.cmd("DO ~~/demo/tricore/flash/tc39x.cmm CPU=TC397X PREPAREONLY")
The script take a few seconds to execute and I would like to poll the status and wait until the script is finished before next step.
regards,
Andreas

Comments (3)

Wiem Wala Benayed
You need to use cmm instead of cmd dbg.cmm("DO ~~/demo/tricore/flash/tc39x.cmm CPU=TC397X PREPAREONLY")
Andreas Wikerstal
thank you. It worked fine using the timeout feature (timeout: None) to wait to complete execution. Can you also query the return status e.g. if the script breaks? Where can I read-up on return status on running practice-scripts over the python-API?
Wiem Wala Benayed
You can use a global macro: You need to add in your PRACTICE script: GLOBAL &foo &foo="OK" Then you can read the value in Python: foo = dbg.practice.get_macro("&foo")

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image