-
Notifications
You must be signed in to change notification settings - Fork 20
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
Move test cache to build folder #222
Conversation
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## ign-fuel-tools4 #222 +/- ##
================================================
Coverage 77.90% 77.90%
================================================
Files 19 19
Lines 2715 2715
================================================
Hits 2115 2115
Misses 600 600 Continue to review full report at Codecov.
|
We don't currently depend on |
Must have been thinking of a different library, we do actually depend on ign-common. |
Good idea. We'd have to backport that to One thing to point out though is that the cache isn't deleted here between tests. That's helpful when debugging test failures so the user can inspect the cache after running a test. I don't think it's extremely necessary though. |
The |
Oh nice! An env var could be helpful, I personally don't mind adding a line while debugging to avoid cleanup though, good to know it's exposed through the API |
* Improve and fix ResultType tests (#225) Signed-off-by: Louise Poubel <louise@openrobotics.org> * Move test cache to build folder (#222) Signed-off-by: Louise Poubel <louise@openrobotics.org> * More checks when manipulating file system in tests (#227) Signed-off-by: Louise Poubel <louise@openrobotics.org>
🦟 Bug fix
Summary
While debugging a test failure, I noticed that the tests in
ign_src_TEST
would fail if run from outside the build directory. So I fixed this by passingPROJECT_BINARY_PATH
to all the places where thetest_cache
is accessed. In order to reduce duplication, I moved that logic to theSetUp
function. While at it, I reduced more duplication by moving theIO
functions toSetUp
/TearDown
.The fix can be checked by running the test from a directory other than
build
, for example:./build/ignition-fuel_tools5/bin/UNIT_ign_src_TEST
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.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸