Skip to content
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

Merged
merged 8 commits into from
Jan 21, 2021
Merged

Replace PROJECT_SOURCE_DIR in tests #460

merged 8 commits into from
Jan 21, 2021

Conversation

mjcarroll
Copy link
Contributor

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 michael@openrobotics.org

@github-actions github-actions bot added 🏢 edifice Ignition Edifice 🔮 dome Ignition Dome labels Jan 12, 2021
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 <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@codecov-io
Copy link

codecov-io commented Jan 12, 2021

Codecov Report

Merging #460 (2bee092) into sdf10 (2cf2c8c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2cf2c8c...2bee092. Read the comment docs.

@azeey azeey self-requested a review January 12, 2021 23:24
Copy link
Collaborator

@azeey azeey left a 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 Show resolved Hide resolved
test/integration/link_dom.cc Outdated Show resolved Hide resolved
test/test_config.h.in Outdated Show resolved Hide resolved
test/test_config.h.in Outdated Show resolved Hide resolved
test/test_config.h.in Outdated Show resolved Hide resolved
test/test_config.h.in Outdated Show resolved Hide resolved
test/integration/includes.cc Outdated Show resolved Hide resolved
test/test_config.h.in Outdated Show resolved Hide resolved
bool ProjectSourcePath(std::string &_sourceDir)
{
// Bazel builds set TEST_SRCDIR
if(char* dataDir = std::getenv("TEST_SRCDIR"))
Copy link
Member

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 <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll mjcarroll merged commit 97a2be6 into sdf10 Jan 21, 2021
@mjcarroll mjcarroll deleted the test_support_bazel branch January 21, 2021 00:32
@azeey azeey mentioned this pull request Mar 18, 2021
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome 🏢 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants