Hey all,
I'm starting to implement OTA updates and am wondering if it's possible to write the OTA first boot verification tests in Unity. I have been meaning to write unit tests for a while, so it seems like this is a two birds one stone type of situation.
The only problem is that I don't see any facilities for running Unity tests within my production firmware and getting out a simple boolean result (pass/fail). It doesn't help that Unity apparently has no (or very little, if it exists) developer documentation. Does anyone have experience doing this, or even an idea?
P.S. I realize I could just run the unit tests within my OTA first-boot self-test function, and if the tests fail and the system aborts then the image will not be marked valid, but this seems far from an elegant solution.
EDIT: Figured it out. Manipulating Unity manually (UNITY_BEGIN() and UNITY_END()) returns the number of tests failed.
[SOLVED] Writing OTA bootup tests in Unity
-
- Posts: 10
- Joined: Mon Oct 28, 2019 9:04 pm
Who is online
Users browsing this forum: No registered users and 149 guests