-
Notifications
You must be signed in to change notification settings - Fork 179
Initial port of UnitTest++ to VxWorks 5.5. #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
….cpp compiles but its tests don't build for VxWorks
Added mention of VxWorks 5.5 in supported OSes list.
Ah, VxWorks. Thanks for the PR. I'm happy to incorporate changes to support VxWorks; worked with it once myself. I'm going to take a closer look sometime soon, but my first question is: Why do we need all of the VxWorks toolchain-specific project files? Is there no combination of CMake options that will work? For example, could you incorporate a custom toolchain file into your process? Or perhaps just use the Unix Makefile generator with the compiler and linker options set correctly? |
|
||
Timer::Timer() | ||
{ | ||
m_startTime.tv_sec = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer initializing members in the constructor initializer list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that can be done but I just implemented it in the same way as done in the Posix version of TimeHelpers.cpp.
Overall my main concern with this stands; the VxWorks toolchain-specific project files ideally don't belong here. I'd be happy to discuss elsewhere how we might manage this; perhaps we can spin up a new repository within the organization that @sulemankm could maintain? Even if we solve that problem, there's not currently a way to 'inject' the TimeHelper class into the build. |
Actually tornado generates a Makefile which can used to build it for Vxworks. However, Tornado/VxWorks toolchain installation is required for building the framework and test anyway. So as installation of Tornado/VxWorks toolchain is a must, then Tornado project fils would come in handy for building the UnitTest++ framework and tests. Pardon my ignorance but, I'm not really sure what you mean by not being able to "inject" the TimeHelper class into the build. |
By "inject" I was hinting at dependency injection; right now the correct |
Ok, I got your point about injecting dependencies. About the build solution, I think pre-compile-time selection of the appropriate header file is probably the easiest solution. |
@sulemankm sorry I left this unattended for so long. I'm interested in making some of these changes but not all of them. If we can get rid of the VxWorks project files, and figure out how to address the |
How about GetResults return an object with an overloaded [] operator which internally calls the .at() method for vxWorks. Just a wild idea. I haven't tried it so I'm not sure if it is even feasible. Just a wild idea! |
UnitTest++ ported to VxWorks 5.5. All tests pass on VxWorks 5.5.