| # Copyright 2023 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/python/python_mobly_test.gni") |
| import("//build/testing/environments.gni") |
| |
| if (is_host) { |
| python_mobly_test("soft_reboot_test") { |
| main_source = "test_soft_reboot.py" |
| libraries = [ |
| "//src/testing/end_to_end/honeydew", |
| "//src/testing/end_to_end/mobly_base_tests:fuchsia_base_test", |
| ] |
| params = { |
| num_reboots = 1 |
| } |
| enable_hermetic_exe = true |
| environments = [ |
| # Only enable for AEMU-x64 as host-tests aren't supported on QEMU-arm64. |
| aemu_env, |
| vim3_env, |
| nuc11_env, |
| nelson_env, |
| ] |
| } |
| |
| # It uses "fuchsia-controller" to reboot the device. However, once device comes |
| # back up, it starts SL4F server and sends an SL4F request. |
| # Thus this test will ensure SL4F functionality in Honeydew is still working. |
| # Note - To run this test in CQ, ensure builder config has SL4F as dependency. |
| python_mobly_test("soft_reboot_test_sl4f") { |
| main_source = "test_soft_reboot.py" |
| libraries = [ |
| "//src/testing/end_to_end/honeydew", |
| "//src/testing/end_to_end/mobly_base_tests:fuchsia_base_test", |
| ] |
| params = { |
| num_reboots = 1 |
| } |
| |
| # FuchsiaDevice to use SL4F, include below config |
| honeydew_config = { |
| affordances = { |
| bluetooth = { |
| implementation = "sl4f" |
| } |
| wlan = { |
| implementation = "sl4f" |
| } |
| } |
| } |
| |
| environments = [ |
| # Only enable for AEMU-x64 as host-tests aren't supported on QEMU-arm64. |
| aemu_env, |
| ] |
| } |
| } |
| |
| group("test_soft_reboot_sl4f") { |
| testonly = true |
| deps = [ |
| ":soft_reboot_test_sl4f($host_toolchain)", |
| "../../honeydew:sl4f_packages", |
| ] |
| } |
| |
| # Group containing all of the soft reboot test cases and their dependencies. |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":soft_reboot_test($host_toolchain)", |
| ":soft_reboot_test.hermetic($host_toolchain)", |
| ":test_soft_reboot_sl4f", |
| ] |
| } |