shawnfeng0 / uorb

C++ inter-thread publish/subscribe middleware ported from PX4 and redesigned based on POSIX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I check the result of the libuorb.a?

korkeep opened this issue Β· comments

Hi, @shawnfeng0 πŸ˜€

I am working on my project of ensuring the security of the uORB.

As a result of the execution of build.sh, I checked that the libuorb.a file was created.

How can I verify that the libuorb.a library is working in the PX4 simulator?

If there is no way to check in the simulator, can you please tell me how to check the test result?

Thank you sincerely πŸ™

This is an independent inter-thread communication library and cannot be directly used in PX4. The uorb library here is ported from PX4 and has been improved.

When you execute build.sh, only the local gcc is used to generate the library, and there is no unit test.

This library is built using cmake and contains examples and tests.

If you want to execute a separate unit test (tests/uorb_unit_test.cc), you can execute the following command in the uorb directory:

mkdir -p build
cd build
cmake -DUORB_BUILD_TESTS=ON ..
make uorb_test
./tests/uorb_test

If you want to use uorb's C++ example (examples/cpp_pub_sub/cpp_pub_sub.cc) execute the following command:

mkdir -p build
cd build
cmake -DUORB_BUILD_EXAMPLES=ON ..
make uorb_example_cpp_pub_sub
./examples/cpp_pub_sub/uorb_example_cpp_pub_sub

I thought everyone was familiar with cmake, so I didn't write it in detail. If you are familiar with cmake, you should be able to understand the entire build process from CMakeLists.txt.