-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add functions and objects for Temporary Directories #244
Conversation
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
d4a60be
to
c379ef3
Compare
Codecov Report
@@ Coverage Diff @@
## ign-common4 #244 +/- ##
===============================================
- Coverage 77.03% 77.00% -0.03%
===============================================
Files 74 75 +1
Lines 10586 10655 +69
===============================================
+ Hits 8155 8205 +50
- Misses 2431 2450 +19
Continue to review full report at Codecov.
|
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.
Nice! I just have minor comments, but LGTM.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
…obotics/ign-common into mjcarroll/temp_directory
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
98a1b50
to
386d21d
Compare
Signed-off-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Failure in focal CI is due to flaky test that uses timings. |
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.
This will require switching ignition common to use |
@osrf-jenkins retest this please |
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@ahcorde should be good now. |
@@ -17,6 +17,9 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} | |||
target_include_directories(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE | |||
${ignition-math${IGN_MATH_VER}_INCLUDE_DIRS}) | |||
|
|||
target_include_directories(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC | |||
${ignition-utils${IGN_UTILS_VER}_INCLUDE_DIRS}) |
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.
this means ign-utils1 is now required by the core ignition-common4
library. we should update the find_package call to make this dependency REQUIRED
It is used in a core header since #244. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
this pull request may not work properly on debian buster with armhf: #255 |
🎉 Functions for interacting with temporary directories
Closes #232. Split from #238 to make a version that should be portable to all ign-common4 platforms.
Summary
Adds free functions and a RAII object for interacting with operating system temporary directories. This is useful for writing tests or utilities that need to access a temporary location that can be cleaned up at the end of execution, rather than using build artifact directories or users' home folders.
Free Functions:
tempDirectoryPath()
- retrieve OS-specific location of temporary directorycreateTempDirectory()
- create a directory in thetempDirectoryPath
, expanding template strings where necessary.Obejcts:
TempDirectory
- Object that will create a temporary directory and optionally clean it up when it goes out of scope.Test it
Usage is demonstrated in the
TempDirectory_TEST.cc
unit tests.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge