Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
5de5d6ea
Commit
5de5d6ea
authored
6 years ago
by
Daniel Agar
Browse files
Options
Downloads
Patches
Plain Diff
Jenkins simple mission code coverage build
parent
1b539643
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Jenkinsfile
+18
-0
18 additions, 0 deletions
Jenkinsfile
Makefile
+8
-1
8 additions, 1 deletion
Makefile
cmake/common/coverage.cmake
+3
-3
3 additions, 3 deletions
cmake/common/coverage.cmake
platforms/posix/cmake/sitl_tests.cmake
+2
-1
2 additions, 1 deletion
platforms/posix/cmake/sitl_tests.cmake
with
31 additions
and
5 deletions
Jenkinsfile
+
18
−
0
View file @
5de5d6ea
...
...
@@ -225,6 +225,24 @@ pipeline {
}
}
stage
(
'test mission (code coverage)'
)
{
agent
{
docker
{
image
'px4io/px4-dev-ros:2018-03-30'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps
{
sh
'export'
sh
'make distclean; rm -rf .ros; rm -rf .gazebo'
sh
'make tests_mission_coverage'
withCredentials
([
string
(
credentialsId:
'FIRMWARE_CODECOV_TOKEN'
,
variable:
'CODECOV_TOKEN'
)])
{
sh
'curl -s https://codecov.io/bash | bash -s'
}
sh
'make distclean'
}
}
stage
(
'check stack'
)
{
agent
{
docker
{
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
8
−
1
View file @
5de5d6ea
...
...
@@ -279,7 +279,7 @@ format:
# Testing
# --------------------------------------------------------------------
.PHONY
:
tests tests_coverage tests_mission tests_offboard rostest
.PHONY
:
tests tests_coverage tests_mission
tests_mission_coverage
tests_offboard rostest
tests
:
@$(
MAKE
)
--no-print-directory
posix_sitl_default test_results
\
...
...
@@ -302,6 +302,13 @@ rostest: posix_sitl_default
tests_mission
:
rostest
@$(
SRC_DIR
)
/test/rostest_px4_run.sh mavros_posix_tests_missions.test
tests_mission_coverage
:
@$(
MAKE
)
clean
@$(
MAKE
)
--no-print-directory
posix_sitl_default
PX4_CMAKE_BUILD_TYPE
=
Coverage
@$(
MAKE
)
--no-print-directory
posix_sitl_default sitl_gazebo
PX4_CMAKE_BUILD_TYPE
=
Coverage
@$(
SRC_DIR
)
/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:
=
vtol_new_1 vehicle:
=
standard_vtol
@$(
MAKE
)
--no-print-directory
posix_sitl_default generate_coverage
tests_offboard
:
rostest
@$(
SRC_DIR
)
/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
@$(
SRC_DIR
)
/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
...
...
This diff is collapsed.
Click to expand it.
cmake/common/coverage.cmake
+
3
−
3
View file @
5de5d6ea
...
...
@@ -69,15 +69,15 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
message
(
FATAL_ERROR
"genhtml required"
)
endif
()
set
(
coverage_info
"
${
CMAKE_BINARY_DIR
}
/
coverage
.info"
)
set
(
coverage_info
"
${
CMAKE_BINARY_DIR
}
/
${
_outputname
}
.info"
)
set
(
coverage_cleaned
"
${
coverage_info
}
.cleaned"
)
separate_arguments
(
test_command UNIX_COMMAND
"
${
_testrunner
}
"
)
# Setup target
add_custom_
COMMAND
(
OUTPUT
${
coverage_info
}
add_custom_
command
(
OUTPUT
${
coverage_info
}
# Cleanup lcov
COMMAND
${
LCOV_PATH
}
--quiet --directory . --zerocounters
#
COMMAND ${LCOV_PATH} --quiet --directory . --zerocounters
# Run tests
COMMAND
${
test_command
}
${
ARGV3
}
...
...
This diff is collapsed.
Click to expand it.
platforms/posix/cmake/sitl_tests.cmake
+
2
−
1
View file @
5de5d6ea
...
...
@@ -95,7 +95,8 @@ add_custom_target(test_results
set_target_properties
(
test_results PROPERTIES EXCLUDE_FROM_ALL TRUE
)
if
(
CMAKE_BUILD_TYPE STREQUAL Coverage
)
setup_target_for_coverage
(
test_coverage
"
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -T Test"
coverage.info
)
setup_target_for_coverage
(
test_coverage
"
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -T Test"
tests
)
setup_target_for_coverage
(
generate_coverage
"
${
CMAKE_COMMAND
}
-E echo"
generic
)
endif
()
add_custom_target
(
test_results_junit
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment