GTEST v. my external watchdog

80 views
Skip to first unread message

Jason Braley

unread,
Jun 13, 2016, 12:38:59 PM6/13/16
to Google C++ Testing Framework
So, I'm running some hardware tests using a GTEST binary deployed in a semihosted mode to my target hardware platform. Everything works great, except...

....when I get a failure with my external watchdog enabled, the external watchdog expires and resets my device before GTEST has a chance to dump any of its test data back to the host, even if I disable the watchdog on the next line after an EXPECT_xxx call.  I've worked my way around it by doing simple logical tests and then disabling the watchdog before calling FAIL, but it feels like a little bit of a hack. Has anyone else run into this problem? Is there any way to maybe insert a cleanup callback into the assert_/expect_ calls?

Samuel Benzaquen

unread,
Jun 13, 2016, 12:44:48 PM6/13/16
to Jason Braley, Google C++ Testing Framework
On Tue, Jun 7, 2016 at 11:57 AM, Jason Braley <jason...@gmail.com> wrote:
So, I'm running some hardware tests using a GTEST binary deployed in a semihosted mode to my target hardware platform. Everything works great, except...

....when I get a failure with my external watchdog enabled, the external watchdog expires and resets my device before GTEST has a chance to dump any of its test data back to the host, even if I disable the watchdog on the next line after an EXPECT_xxx call.  I've worked my way around it by doing simple logical tests and then disabling the watchdog before calling FAIL, but it feels like a little bit of a hack. Has anyone else run into this problem? Is there any way to maybe insert a cleanup callback into the assert_/expect_ calls?

What is the watchdog watching? A timeout? or is it some kind of sandbox?
How are you trying to "dump any of its test data back to the host"?
Seems like these two (the watchdog and the dumping) are in conflict somehow.
_Sam

--

---
You received this message because you are subscribed to the Google Groups "Google C++ Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Braley

unread,
Jun 13, 2016, 3:19:13 PM6/13/16
to Google C++ Testing Framework
The external watchdog is watching the processor to make sure it's not somehow accidentally running wild while controlling a motor. It's a risk mitigation.

I'm running the tests from an Ubuntu box that uses OpenOCD to deploy and then run the tests through the JTAG on my development board in semihosted mode. When GTEST spits out test data to stdout, that data gets routed back to the console through OpenOCD. I think you're right that the data dumping is in conflict with the watchdog. I think I'll try writing a test listener that just dumps test results data to a memory area instead of to stdout. Then I can output that data after the test completes. Thanks.
Reply all
Reply to author
Forward
0 new messages