-
Notifications
You must be signed in to change notification settings - Fork 98
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
Replace PROJECT_SOURCE_DIR in tests #460
Conversation
212de38
to
e7dd7ce
Compare
This allows the test files to be loaded in a more abstracted way, so that it is less dependant on the way that CMake works. Signed-off-by: Michael Carroll <[email protected]>
e7dd7ce
to
eea81be
Compare
Signed-off-by: Michael Carroll <[email protected]>
Codecov Report
@@ Coverage Diff @@
## sdf10 #460 +/- ##
=======================================
Coverage 87.78% 87.78%
=======================================
Files 62 62
Lines 9577 9577
=======================================
Hits 8407 8407
Misses 1170 1170 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.
Thanks @mjcarroll. This is great! Makes tests a lot cleaner.
test/test_config.h.in
Outdated
bool ProjectSourcePath(std::string &_sourceDir) | ||
{ | ||
// Bazel builds set TEST_SRCDIR | ||
if(char* dataDir = std::getenv("TEST_SRCDIR")) |
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.
windows CI doesn't like this getenv
call
'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead.
To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
https://build.osrfoundation.org/job/sdformat-ci-pr_any-windows7-amd64/1825/msbuild/
This adds some environment variable manipulation functions from ignition::common. These may be deprecated when sdformat and ignition::common have a common dependency in ignition::utils. Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
cb01c38
to
9a5cc57
Compare
Signed-off-by: Michael Carroll <[email protected]>
7134002
to
2bee092
Compare
Signed-off-by: Michael Carroll <[email protected]>
This allows the test files to be loaded in a more abstracted way,
so that it is less dependant on the way that CMake works.
Signed-off-by: Michael Carroll [email protected]