Sysprogs forums › Forums › VisualGDB › Enable GDB Python support
- This topic has 4 replies, 2 voices, and was last updated 8 years, 1 month ago by
tw39124.
-
AuthorPosts
-
July 26, 2017 at 16:37 #11836
tw39124
ParticipantHi,
I am trying to write some scripts to do automated white-box testing of our embedded projects using VisualGDB (using your pre-built SysGCC toolchain). I’d like to do things like automatically set breakpoints, start/stop execution, inspect and modify variable values, prompt the user for input and print the results of the automated tests. However, the standard GDB scripting support (https://sourceware.org/gdb/onlinedocs/gdb/Command-Files.html) is pretty basic, especially when it comes to user interaction. GDB does provide a rich Python API, but requires GDB to have been compiled with the “–with-python” flag. Being able to use Python would make the job of writing these automated scripts much easier. Is it possible that could you enable Python support in the pre-built SysGCC binaries that you distribute?
Thanks.
July 27, 2017 at 00:06 #11841support
KeymasterHi,
VisualGDB actually allows running unit tests directly on embedded devices with no special scripting required: https://visualgdb.com/tutorials/tests/arm/
We would recommend using this functionality instead of scripting it manually. If this does not work, we would be happy to hear feedback and suggestions on improving our unit testing framework to support your case.
July 27, 2017 at 11:49 #11848tw39124
ParticipantSorry, perhaps I should have clarified what I meant by “white-box testing”. What I am trying to do is not unit testing, it is more like integration testing
- Injecting fault conditions by breakpointing and modifying variables
- Simulating hardware faults
- Checking that certain code paths are executed when system input occurs
We already use Unity for unit tests which works fine, but obviously it only tests isolated software components, not the software application as a whole. That is what this integration testing is intended to do, and why we ideally need to be able to write scripts to automate this procedure.
August 22, 2017 at 17:22 #12145support
KeymasterHi,
Just wanted to let you know that we have added support for embedded integration tests to VisualGDB 5.3 Preview 7. The tests use a mechanism similar to what you described – VisualGDB will record your actions while you step through the program, let you add custom checks and then automatically reply recorded actions when running the tests. Feel free to give it a try and let us know if you miss any functionality.
September 21, 2017 at 09:36 #12469tw39124
ParticipantWow. I’ve not tried it yet, but this looks like exactly what I’m after, thanks. I will give it a go and provide feedback.
-
AuthorPosts
- You must be logged in to reply to this topic.