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
26bac959
Commit
26bac959
authored
6 years ago
by
Daniel Agar
Browse files
Options
Downloads
Patches
Plain Diff
add simple SITL shutdown test
parent
48ba88ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platforms/posix/cmake/sitl_tests.cmake
+15
-1
15 additions, 1 deletion
platforms/posix/cmake/sitl_tests.cmake
posix-configs/SITL/init/test/test_shutdown
+95
-0
95 additions, 0 deletions
posix-configs/SITL/init/test/test_shutdown
with
110 additions
and
1 deletion
platforms/posix/cmake/sitl_tests.cmake
+
15
−
1
View file @
26bac959
...
...
@@ -76,9 +76,23 @@ add_test(NAME mavlink
set_tests_properties
(
mavlink PROPERTIES FAIL_REGULAR_EXPRESSION
"mavlink FAILED"
)
set_tests_properties
(
mavlink PROPERTIES PASS_REGULAR_EXPRESSION
"mavlink PASSED"
)
sanitizer_fail_test_on_error
(
mavlink
)
# Shutdown test
add_test
(
NAME shutdown
COMMAND
${
PX4_SOURCE_DIR
}
/Tools/sitl_run.sh
$<TARGET_FILE:px4>
none
none
test_shutdown
${
PX4_SOURCE_DIR
}
${
PX4_BINARY_DIR
}
WORKING_DIRECTORY
${
SITL_WORKING_DIR
}
)
#set_tests_properties(shutdown PROPERTIES FAIL_REGULAR_EXPRESSION "shutdown FAILED")
set_tests_properties
(
shutdown PROPERTIES PASS_REGULAR_EXPRESSION
"Shutting down"
)
sanitizer_fail_test_on_error
(
shutdown
)
# run arbitrary commands
set
(
test_cmds
hello
...
...
This diff is collapsed.
Click to expand it.
posix-configs/SITL/init/test/test_shutdown
0 → 100644
+
95
−
0
View file @
26bac959
#!/bin/sh
# PX4 commands need the 'px4-' prefix in bash.
# (px4-alias.sh is expected to be in the PATH)
.
px4-alias.sh
uorb start
param load
param
set
BAT_N_CELLS 3
param
set
MAV_TYPE 22
param
set
VT_TYPE 2
param
set
SYS_RESTART_TYPE 0
dataman start
simulator start
-t
tone_alarm start
gyrosim start
accelsim start
barosim start
gpssim start
measairspeedsim start
pwm_out_sim start
sensors start
commander start
land_detector start vtol
navigator start
ekf2 start
vtol_att_control start
mc_pos_control start
mc_att_control start
fw_pos_control_l1 start
fw_att_control start
wind_estimator start
#mixer load /dev/pwm_output0 ROMFS/sitl/mixers/standard_vtol_sitl.main.mix
ver all
logger start
-e
-t
mavlink boot_complete
sleep
2
echo
"Boot complete"
# status of all running modules
echo
"Checking status of all modules"
logger status
pwm_out_sim status
sensors status
commander status
land_detector status
navigator status
ekf2 status
mc_pos_control status
mc_att_control status
fw_pos_control_l1 status
fw_att_control status
wind_estimator status
dataman status
uorb status
# stop all
echo
"Stopping all modules"
logger stop
pwm_out_sim stop
mc_att_control stop
fw_att_control stop
mc_pos_control stop
fw_pos_control_l1 stop
navigator stop
commander stop
land_detector stop
ekf2 stop
wind_estimator stop
sensors stop
sleep
2
simulator stop
tone_alarm stop
gyrosim stop
#accelsim stop
#barosim stop
gpssim stop
measairspeedsim stop
dataman stop
#uorb stop
shutdown
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