mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
GH Actions: Enable grind option
This allows to run the script in grind mode to find CI failures that are triggered through e.g. race conditions.
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.5.1)
|
||||
|
||||
find_package(MAVSDK)
|
||||
if(${PX4_BOARD_MODEL} MATCHES "sitl")
|
||||
find_package(MAVSDK QUIET)
|
||||
|
||||
if (MAVSDK_FOUND)
|
||||
add_executable(mavsdk_tests
|
||||
test_main.cpp
|
||||
autopilot_tester.cpp
|
||||
test_mission_multicopter.cpp
|
||||
)
|
||||
if (MAVSDK_FOUND)
|
||||
add_executable(mavsdk_tests
|
||||
test_main.cpp
|
||||
autopilot_tester.cpp
|
||||
test_mission_multicopter.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mavsdk_tests
|
||||
MAVSDK::mavsdk
|
||||
MAVSDK::mavsdk_action
|
||||
MAVSDK::mavsdk_mission
|
||||
MAVSDK::mavsdk_telemetry
|
||||
)
|
||||
target_link_libraries(mavsdk_tests
|
||||
MAVSDK::mavsdk
|
||||
MAVSDK::mavsdk_action
|
||||
MAVSDK::mavsdk_mission
|
||||
MAVSDK::mavsdk_telemetry
|
||||
)
|
||||
|
||||
target_compile_options(mavsdk_tests
|
||||
PRIVATE -std=c++17 -Wall -Wextra -Werror)
|
||||
target_compile_options(mavsdk_tests
|
||||
PRIVATE -std=c++17 -Wall -Wextra -Werror)
|
||||
else()
|
||||
message("MAVSDK C++ not found, skipping mavsdk_tests build..")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -243,12 +243,6 @@ def main():
|
||||
|
||||
returncode = test_runner.wait(group['timeout_min'])
|
||||
was_success = (returncode == 0)
|
||||
print("Test '{}': {}".
|
||||
format(test, "Success" if was_success else "Fail"))
|
||||
if not was_success:
|
||||
overall_success = False
|
||||
if args.fail_early:
|
||||
break
|
||||
|
||||
if args.gui:
|
||||
returncode = gzclient_runner.stop()
|
||||
@@ -260,7 +254,16 @@ def main():
|
||||
px4_runner.stop()
|
||||
print("px4 exited with {}".format(returncode))
|
||||
|
||||
if not overall_success and x > 0:
|
||||
# Test run results
|
||||
print("Test '{}': {}".
|
||||
format(test, "Success" if was_success else "Fail"))
|
||||
|
||||
# Flag it as group test failure, but finish the rest of the test targets
|
||||
if not was_success:
|
||||
overall_success = False
|
||||
|
||||
# Abort after the full matrix / test group
|
||||
if not overall_success and x > 0 and args.fail_early:
|
||||
print("Aborting with a failure in test run %d" % (x + 1))
|
||||
sys.exit(0 if overall_success else 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user