Host PC Image - MACHINE genericx86-64 - Unit Testing/TDD with Target Application using the Yocto SDK (krikstone)

Enrique Herrera <[email protected]>
Newsgroups org.yoctoproject.lists.poky
Message-ID <AS1P250MB06557FACA8CD7E1BFE0F9052BCF82@AS1P250MB0655.EURP250.PROD.OUTLOOK.COM>
The following blog post link fully describes my current situation.
 Exploring Approaches for Unit Testing with the Yocto SDK – Page Fault Blog<https://pagefault.blog/2023/05/16/exploring-approaches-for-unit-testing-with-the-yocto-sdk/> (https://pagefault.blog/2023/05/16/exploring-approaches-for-unit-testing-with-the-yocto-sdk/)
I made a CMake project that included the Google Test framework. My intention was to implement TDD, test-driven development. The process of TDD for embedded development is not straightforward. Every time you want to run a test, it takes time to deploy test case binaries to the target. For efficient TDD workflow, developers would need immediate feedback from executing the test cases. Running the test case binaries locally on the developer's host machine would be necessary. The SDK that was created based on YOCTO image recipes is intended to build target binaries. Natively building targeted application libraries in the SDK is possible. However. The build environment setup can be a mess. I know I couldn't get it to work.
I followed the recommended solution for the 'Page Fault Blog' post. Basically, set MACHINE configuration variable to "genericax86-64". The libraries that were generated in SDK for your PC will match those in your target image.  Despite my efforts, the binaries I built using this SDK did not function properly.

[r/yocto -  Unit Testing/TDD with Target Application using the Yocto SDK]<https://preview.redd.it/unit-testing-tdd-with-target-application-using-the-yocto-sdk-v0-jvsedi5ope4d1.png?width=594&format=png&auto=webp&s=65b80e3becb3defeda4eda4e6cada09147ad2802>
When I tried to run the binary, I get "No such file or directory".
I found a Stack Overflow<https://stackoverflow.com/questions/46787700/controlling-architecture-in-resulting-rpms> post about issues building generic x86_64 targets, by setting DEFAULTTUNE:genericx86-64 ?= "x86-64" .  Still, i get the same result.
 I cannot be the only one who tried test driven development with YOCTO project..



Enrique Herrera
Sr. Software Engineer

Embedded Software & Firmware Technical Lead


Internal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.