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

Testing: hotfix to recover test coverage CI #11996

Merged
merged 1 commit into from
Jun 14, 2019
Merged

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented May 9, 2019

Describe problem solved by the proposed pull request
CMAKE_TESTING should automatically be enabled but I hoped to do that in the test.cmake target specific options and not in the main CMakeLists. I have to see if I can reorder to have a nicer separation working. Here the hotfix to make CI work again.

Test data / coverage
I tested locally if it properly configures make tests as well as make px4_sitl_test test_results_junit used by CI.

Additional context
https://codecov.io/gh/PX4/Firmware/
@dagar informed me about CI coverage builds failing:
e.g. http://ci.px4.io:8080/blue/organizations/jenkins/PX4_misc%2FFirmware-SITL_tests_coverage/detail/master/310/pipeline/
after #11573 was merged. This was not caught by CI running on the PR because there are additional targets only built on master.

CMAKE_TESTING should automatically be enabled
but I hoped to do that in the test.cmake
target specific options and not in the main
CMakeLists. I have to see if I can make that
order work. Here the hotfix to make CI work
again.
@MaEtUgR MaEtUgR requested a review from dagar May 9, 2019 20:36
@MaEtUgR MaEtUgR self-assigned this May 9, 2019
@dagar
Copy link
Member

dagar commented May 10, 2019

@dagar
Copy link
Member

dagar commented May 10, 2019

This was not caught by CI running on the PR because there are additional targets only built on master.

We could add code coverage back to PR builds for testing feedback.

@MaEtUgR
Copy link
Member Author

MaEtUgR commented May 12, 2019

Can we use this to enable it? We should try to avoid having any scattered CONFIG specific logic.

I agree, the problem is the order:

  • CMAKE_TESTING which can be enabled from the outside also for SITL_default needs to be enabled
  • such that CTest gets included and BUILD_TESTING is defined
  • then the SITL tests, gtest and px4_add_gtest get included

So I probably need to reorder everything and then it should be possible. The only thing that held me back so far is that I wanted to be able to enable testing also with the sitl_default config because it's just a pain to recompile everything the exact same way if you switch the branch once for simulation once for testing. I try to make things more efficient because knowing I've spend ~15% of the time just waiting for recompilation of already existing binaries in a different build folder or getting GPS to lock in simulation is kind of upsetting.

We could add code coverage back to PR builds for testing feedback.

I think it will be useful while adding tests.

@LorenzMeier
Copy link
Member

@MaEtUgR How do we look like here?

@MaEtUgR
Copy link
Member Author

MaEtUgR commented May 29, 2019

@LorenzMeier It's just a hotfix that would get coverage CI going again. I didn't find a good solution for the cmake flags to enable tests. We discussed the possibility to always include all testing in posix which I don't like that much. Maybe I can have a discussion with @julianoes since he lately looked into testing and might have good ideas.

@LorenzMeier LorenzMeier merged commit 146a386 into master Jun 14, 2019
@LorenzMeier LorenzMeier deleted the coverage-hotfix branch June 14, 2019 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants