-
Notifications
You must be signed in to change notification settings - Fork 40
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
Install the common test executables to libexec #458
Conversation
This makes the cmake code more readable. Signed-off-by: Steve Peters <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-physics6 #458 +/- ##
============================================
Coverage 75.82% 75.82%
============================================
Files 140 140
Lines 7066 7066
============================================
Hits 5358 5358
Misses 1708 1708 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
049886a
to
79b5727
Compare
Signed-off-by: Steve Peters <[email protected]>
Also build the test_lib_loader as static library since the tests link against it. Signed-off-by: Steve Peters <[email protected]>
79b5727
to
45ddfac
Compare
I've updated |
this is ready for review |
test/common_test/TestLibLoader.hh
Outdated
} | ||
} | ||
|
||
std::string gz::physics::TestLibLoader::libToTest = std::string(""); |
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.
Defining a static variable in a header can be problematic. I recommend putting the variable in a private function and make it a singleton.
private: static std::string& TestLibLoader::LibToTest()
{
static std::string libToTest = "";
return libToTest;
}
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.
how does 18f950c look?
Signed-off-by: Steve Peters <[email protected]>
Follow-up to #15 and gazebosim/gz-physics#458. Signed-off-by: Steve Peters <[email protected]>
🎉 New feature
Part of #50 (comment)
Summary
This installs the
COMMON_TEST_*
executables to a subfolder oflibexec
following the pattern used by the standalone executables added in gazebosim/gz-transport#216. This will allow these tests to be used by external implementers ofgz-physics
plugins. Thetest_lib_loader
library is changed to a static library as well since these executables link against it.Remaining tasks:
resources
folder used by some testsworlds
folder used by some testsTest it
<prefix>/libexec/gz/physics6/COMMON_TEST_construct_empty_world <prefix>/lib/libgz-physics6-dartsim-plugin.<suffix>
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.