summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-11-14 12:38:56 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-15 22:19:52 +0000
commit246e04cd38a1b9cb47881306892cde1e5253d31b (patch)
treec99811a6426dbc39fdcc980b0c83a7cccdccfe67 /zephyr
parentfa094b5db8c7aa5df81c6be73dab7be577417458 (diff)
downloadchrome-ec-246e04cd38a1b9cb47881306892cde1e5253d31b.tar.gz
zephyr/test: Sort header files
Sort all headers in zephyr/test with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=CQ Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I2428eea11e18ee4bed6bc366fd69d4254d936c10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022253 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/test/ap_power/src/ap_pwrseq.c13
-rw-r--r--zephyr/test/ap_power/src/board.c2
-rw-r--r--zephyr/test/ap_power/src/console_command.c6
-rw-r--r--zephyr/test/ap_power/src/events.c14
-rw-r--r--zephyr/test/ap_power/src/hibdelay.c6
-rw-r--r--zephyr/test/ap_power/src/hibernate.c12
-rw-r--r--zephyr/test/ap_power/src/host_command.c4
-rw-r--r--zephyr/test/ap_power/src/main.c5
-rw-r--r--zephyr/test/ap_power/src/signals.c20
-rw-r--r--zephyr/test/ap_power/src/test_mocks.c4
-rw-r--r--zephyr/test/crc/main.c4
-rw-r--r--zephyr/test/drivers/anx7447/src/low_power_mode.c6
-rw-r--r--zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c6
-rw-r--r--zephyr/test/drivers/ap_vdm_control/src/ap_vdm_control.c13
-rw-r--r--zephyr/test/drivers/button/src/main.c10
-rw-r--r--zephyr/test/drivers/chargesplash/src/chargesplash.c19
-rw-r--r--zephyr/test/drivers/common/include/test/drivers/stubs.h3
-rw-r--r--zephyr/test/drivers/common/include/test/drivers/utils.h15
-rw-r--r--zephyr/test/drivers/common/src/main.c5
-rw-r--r--zephyr/test/drivers/common/src/stubs.c6
-rw-r--r--zephyr/test/drivers/common/src/test_mocks.c4
-rw-r--r--zephyr/test/drivers/common/src/test_rules.c4
-rw-r--r--zephyr/test/drivers/common/src/utils.c16
-rw-r--r--zephyr/test/drivers/common_cbi/src/test_common_cbi.c8
-rw-r--r--zephyr/test/drivers/common_cbi_gpio/src/test_common_cbi_gpio.c4
-rw-r--r--zephyr/test/drivers/common_charger/src/test_charge_state_v2.c4
-rw-r--r--zephyr/test/drivers/common_charger/src/test_common_charger.c8
-rw-r--r--zephyr/test/drivers/common_charger/src/test_common_charger_mocked.c11
-rw-r--r--zephyr/test/drivers/console/src/shell.c8
-rw-r--r--zephyr/test/drivers/default/src/battery.c10
-rw-r--r--zephyr/test/drivers/default/src/bb_retimer.c17
-rw-r--r--zephyr/test/drivers/default/src/bc12.c16
-rw-r--r--zephyr/test/drivers/default/src/bma2x2.c13
-rw-r--r--zephyr/test/drivers/default/src/bmi160.c15
-rw-r--r--zephyr/test/drivers/default/src/bmi260.c15
-rw-r--r--zephyr/test/drivers/default/src/bmi_common.c8
-rw-r--r--zephyr/test/drivers/default/src/charge_manager.c4
-rw-r--r--zephyr/test/drivers/default/src/charge_state_prevent_power_on.c4
-rw-r--r--zephyr/test/drivers/default/src/console.c12
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/accelinfo.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/accelinit.c8
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/accelrange.c8
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/accelrate.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/accelread.c8
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/accelres.c8
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/accelspoof.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/adc.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/battery.c8
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/button.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/cbi.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/charge_manager.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/charge_state.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/chargen.c17
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/charger.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/crash.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/cutoff.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/ec_features.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/gpio.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/hcdebug.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/hibdelay.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/hostevent.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/i2c_portmap.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/md.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/panic_output.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/port80.c11
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/power_button.c1
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/powerindebug.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/pwr_avg.c10
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/rtc.c4
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/rw.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/shared_mem.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/sleepmask.c10
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/sleeptimeout.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/switch.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/sysinfo.c12
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/tcpci_dump.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/usb_pd_console.c6
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/vboot_hash.c13
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/version.c10
-rw-r--r--zephyr/test/drivers/default/src/console_cmd/waitms.c7
-rw-r--r--zephyr/test/drivers/default/src/cros_cbi.c6
-rw-r--r--zephyr/test/drivers/default/src/espi.c11
-rw-r--r--zephyr/test/drivers/default/src/flash.c14
-rw-r--r--zephyr/test/drivers/default/src/gpio.c15
-rw-r--r--zephyr/test/drivers/default/src/i2c.c6
-rw-r--r--zephyr/test/drivers/default/src/i2c_passthru.c6
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb.c10
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c4
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c7
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c10
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_attach_src_snk.c16
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_pd_bist_shared.c4
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c7
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_pd_rev3.c8
-rw-r--r--zephyr/test/drivers/default/src/isl923x.c10
-rw-r--r--zephyr/test/drivers/default/src/led.c11
-rw-r--r--zephyr/test/drivers/default/src/lid_angle.c4
-rw-r--r--zephyr/test/drivers/default/src/lid_switch.c15
-rw-r--r--zephyr/test/drivers/default/src/lis2dw12.c5
-rw-r--r--zephyr/test/drivers/default/src/ln9310.c16
-rw-r--r--zephyr/test/drivers/default/src/locate_chip.c10
-rw-r--r--zephyr/test/drivers/default/src/motion_sense/motion_sense.c4
-rw-r--r--zephyr/test/drivers/default/src/panic.c11
-rw-r--r--zephyr/test/drivers/default/src/panic_output.c4
-rw-r--r--zephyr/test/drivers/default/src/port80.c11
-rw-r--r--zephyr/test/drivers/default/src/power_common.c29
-rw-r--r--zephyr/test/drivers/default/src/ppc_sn5s330.c16
-rw-r--r--zephyr/test/drivers/default/src/ppc_syv682x.c20
-rw-r--r--zephyr/test/drivers/default/src/ps8xxx.c17
-rw-r--r--zephyr/test/drivers/default/src/smart.c17
-rw-r--r--zephyr/test/drivers/default/src/stm_mems_common.c11
-rw-r--r--zephyr/test/drivers/default/src/tablet_mode.c10
-rw-r--r--zephyr/test/drivers/default/src/task.c4
-rw-r--r--zephyr/test/drivers/default/src/tcpci.c13
-rw-r--r--zephyr/test/drivers/default/src/tcpci_test_common.c7
-rw-r--r--zephyr/test/drivers/default/src/tcs3400.c13
-rw-r--r--zephyr/test/drivers/default/src/temp_sensor.c20
-rw-r--r--zephyr/test/drivers/default/src/thermistor.c15
-rw-r--r--zephyr/test/drivers/default/src/uart_hostcmd.c8
-rw-r--r--zephyr/test/drivers/default/src/usb_mux.c23
-rw-r--r--zephyr/test/drivers/default/src/util.c8
-rw-r--r--zephyr/test/drivers/default/src/vboot_hash.c9
-rw-r--r--zephyr/test/drivers/default/src/virtual_battery.c6
-rw-r--r--zephyr/test/drivers/default/src/vstore.c15
-rw-r--r--zephyr/test/drivers/default/src/watchdog.c17
-rw-r--r--zephyr/test/drivers/dps/src/dps.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/adc.c8
-rw-r--r--zephyr/test/drivers/host_cmd/src/battery_cut_off.c6
-rw-r--r--zephyr/test/drivers/host_cmd/src/battery_display_soc.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/battery_v2.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/charge_manager.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/get_cmd_versions.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/get_panic_info.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/get_pd_port_caps.c6
-rw-r--r--zephyr/test/drivers/host_cmd/src/host_command.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/host_command_test_protocol.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/host_event_commands.c3
-rw-r--r--zephyr/test/drivers/host_cmd/src/host_event_commands_deprecated.c3
-rw-r--r--zephyr/test/drivers/host_cmd/src/host_request_expected_size.c4
-rw-r--r--zephyr/test/drivers/host_cmd/src/keyboard_mkbp.c3
-rw-r--r--zephyr/test/drivers/host_cmd/src/motion_sense.c8
-rw-r--r--zephyr/test/drivers/host_cmd/src/pd_chip_info.c6
-rw-r--r--zephyr/test/drivers/host_cmd/src/pd_control.c8
-rw-r--r--zephyr/test/drivers/host_cmd/src/pd_log.c6
-rw-r--r--zephyr/test/drivers/host_cmd/src/tablet_mode.c10
-rw-r--r--zephyr/test/drivers/host_cmd/src/usb_pd_control.c6
-rw-r--r--zephyr/test/drivers/host_cmd/src/usb_pd_host_cmd.c6
-rw-r--r--zephyr/test/drivers/host_command_thread/src/main.c8
-rw-r--r--zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h4
-rw-r--r--zephyr/test/drivers/i2c_controller/src/basic_i2c_device_emul.c7
-rw-r--r--zephyr/test/drivers/i2c_controller/src/i2c_controller.c8
-rw-r--r--zephyr/test/drivers/isl923x/src/charge_ramp_hw.c4
-rw-r--r--zephyr/test/drivers/isl923x/src/console_cmd_amon_bmon.c10
-rw-r--r--zephyr/test/drivers/keyboard_scan/src/keyboard_backlight.c13
-rw-r--r--zephyr/test/drivers/keyboard_scan/src/keyboard_scan.c20
-rw-r--r--zephyr/test/drivers/keyboard_scan/src/keyboard_test_utils.c3
-rw-r--r--zephyr/test/drivers/keyboard_scan/src/mkbp_event.c15
-rw-r--r--zephyr/test/drivers/keyboard_scan/src/mkbp_info.c9
-rw-r--r--zephyr/test/drivers/led_driver/src/led.c3
-rw-r--r--zephyr/test/drivers/led_driver/src/led_common.c6
-rw-r--r--zephyr/test/drivers/locate_chip/src/locate_chip.c6
-rw-r--r--zephyr/test/drivers/mkbp/src/mkbp_fifo.c12
-rw-r--r--zephyr/test/drivers/power_host_sleep/src/test_power_host_sleep.c8
-rw-r--r--zephyr/test/drivers/rt9490/src/bc12.c8
-rw-r--r--zephyr/test/drivers/rt9490/src/charger.c4
-rw-r--r--zephyr/test/drivers/shim_gpio_id/src/test_shim_gpio_id.c4
-rw-r--r--zephyr/test/drivers/shim_pwm_hc/src/test_shim_pwm_hc.c12
-rw-r--r--zephyr/test/drivers/shim_rtc/src/test_shim_rtc.c10
-rw-r--r--zephyr/test/drivers/system/src/system.c10
-rw-r--r--zephyr/test/drivers/system/src/system_board_version_cbi.c8
-rw-r--r--zephyr/test/drivers/system/src/system_board_version_default.c4
-rw-r--r--zephyr/test/drivers/system/src/system_not_board_ap_set_sku_id.c4
-rw-r--r--zephyr/test/drivers/timer/src/timer.c8
-rw-r--r--zephyr/test/drivers/usb_common/src/suite.c4
-rw-r--r--zephyr/test/drivers/usb_common/src/usb_common.c11
-rw-r--r--zephyr/test/drivers/usb_common/src/usb_pd_discharge.c8
-rw-r--r--zephyr/test/drivers/usb_common/src/usb_pd_flags.c6
-rw-r--r--zephyr/test/drivers/usb_malfunction_sink/src/usb_malfunction_sink.c13
-rw-r--r--zephyr/test/drivers/usb_port_power_dumb/src/usb_port_power_dumb.c15
-rw-r--r--zephyr/test/drivers/usb_retimer_fw_update/src/usb_retimer_fw_update.c4
-rw-r--r--zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c15
-rw-r--r--zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode__require_ap_mode_entry.c6
-rw-r--r--zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode_ec_mode_entry.c10
-rw-r--r--zephyr/test/drivers/usbc_console_pd/src/usbc_console_pd.c17
-rw-r--r--zephyr/test/drivers/usbc_ocp/src/usbc_ocp.c8
-rw-r--r--zephyr/test/drivers/usbc_ppc/src/usbc_ppc.c10
-rw-r--r--zephyr/test/drivers/usbc_svdm_dfp_only/src/usbc_svdm_dfp_only.c8
-rw-r--r--zephyr/test/drivers/usbc_tbt_mode/src/usbc_tbt_mode.c15
-rw-r--r--zephyr/test/drivers/usbc_vconn_swap/src/usbc_vconn_swap.c15
-rw-r--r--zephyr/test/ec_app/src/main.c8
-rw-r--r--zephyr/test/herobrine/src/board_chipset.c6
-rw-r--r--zephyr/test/hooks/hooks.c7
-rw-r--r--zephyr/test/i2c/src/main.c8
-rw-r--r--zephyr/test/kingler/src/alt_sensor.c8
-rw-r--r--zephyr/test/kingler/src/ccd.c10
-rw-r--r--zephyr/test/kingler/src/clamshell.c8
-rw-r--r--zephyr/test/kingler/src/db_detect_hdmi.c10
-rw-r--r--zephyr/test/kingler/src/db_detect_none.c11
-rw-r--r--zephyr/test/kingler/src/db_detect_typec.c8
-rw-r--r--zephyr/test/kingler/src/fakes.c3
-rw-r--r--zephyr/test/kingler/src/tablet.c8
-rw-r--r--zephyr/test/krabby/src/charger_workaround.c10
-rw-r--r--zephyr/test/krabby/src/stubs.c2
-rw-r--r--zephyr/test/krabby/src/temp_tentacruel.c14
-rw-r--r--zephyr/test/krabby/src/usb_mux_init.c8
-rw-r--r--zephyr/test/math/src/fixed_point_int_sqrtf.c4
-rw-r--r--zephyr/test/math/src/mask.c7
-rw-r--r--zephyr/test/math/src/math_util.c6
-rw-r--r--zephyr/test/math/src/vector.c4
-rw-r--r--zephyr/test/qcom_power/src/main.c34
-rw-r--r--zephyr/test/rex/src/usb_pd_policy.c8
-rw-r--r--zephyr/test/system_common/src/build_info.c6
-rw-r--r--zephyr/test/system_common/src/get_version.c6
-rw-r--r--zephyr/test/system_common/src/reboot.c6
-rw-r--r--zephyr/test/system_common/src/system_is_locked.c4
-rw-r--r--zephyr/test/system_shim/src/test_system.c9
-rw-r--r--zephyr/test/tasks/main.c9
-rw-r--r--zephyr/test/test_utils/tasks_fakes.c5
-rw-r--r--zephyr/test/vboot_efs2/src/main.c2
219 files changed, 948 insertions, 927 deletions
diff --git a/zephyr/test/ap_power/src/ap_pwrseq.c b/zephyr/test/ap_power/src/ap_pwrseq.c
index d7a4042ca3..6c2fd4fd7f 100644
--- a/zephyr/test/ap_power/src/ap_pwrseq.c
+++ b/zephyr/test/ap_power/src/ap_pwrseq.c
@@ -3,19 +3,20 @@
* found in the LICENSE file.
*/
+#include "ap_power/ap_power.h"
+#include "ap_power/ap_power_interface.h"
+#include "chipset.h"
+#include "emul/emul_power_signals.h"
+#include "test_state.h"
+
#include <zephyr/drivers/espi.h>
#include <zephyr/drivers/espi_emul.h>
#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
#include <zephyr/ztest.h>
-#include "ap_power/ap_power.h"
#include <ap_power/ap_pwrseq.h>
-#include "ap_power/ap_power_interface.h"
-#include "chipset.h"
-#include "emul/emul_power_signals.h"
-#include "test_state.h"
static struct ap_power_ev_callback test_cb;
static int power_resume_count;
diff --git a/zephyr/test/ap_power/src/board.c b/zephyr/test/ap_power/src/board.c
index bada154bb3..f08ccf9ef7 100644
--- a/zephyr/test/ap_power/src/board.c
+++ b/zephyr/test/ap_power/src/board.c
@@ -6,8 +6,8 @@
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
-#include <ap_power_override_functions.h>
#include <ap_power/ap_power_interface.h>
+#include <ap_power_override_functions.h>
#include <power_signals.h>
#include <timer.h>
#include <x86_power_signals.h>
diff --git a/zephyr/test/ap_power/src/console_command.c b/zephyr/test/ap_power/src/console_command.c
index 9d38e773c7..7789a13919 100644
--- a/zephyr/test/ap_power/src/console_command.c
+++ b/zephyr/test/ap_power/src/console_command.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_debug_mode, test_debug_mode_default)
{
zassert_ok(shell_execute_cmd(get_ec_shell(), "debug_mode"),
diff --git a/zephyr/test/ap_power/src/events.c b/zephyr/test/ap_power/src/events.c
index b5dfdec50f..2528d356f6 100644
--- a/zephyr/test/ap_power/src/events.c
+++ b/zephyr/test/ap_power/src/events.c
@@ -8,20 +8,18 @@
* @brief Unit Tests for AP power events
*/
-#include <zephyr/device.h>
+#include "ap_power/ap_power.h"
+#include "ap_power/ap_power_events.h"
+#include "hooks.h"
+#include "test_state.h"
+#include <zephyr/device.h>
#include <zephyr/drivers/espi.h>
#include <zephyr/drivers/espi_emul.h>
-#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
#include <zephyr/ztest.h>
-#include "ap_power/ap_power.h"
-#include "ap_power/ap_power_events.h"
-
-#include "hooks.h"
-#include "test_state.h"
-
/*
* Structure passed to event listeners.
*/
diff --git a/zephyr/test/ap_power/src/hibdelay.c b/zephyr/test/ap_power/src/hibdelay.c
index 02442adec8..11fac953ea 100644
--- a/zephyr/test/ap_power/src/hibdelay.c
+++ b/zephyr/test/ap_power/src/hibdelay.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_hibdelay, ap_power_predicate_post_main, NULL, NULL,
NULL, NULL);
diff --git a/zephyr/test/ap_power/src/hibernate.c b/zephyr/test/ap_power/src/hibernate.c
index 2309508f4b..23030bdcb3 100644
--- a/zephyr/test/ap_power/src/hibernate.c
+++ b/zephyr/test/ap_power/src/hibernate.c
@@ -3,21 +3,19 @@
* found in the LICENSE file.
*/
-#include <zephyr/device.h>
+#include "hooks.h"
+#include "test_mocks.h"
+#include "test_state.h"
-#include <zephyr/logging/log.h>
+#include <zephyr/device.h>
#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
#include <zephyr/ztest.h>
#include <ap_power/ap_power.h>
#include <ap_power/ap_power_events.h>
#include <ap_power/ap_power_interface.h>
-#include "hooks.h"
-
-#include "test_mocks.h"
-#include "test_state.h"
-
ZTEST(hibernate, test_g3_hibernate)
{
extpower_is_present_fake.return_val = 0;
diff --git a/zephyr/test/ap_power/src/host_command.c b/zephyr/test/ap_power/src/host_command.c
index 4367f8fa44..f0b3b0d732 100644
--- a/zephyr/test/ap_power/src/host_command.c
+++ b/zephyr/test/ap_power/src/host_command.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "host_command.h"
#include "test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST(host_cmd, test_hibernate_get)
{
struct ec_response_hibernation_delay response;
diff --git a/zephyr/test/ap_power/src/main.c b/zephyr/test/ap_power/src/main.c
index d653b51164..9ed34eee4a 100644
--- a/zephyr/test/ap_power/src/main.c
+++ b/zephyr/test/ap_power/src/main.c
@@ -3,11 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
#include "ec_app_main.h"
#include "test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
bool ap_power_predicate_pre_main(const void *state)
{
return ((struct test_state *)state)->ec_app_main_run == false;
diff --git a/zephyr/test/ap_power/src/signals.c b/zephyr/test/ap_power/src/signals.c
index e8bc6e426c..4eae187564 100644
--- a/zephyr/test/ap_power/src/signals.c
+++ b/zephyr/test/ap_power/src/signals.c
@@ -8,24 +8,22 @@
* @brief Unit Tests for power signals API
*/
-#include <zephyr/device.h>
-
-#include <zephyr/drivers/espi.h>
-#include <zephyr/drivers/espi_emul.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/logging/log.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
-#include "power_signals.h"
-
#include "ec_tasks.h"
#include "emul/emul_stub_device.h"
#include "gpio.h"
#include "gpio/gpio.h"
#include "gpio/gpio_int.h"
+#include "power_signals.h"
#include "test_state.h"
+#include <zephyr/device.h>
+#include <zephyr/drivers/espi.h>
+#include <zephyr/drivers/espi_emul.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
+#include <zephyr/ztest.h>
+
extern bool gpio_test_interrupt_triggered;
static const struct device *emul_port;
diff --git a/zephyr/test/ap_power/src/test_mocks.c b/zephyr/test/ap_power/src/test_mocks.c
index 5dae36a6ab..9eb8834ff5 100644
--- a/zephyr/test/ap_power/src/test_mocks.c
+++ b/zephyr/test/ap_power/src/test_mocks.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
+#include "test_mocks.h"
+
#include <zephyr/fff.h>
#include <zephyr/ztest.h>
-#include "test_mocks.h"
-
/* Mocks for common/extpower_gpio.c */
DEFINE_FAKE_VALUE_FUNC(int, extpower_is_present);
diff --git a/zephyr/test/crc/main.c b/zephyr/test/crc/main.c
index 0b13970d83..f9da78bfde 100644
--- a/zephyr/test/crc/main.c
+++ b/zephyr/test/crc/main.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
+#include "crc8.h"
+
#include <zephyr/ztest_assert.h>
#include <zephyr/ztest_test_new.h>
-#include "crc8.h"
-
ZTEST_SUITE(crc_driver, NULL, NULL, NULL, NULL, NULL);
ZTEST(crc_driver, test_crc8_known_data)
diff --git a/zephyr/test/drivers/anx7447/src/low_power_mode.c b/zephyr/test/drivers/anx7447/src/low_power_mode.c
index 67c095b64d..cbcea1955c 100644
--- a/zephyr/test/drivers/anx7447/src/low_power_mode.c
+++ b/zephyr/test/drivers/anx7447/src/low_power_mode.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/ztest.h>
-
#include "emul/tcpc/emul_tcpci.h"
#include "tcpm/anx7447_public.h"
#include "tcpm/tcpci.h"
@@ -13,6 +10,9 @@
#include "test/drivers/test_state.h"
#include "usb_pd.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/ztest.h>
+
#define ANX7447_NODE DT_NODELABEL(anx7447_emul)
static const int tcpm_anx7447_port = USBC_PORT_C0;
diff --git a/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c b/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c
index 632b8e6aea..993c6e680c 100644
--- a/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c
+++ b/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
-#include "usb_mux.h"
#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include "usb_mux.h"
+
+#include <zephyr/ztest.h>
static void ap_mux_control_before(void *data)
{
diff --git a/zephyr/test/drivers/ap_vdm_control/src/ap_vdm_control.c b/zephyr/test/drivers/ap_vdm_control/src/ap_vdm_control.c
index 10a5faf6b9..fe7dab88f4 100644
--- a/zephyr/test/drivers/ap_vdm_control/src/ap_vdm_control.c
+++ b/zephyr/test/drivers/ap_vdm_control/src/ap_vdm_control.c
@@ -3,18 +3,19 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/kernel.h>
-#include <zephyr/sys/byteorder.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
-#include "usb_mux.h"
#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include "usb_mux.h"
#include "usb_pd_vdo.h"
+#include <stdint.h>
+
+#include <zephyr/kernel.h>
+#include <zephyr/sys/byteorder.h>
+#include <zephyr/ztest.h>
+
#define TEST_PORT USBC_PORT_C0
struct ap_vdm_control_fixture {
diff --git a/zephyr/test/drivers/button/src/main.c b/zephyr/test/drivers/button/src/main.c
index c26a62dfa1..08874d8032 100644
--- a/zephyr/test/drivers/button/src/main.c
+++ b/zephyr/test/drivers/button/src/main.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/kernel.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "button.h"
#include "console.h"
#include "hooks.h"
@@ -16,6 +11,11 @@
#include "test/drivers/test_state.h"
#include "timer.h"
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
/*
* TODO (b/b/253284635) Timeouts here don't quite align with the button press
* duration. This is caused by an issue with the Zephyr scheduling for delayed
diff --git a/zephyr/test/drivers/chargesplash/src/chargesplash.c b/zephyr/test/drivers/chargesplash/src/chargesplash.c
index 08ba5377a0..27b3678bd8 100644
--- a/zephyr/test/drivers/chargesplash/src/chargesplash.c
+++ b/zephyr/test/drivers/chargesplash/src/chargesplash.c
@@ -3,14 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <stdbool.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/shell/shell_uart.h>
-#include <zephyr/sys/__assert.h>
-#include <zephyr/ztest.h>
-
#include "chipset.h"
#include "config.h"
#include "ec_commands.h"
@@ -18,9 +10,18 @@
#include "hooks.h"
#include "host_command.h"
#include "lid_switch.h"
-#include "timer.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include "timer.h"
+
+#include <stdbool.h>
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/shell/shell_uart.h>
+#include <zephyr/sys/__assert.h>
+#include <zephyr/ztest.h>
/* Do a chargesplash host cmd */
static enum ec_status
diff --git a/zephyr/test/drivers/common/include/test/drivers/stubs.h b/zephyr/test/drivers/common/include/test/drivers/stubs.h
index 8a739fa866..63718649f8 100644
--- a/zephyr/test/drivers/common/include/test/drivers/stubs.h
+++ b/zephyr/test/drivers/common/include/test/drivers/stubs.h
@@ -6,9 +6,10 @@
#ifndef __TEST_DRIVERS_STUBS_H
#define __TEST_DRIVERS_STUBS_H
-#include <zephyr/fff.h>
#include "power.h"
+#include <zephyr/fff.h>
+
enum usbc_port { USBC_PORT_C0 = 0, USBC_PORT_C1, USBC_PORT_COUNT };
/**
diff --git a/zephyr/test/drivers/common/include/test/drivers/utils.h b/zephyr/test/drivers/common/include/test/drivers/utils.h
index 1a6799bd0d..d2e0b06a5d 100644
--- a/zephyr/test/drivers/common/include/test/drivers/utils.h
+++ b/zephyr/test/drivers/common/include/test/drivers/utils.h
@@ -6,20 +6,21 @@
#ifndef ZEPHYR_TEST_DRIVERS_INCLUDE_UTILS_H_
#define ZEPHYR_TEST_DRIVERS_INCLUDE_UTILS_H_
-#include <zephyr/drivers/emul.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/ztest.h>
-#include <stddef.h>
-#include <string.h>
-
#include "charger.h"
-#include "lpc.h"
#include "emul/tcpc/emul_tcpci_partner_src.h"
#include "extpower.h"
#include "host_command.h"
+#include "lpc.h"
#include "power.h"
#include "usbc/utils.h"
+#include <stddef.h>
+#include <string.h>
+
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/ztest.h>
+
/**
* @brief Helper macro for EMUL_GET_USBC_BINDING. If @p usbc_id has the same
* port number as @p port, then struct emul* for @p chip phandle is
diff --git a/zephyr/test/drivers/common/src/main.c b/zephyr/test/drivers/common/src/main.c
index 1c8497ab3f..dab681b936 100644
--- a/zephyr/test/drivers/common/src/main.c
+++ b/zephyr/test/drivers/common/src/main.c
@@ -3,12 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
#include "ec_app_main.h"
#include "hooks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
/**
* @brief Semaphore that signals when hooks have completed
*/
diff --git a/zephyr/test/drivers/common/src/stubs.c b/zephyr/test/drivers/common/src/stubs.c
index f16064c14d..3cddc5cdfe 100644
--- a/zephyr/test/drivers/common/src/stubs.c
+++ b/zephyr/test/drivers/common/src/stubs.c
@@ -7,11 +7,11 @@
#include "battery_fuel_gauge.h"
#include "bc12/pi3usb9201_public.h"
#include "charge_ramp.h"
+#include "charge_state_v2.h"
#include "charger.h"
#include "charger/isl923x_public.h"
#include "charger/isl9241_public.h"
#include "config.h"
-#include <zephyr/fff.h>
#include "gpio/gpio_int.h"
#include "hooks.h"
#include "i2c/i2c.h"
@@ -19,14 +19,14 @@
#include "ppc/sn5s330_public.h"
#include "ppc/syv682x_public.h"
#include "retimer/bb_retimer_public.h"
-#include "test/drivers/stubs.h"
#include "tcpm/ps8xxx_public.h"
#include "tcpm/tcpci.h"
+#include "test/drivers/stubs.h"
#include "usb_mux.h"
#include "usb_pd_tcpm.h"
#include "usbc_ppc.h"
-#include "charge_state_v2.h"
+#include <zephyr/fff.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(stubs);
diff --git a/zephyr/test/drivers/common/src/test_mocks.c b/zephyr/test/drivers/common/src/test_mocks.c
index 76f66662cb..21cd4c0c1b 100644
--- a/zephyr/test/drivers/common/src/test_mocks.c
+++ b/zephyr/test/drivers/common/src/test_mocks.c
@@ -3,10 +3,10 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "test/drivers/test_mocks.h"
+#include <zephyr/ztest.h>
+
/* Mocks for common/init_rom.c */
DEFINE_FAKE_VALUE_FUNC(const void *, init_rom_map, const void *, int);
DEFINE_FAKE_VOID_FUNC(init_rom_unmap, const void *, int);
diff --git a/zephyr/test/drivers/common/src/test_rules.c b/zephyr/test/drivers/common/src/test_rules.c
index e1b1d59480..42195b25d7 100644
--- a/zephyr/test/drivers/common/src/test_rules.c
+++ b/zephyr/test/drivers/common/src/test_rules.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "emul/tcpc/emul_tcpci.h"
#include "motion_sense_fifo.h"
#include "test/drivers/stubs.h"
#include "test/drivers/utils.h"
#include "usb_pd_tcpm.h"
+#include <zephyr/ztest.h>
+
static void motion_sense_fifo_reset_before(const struct ztest_unit_test *test,
void *data)
{
diff --git a/zephyr/test/drivers/common/src/utils.c b/zephyr/test/drivers/common/src/utils.c
index 646db0d27b..14da1331aa 100644
--- a/zephyr/test/drivers/common/src/utils.c
+++ b/zephyr/test/drivers/common/src/utils.c
@@ -3,30 +3,30 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/shell/shell_dummy.h> /* nocheck */
-#include <zephyr/shell/shell_uart.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "acpi.h"
#include "battery.h"
#include "battery_smart.h"
#include "charge_state.h"
#include "chipset.h"
-#include "lpc.h"
#include "emul/emul_isl923x.h"
#include "emul/emul_smart_battery.h"
#include "emul/emul_stub_device.h"
#include "emul/tcpc/emul_tcpci_partner_src.h"
#include "hooks.h"
+#include "lpc.h"
#include "power.h"
#include "task.h"
#include "tcpm/tcpci.h"
#include "test/drivers/stubs.h"
#include "test/drivers/utils.h"
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/shell/shell_dummy.h> /* nocheck */
+#include <zephyr/shell/shell_uart.h>
+#include <zephyr/ztest.h>
+
#define BATTERY_NODE DT_NODELABEL(battery)
#define GPIO_BATT_PRES_ODL_PATH DT_PATH(named_gpios, ec_batt_pres_odl)
#define GPIO_BATT_PRES_ODL_PORT DT_GPIO_PIN(GPIO_BATT_PRES_ODL_PATH, gpios)
diff --git a/zephyr/test/drivers/common_cbi/src/test_common_cbi.c b/zephyr/test/drivers/common_cbi/src/test_common_cbi.c
index fcd5624e09..bf8da93a9e 100644
--- a/zephyr/test/drivers/common_cbi/src/test_common_cbi.c
+++ b/zephyr/test/drivers/common_cbi/src/test_common_cbi.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/eeprom.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/ztest.h>
-
#include "cros_board_info.h"
#include "host_command.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/eeprom.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/ztest.h>
+
#define WP_L_GPIO_PATH DT_PATH(named_gpios, wp_l)
#define CBI_EEPROM_DEV DEVICE_DT_GET(DT_NODELABEL(cbi_eeprom))
diff --git a/zephyr/test/drivers/common_cbi_gpio/src/test_common_cbi_gpio.c b/zephyr/test/drivers/common_cbi_gpio/src/test_common_cbi_gpio.c
index 4af62a3d8b..8e8e4f6a8b 100644
--- a/zephyr/test/drivers/common_cbi_gpio/src/test_common_cbi_gpio.c
+++ b/zephyr/test/drivers/common_cbi_gpio/src/test_common_cbi_gpio.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "cros_board_info.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, system_get_board_version);
FAKE_VALUE_FUNC(int, cbi_set_board_info, enum cbi_data_tag, const uint8_t *,
uint8_t);
diff --git a/zephyr/test/drivers/common_charger/src/test_charge_state_v2.c b/zephyr/test/drivers/common_charger/src/test_charge_state_v2.c
index c4c0838dc5..d6504b92f9 100644
--- a/zephyr/test/drivers/common_charger/src/test_charge_state_v2.c
+++ b/zephyr/test/drivers/common_charger/src/test_charge_state_v2.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "charge_state_v2.h"
#include "math_util.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
int battery_outside_charging_temperature(void);
struct charge_state_v2_fixture {
diff --git a/zephyr/test/drivers/common_charger/src/test_common_charger.c b/zephyr/test/drivers/common_charger/src/test_common_charger.c
index ca9469c032..eb7d6f1f08 100644
--- a/zephyr/test/drivers/common_charger/src/test_common_charger.c
+++ b/zephyr/test/drivers/common_charger/src/test_common_charger.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/ztest_assert.h>
-
#include "charge_ramp.h"
#include "driver/charger/isl923x_public.h"
#include "ec_commands.h"
@@ -15,6 +11,10 @@
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
/* Tested wrt isl923x without RAA489000 */
/* Only single charger-chip configured for the drivers overlay */
diff --git a/zephyr/test/drivers/common_charger/src/test_common_charger_mocked.c b/zephyr/test/drivers/common_charger/src/test_common_charger_mocked.c
index 4ee485f5c0..c353b7b6c5 100644
--- a/zephyr/test/drivers/common_charger/src/test_common_charger_mocked.c
+++ b/zephyr/test/drivers/common_charger/src/test_common_charger_mocked.c
@@ -3,17 +3,18 @@
* found in the LICENSE file.
*/
+#include "charge_ramp.h"
+#include "charger.h"
+#include "test/drivers/charger_utils.h"
+#include "test/drivers/test_state.h"
+
#include <string.h>
+
#include <zephyr/fff.h>
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <zephyr/ztest_assert.h>
-#include "charger.h"
-#include "charge_ramp.h"
-#include "test/drivers/charger_utils.h"
-#include "test/drivers/test_state.h"
-
/* This test suite only works if the chg_chips array is not const. */
BUILD_ASSERT(IS_ENABLED(CONFIG_PLATFORM_EC_CHARGER_RUNTIME_CONFIG),
"chg_chips array cannot be const.");
diff --git a/zephyr/test/drivers/console/src/shell.c b/zephyr/test/drivers/console/src/shell.c
index 7345ed2da8..c7a85b8f32 100644
--- a/zephyr/test/drivers/console/src/shell.c
+++ b/zephyr/test/drivers/console/src/shell.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
+#include "console.h"
+#include "test/drivers/test_state.h"
+#include "uart.h"
+
#include <zephyr/device.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/shell/shell.h>
#include <zephyr/ztest.h>
-#include "console.h"
-#include "uart.h"
-#include "test/drivers/test_state.h"
-
void uart_callback(const struct device *dev, void *user_data);
void bypass_cb(const struct shell *shell, uint8_t *data, size_t len);
diff --git a/zephyr/test/drivers/default/src/battery.c b/zephyr/test/drivers/default/src/battery.c
index 2e06725af5..5e57537a28 100644
--- a/zephyr/test/drivers/default/src/battery.c
+++ b/zephyr/test/drivers/default/src/battery.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
#include "battery.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define GPIO_BATT_PRES_ODL_PATH DT_PATH(named_gpios, ec_batt_pres_odl)
#define GPIO_BATT_PRES_ODL_PORT DT_GPIO_PIN(GPIO_BATT_PRES_ODL_PATH, gpios)
diff --git a/zephyr/test/drivers/default/src/bb_retimer.c b/zephyr/test/drivers/default/src/bb_retimer.c
index 5cfedc789e..78d483817a 100644
--- a/zephyr/test/drivers/default/src/bb_retimer.c
+++ b/zephyr/test/drivers/default/src/bb_retimer.c
@@ -3,25 +3,24 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
+#include "chipset.h"
#include "common.h"
+#include "driver/retimer/bb_retimer.h"
#include "ec_tasks.h"
#include "emul/emul_bb_retimer.h"
#include "emul/emul_common_i2c.h"
#include "hooks.h"
#include "i2c.h"
#include "test/drivers/stubs.h"
+#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
#include "usb_prl_sm.h"
#include "usb_tc_sm.h"
-#include "chipset.h"
-#include "driver/retimer/bb_retimer.h"
-#include "test/drivers/test_state.h"
-#include "test/drivers/utils.h"
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
#define GPIO_USB_C1_LS_EN_PATH DT_PATH(named_gpios, usb_c1_ls_en)
#define GPIO_USB_C1_LS_EN_PORT DT_GPIO_PIN(GPIO_USB_C1_LS_EN_PATH, gpios)
diff --git a/zephyr/test/drivers/default/src/bc12.c b/zephyr/test/drivers/default/src/bc12.c
index 2207cd9676..5d143dcbdb 100644
--- a/zephyr/test/drivers/default/src/bc12.c
+++ b/zephyr/test/drivers/default/src/bc12.c
@@ -3,22 +3,20 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
-#include "emul/emul_pi3usb9201.h"
-
-#include "timer.h"
-#include "usb_charge.h"
#include "battery.h"
+#include "emul/emul_pi3usb9201.h"
#include "extpower.h"
#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include "timer.h"
+#include "usb_charge.h"
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
+#include <zephyr/ztest.h>
LOG_MODULE_REGISTER(test_drivers_bc12, LOG_LEVEL_DBG);
#define EMUL_NODE DT_NODELABEL(pi3usb9201_emul0)
diff --git a/zephyr/test/drivers/default/src/bma2x2.c b/zephyr/test/drivers/default/src/bma2x2.c
index ce6665790d..b66fc9d056 100644
--- a/zephyr/test/drivers/default/src/bma2x2.c
+++ b/zephyr/test/drivers/default/src/bma2x2.c
@@ -3,19 +3,18 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
+#include "accelgyro.h"
#include "common.h"
-#include "i2c.h"
+#include "driver/accel_bma2x2.h"
#include "emul/emul_bma255.h"
#include "emul/emul_common_i2c.h"
-
-#include "accelgyro.h"
+#include "i2c.h"
#include "motion_sense.h"
-#include "driver/accel_bma2x2.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
/** How accurate comparision of vectors should be. */
#define V_EPS 8
diff --git a/zephyr/test/drivers/default/src/bmi160.c b/zephyr/test/drivers/default/src/bmi160.c
index edce38057b..257040b6dd 100644
--- a/zephyr/test/drivers/default/src/bmi160.c
+++ b/zephyr/test/drivers/default/src/bmi160.c
@@ -3,20 +3,19 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
-#include "i2c.h"
+#include "driver/accelgyro_bmi160.h"
+#include "driver/accelgyro_bmi_common.h"
#include "emul/emul_bmi.h"
#include "emul/emul_common_i2c.h"
-#include "test/drivers/test_mocks.h"
-
+#include "i2c.h"
#include "motion_sense_fifo.h"
-#include "driver/accelgyro_bmi160.h"
-#include "driver/accelgyro_bmi_common.h"
+#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define BMI_NODE DT_NODELABEL(accel_bmi160)
#define BMI_ACC_SENSOR_ID SENSOR_ID(DT_NODELABEL(ms_bmi160_accel))
#define BMI_GYR_SENSOR_ID SENSOR_ID(DT_NODELABEL(ms_bmi160_gyro))
diff --git a/zephyr/test/drivers/default/src/bmi260.c b/zephyr/test/drivers/default/src/bmi260.c
index 5e44d1c499..1bc45b3883 100644
--- a/zephyr/test/drivers/default/src/bmi260.c
+++ b/zephyr/test/drivers/default/src/bmi260.c
@@ -3,21 +3,20 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
-#include "i2c.h"
+#include "driver/accelgyro_bmi260.h"
+#include "driver/accelgyro_bmi_common.h"
#include "emul/emul_bmi.h"
#include "emul/emul_common_i2c.h"
-
+#include "i2c.h"
#include "motion_sense_fifo.h"
-#include "driver/accelgyro_bmi260.h"
-#include "driver/accelgyro_bmi_common.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define BMI_NODE DT_NODELABEL(accel_bmi260)
#define BMI_ACC_SENSOR_ID SENSOR_ID(DT_NODELABEL(ms_bmi260_accel))
#define BMI_GYR_SENSOR_ID SENSOR_ID(DT_NODELABEL(ms_bmi260_gyro))
diff --git a/zephyr/test/drivers/default/src/bmi_common.c b/zephyr/test/drivers/default/src/bmi_common.c
index 302c59d27e..bdd3999d65 100644
--- a/zephyr/test/drivers/default/src/bmi_common.c
+++ b/zephyr/test/drivers/default/src/bmi_common.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/ztest.h>
-
#include "accelgyro_bmi_common.h"
-#include "i2c.h"
#include "emul/emul_bmi.h"
#include "emul/emul_common_i2c.h"
+#include "i2c.h"
#include "test/drivers/test_state.h"
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
#define BMI_NODE DT_NODELABEL(accel_bmi160)
#define BMI_ACC_SENSOR_ID SENSOR_ID(DT_NODELABEL(ms_bmi160_accel))
diff --git a/zephyr/test/drivers/default/src/charge_manager.c b/zephyr/test/drivers/default/src/charge_manager.c
index 2729816a76..d5affff95e 100644
--- a/zephyr/test/drivers/default/src/charge_manager.c
+++ b/zephyr/test/drivers/default/src/charge_manager.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "charge_manager.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(charge_manager, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/charge_state_prevent_power_on.c b/zephyr/test/drivers/default/src/charge_state_prevent_power_on.c
index 83890ee6a1..ce47ff8042 100644
--- a/zephyr/test/drivers/default/src/charge_state_prevent_power_on.c
+++ b/zephyr/test/drivers/default/src/charge_state_prevent_power_on.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "charge_state.h"
#include "charge_state_v2.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
/* Test external variable defined in charge_state_v2 */
extern int charge_prevent_power_on_automatic_power_on;
diff --git a/zephyr/test/drivers/default/src/console.c b/zephyr/test/drivers/default/src/console.c
index 9e6c55c198..c5148baf76 100644
--- a/zephyr/test/drivers/default/src/console.c
+++ b/zephyr/test/drivers/default/src/console.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/shell/shell_dummy.h>
-
#include "builtin/stdio.h"
-#include "test/drivers/test_state.h"
#include "console.h"
-#include "uart.h"
#include "ec_commands.h"
+#include "test/drivers/test_state.h"
+#include "uart.h"
+
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
ZTEST_USER(console, test_printf_overflow)
{
diff --git a/zephyr/test/drivers/default/src/console_cmd/accelinfo.c b/zephyr/test/drivers/default/src/console_cmd/accelinfo.c
index 39556fab43..aac63c01b7 100644
--- a/zephyr/test/drivers/default/src/console_cmd/accelinfo.c
+++ b/zephyr/test/drivers/default/src/console_cmd/accelinfo.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "config.h"
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "timer.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static void console_cmd_accelinfo_after(void *fixture)
{
ARG_UNUSED(fixture);
diff --git a/zephyr/test/drivers/default/src/console_cmd/accelinit.c b/zephyr/test/drivers/default/src/console_cmd/accelinit.c
index e722409298..2633c05f58 100644
--- a/zephyr/test/drivers/default/src/console_cmd/accelinit.c
+++ b/zephyr/test/drivers/default/src/console_cmd/accelinit.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "accelgyro.h"
#include "console.h"
#include "motion_sense.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, mock_init, struct motion_sensor_t *);
struct console_cmd_accelinit_fixture {
diff --git a/zephyr/test/drivers/default/src/console_cmd/accelrange.c b/zephyr/test/drivers/default/src/console_cmd/accelrange.c
index 57e81eada4..04ec7e6004 100644
--- a/zephyr/test/drivers/default/src/console_cmd/accelrange.c
+++ b/zephyr/test/drivers/default/src/console_cmd/accelrange.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/devicetree.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "driver/accel_bma2x2.h"
#include "ec_commands.h"
@@ -16,6 +12,10 @@
#include "motion_sense.h"
#include "test/drivers/test_state.h"
+#include <zephyr/devicetree.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
#define EMUL_NODE DT_NODELABEL(bma_emul)
#define BMA_ORD DT_DEP_ORD(EMUL_LABEL)
diff --git a/zephyr/test/drivers/default/src/console_cmd/accelrate.c b/zephyr/test/drivers/default/src/console_cmd/accelrate.c
index ca5bcf338a..3a5b2cd9bf 100644
--- a/zephyr/test/drivers/default/src/console_cmd/accelrate.c
+++ b/zephyr/test/drivers/default/src/console_cmd/accelrate.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "motion_sense.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static int original_sensor_0_s0_config_odr;
static void *console_cmd_accelrate_setup(void)
diff --git a/zephyr/test/drivers/default/src/console_cmd/accelread.c b/zephyr/test/drivers/default/src/console_cmd/accelread.c
index 4a129badc1..e622faf58f 100644
--- a/zephyr/test/drivers/default/src/console_cmd/accelread.c
+++ b/zephyr/test/drivers/default/src/console_cmd/accelread.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "accelgyro.h"
#include "console.h"
#include "ec_commands.h"
@@ -14,6 +10,10 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, mock_read, const struct motion_sensor_t *, int *);
FAKE_VALUE_FUNC(int, mock_set_data_rate, const struct motion_sensor_t *, int,
int);
diff --git a/zephyr/test/drivers/default/src/console_cmd/accelres.c b/zephyr/test/drivers/default/src/console_cmd/accelres.c
index 38bd4ed697..21c0075b0f 100644
--- a/zephyr/test/drivers/default/src/console_cmd/accelres.c
+++ b/zephyr/test/drivers/default/src/console_cmd/accelres.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "accelgyro.h"
#include "console.h"
#include "driver/accel_bma2x2.h"
@@ -14,6 +10,10 @@
#include "motion_sense.h"
#include "test/drivers/test_state.h"
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, set_resolution, const struct motion_sensor_t *, int, int);
struct console_cmd_accelres_fixture {
diff --git a/zephyr/test/drivers/default/src/console_cmd/accelspoof.c b/zephyr/test/drivers/default/src/console_cmd/accelspoof.c
index 50f8c1e650..fe11525531 100644
--- a/zephyr/test/drivers/default/src/console_cmd/accelspoof.c
+++ b/zephyr/test/drivers/default/src/console_cmd/accelspoof.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "motion_sense.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static void console_cmd_accelspoof_after(void *fixture)
{
ARG_UNUSED(fixture);
diff --git a/zephyr/test/drivers/default/src/console_cmd/adc.c b/zephyr/test/drivers/default/src/console_cmd/adc.c
index 85dfda939a..b366db36f6 100644
--- a/zephyr/test/drivers/default/src/console_cmd/adc.c
+++ b/zephyr/test/drivers/default/src/console_cmd/adc.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
/* Default adc command, lists out channels */
ZTEST_USER(console_cmd_adc, test_adc_noname)
{
diff --git a/zephyr/test/drivers/default/src/console_cmd/battery.c b/zephyr/test/drivers/default/src/console_cmd/battery.c
index 9c3e21fcf1..f5fa78d684 100644
--- a/zephyr/test/drivers/default/src/console_cmd/battery.c
+++ b/zephyr/test/drivers/default/src/console_cmd/battery.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "battery_smart.h"
#include "console.h"
#include "ec_commands.h"
@@ -15,6 +11,10 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
struct console_cmd_battery_fixture {
const struct emul *emul;
struct i2c_common_emul_data *i2c_emul;
diff --git a/zephyr/test/drivers/default/src/console_cmd/button.c b/zephyr/test/drivers/default/src/console_cmd/button.c
index 9272b2ce2d..0df137e90b 100644
--- a/zephyr/test/drivers/default/src/console_cmd/button.c
+++ b/zephyr/test/drivers/default/src/console_cmd/button.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_button, test_button_no_arg)
{
int rv;
diff --git a/zephyr/test/drivers/default/src/console_cmd/cbi.c b/zephyr/test/drivers/default/src/console_cmd/cbi.c
index 495ffd7e4c..297431657e 100644
--- a/zephyr/test/drivers/default/src/console_cmd/cbi.c
+++ b/zephyr/test/drivers/default/src/console_cmd/cbi.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static void set_wp(bool value)
{
const struct gpio_dt_spec *wp = GPIO_DT_FROM_NODELABEL(gpio_wp_l);
diff --git a/zephyr/test/drivers/default/src/console_cmd/charge_manager.c b/zephyr/test/drivers/default/src/console_cmd/charge_manager.c
index 12b2b174f4..698db8b316 100644
--- a/zephyr/test/drivers/default/src/console_cmd/charge_manager.c
+++ b/zephyr/test/drivers/default/src/console_cmd/charge_manager.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "charge_manager.h"
#include "console.h"
#include "emul/emul_isl923x.h"
@@ -15,6 +12,9 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
struct console_cmd_charge_manager_fixture {
struct tcpci_partner_data sink_5v_3a;
struct tcpci_snk_emul_data sink_ext;
diff --git a/zephyr/test/drivers/default/src/console_cmd/charge_state.c b/zephyr/test/drivers/default/src/console_cmd/charge_state.c
index 70b18beb9b..8cfd11324f 100644
--- a/zephyr/test/drivers/default/src/console_cmd/charge_state.c
+++ b/zephyr/test/drivers/default/src/console_cmd/charge_state.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "charge_state.h"
#include "charge_state_v2.h"
#include "console.h"
@@ -13,6 +10,9 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_charge_state, test_idle_too_few_args)
{
int rv;
diff --git a/zephyr/test/drivers/default/src/console_cmd/chargen.c b/zephyr/test/drivers/default/src/console_cmd/chargen.c
index 649a1b0b1f..473ad78abb 100644
--- a/zephyr/test/drivers/default/src/console_cmd/chargen.c
+++ b/zephyr/test/drivers/default/src/console_cmd/chargen.c
@@ -3,17 +3,18 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-#include <stdio.h>
-#include <zephyr/drivers/uart/serial_test.h>
-
#include "console.h"
-#include "uart.h"
+#include "system.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
-#include "system.h"
+#include "uart.h"
+
+#include <stdio.h>
+
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/uart/serial_test.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
const char expected_output[] =
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
diff --git a/zephyr/test/drivers/default/src/console_cmd/charger.c b/zephyr/test/drivers/default/src/console_cmd/charger.c
index 63cc0a3118..420ef67fe4 100644
--- a/zephyr/test/drivers/default/src/console_cmd/charger.c
+++ b/zephyr/test/drivers/default/src/console_cmd/charger.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "dptf.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
/* Tests which need no fixture */
ZTEST_USER(console_cmd_charger, test_default_dump)
{
diff --git a/zephyr/test/drivers/default/src/console_cmd/crash.c b/zephyr/test/drivers/default/src/console_cmd/crash.c
index bc0b5d0254..4218aa74d6 100644
--- a/zephyr/test/drivers/default/src/console_cmd/crash.c
+++ b/zephyr/test/drivers/default/src/console_cmd/crash.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "builtin/assert.h"
#include "console.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_crash, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/cutoff.c b/zephyr/test/drivers/default/src/console_cmd/cutoff.c
index e17f8745bd..2b5a9c67d2 100644
--- a/zephyr/test/drivers/default/src/console_cmd/cutoff.c
+++ b/zephyr/test/drivers/default/src/console_cmd/cutoff.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "console.h"
#include "ec_commands.h"
@@ -13,6 +10,9 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static void console_cmd_cutoff_after(void *unused)
{
ARG_UNUSED(unused);
diff --git a/zephyr/test/drivers/default/src/console_cmd/ec_features.c b/zephyr/test/drivers/default/src/console_cmd/ec_features.c
index 3e355af988..48e6eec819 100644
--- a/zephyr/test/drivers/default/src/console_cmd/ec_features.c
+++ b/zephyr/test/drivers/default/src/console_cmd/ec_features.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "builtin/stdio.h"
#include "console.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_ec_features, drivers_predicate_post_main, NULL, NULL,
NULL, NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/gpio.c b/zephyr/test/drivers/default/src/console_cmd/gpio.c
index 164f272e27..c4b83b8ab4 100644
--- a/zephyr/test/drivers/default/src/console_cmd/gpio.c
+++ b/zephyr/test/drivers/default/src/console_cmd/gpio.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_gpio, test_read_invoke_success)
{
zassert_ok(shell_execute_cmd(get_ec_shell(), "gpioget test"), NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/hcdebug.c b/zephyr/test/drivers/default/src/console_cmd/hcdebug.c
index 71adb02690..68dc6c72be 100644
--- a/zephyr/test/drivers/default/src/console_cmd/hcdebug.c
+++ b/zephyr/test/drivers/default/src/console_cmd/hcdebug.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static void console_cmd_hcdebug_after(void *fixture)
{
ARG_UNUSED(fixture);
diff --git a/zephyr/test/drivers/default/src/console_cmd/hibdelay.c b/zephyr/test/drivers/default/src/console_cmd/hibdelay.c
index c72a2bf66a..8275ece94d 100644
--- a/zephyr/test/drivers/default/src/console_cmd/hibdelay.c
+++ b/zephyr/test/drivers/default/src/console_cmd/hibdelay.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_hibdelay, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/hostevent.c b/zephyr/test/drivers/default/src/console_cmd/hostevent.c
index acb8b890e4..85717e88d1 100644
--- a/zephyr/test/drivers/default/src/console_cmd/hostevent.c
+++ b/zephyr/test/drivers/default/src/console_cmd/hostevent.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "include/lpc.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
#ifdef CONFIG_HOST_EVENT64
#define HOSTEVENT_PRINT_FORMAT "016" PRIx64
#else
diff --git a/zephyr/test/drivers/default/src/console_cmd/i2c_portmap.c b/zephyr/test/drivers/default/src/console_cmd/i2c_portmap.c
index 4b2ec548a2..7651127218 100644
--- a/zephyr/test/drivers/default/src/console_cmd/i2c_portmap.c
+++ b/zephyr/test/drivers/default/src/console_cmd/i2c_portmap.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_i2c_portmap, drivers_predicate_post_main, NULL, NULL,
NULL, NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/md.c b/zephyr/test/drivers/default/src/console_cmd/md.c
index 138dbccf98..0db049a635 100644
--- a/zephyr/test/drivers/default/src/console_cmd/md.c
+++ b/zephyr/test/drivers/default/src/console_cmd/md.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_md, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/panic_output.c b/zephyr/test/drivers/default/src/console_cmd/panic_output.c
index 7cc809e835..0d98ec6d08 100644
--- a/zephyr/test/drivers/default/src/console_cmd/panic_output.c
+++ b/zephyr/test/drivers/default/src/console_cmd/panic_output.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "panic.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
/* Test panicinfo when a panic hasn't occurred */
ZTEST_USER(console_cmd_panic_output, test_panicinfo)
{
diff --git a/zephyr/test/drivers/default/src/console_cmd/port80.c b/zephyr/test/drivers/default/src/console_cmd/port80.c
index 792895eb27..1d7eb2ad03 100644
--- a/zephyr/test/drivers/default/src/console_cmd/port80.c
+++ b/zephyr/test/drivers/default/src/console_cmd/port80.c
@@ -8,18 +8,17 @@
* @brief Unit Tests for ESPI port 80 console command
*/
-#include <zephyr/logging/log.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "port80.h"
-
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
/**
* @brief TestPurpose: Verify port 80 console commands
*
diff --git a/zephyr/test/drivers/default/src/console_cmd/power_button.c b/zephyr/test/drivers/default/src/console_cmd/power_button.c
index 92d0aeaf78..d9900e8667 100644
--- a/zephyr/test/drivers/default/src/console_cmd/power_button.c
+++ b/zephyr/test/drivers/default/src/console_cmd/power_button.c
@@ -4,6 +4,7 @@
*/
#include <zephyr/ztest.h>
+
#include <console.h>
ZTEST_SUITE(console_cmd_power_button, NULL, NULL, NULL, NULL, NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/powerindebug.c b/zephyr/test/drivers/default/src/console_cmd/powerindebug.c
index 9f52a9b569..946960ea86 100644
--- a/zephyr/test/drivers/default/src/console_cmd/powerindebug.c
+++ b/zephyr/test/drivers/default/src/console_cmd/powerindebug.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_powerindebug, test_no_params)
{
zassert_ok(shell_execute_cmd(get_ec_shell(), "powerindebug"),
diff --git a/zephyr/test/drivers/default/src/console_cmd/pwr_avg.c b/zephyr/test/drivers/default/src/console_cmd/pwr_avg.c
index 737fff14d7..3e00b5e432 100644
--- a/zephyr/test/drivers/default/src/console_cmd/pwr_avg.c
+++ b/zephyr/test/drivers/default/src/console_cmd/pwr_avg.c
@@ -3,17 +3,17 @@
* found in the LICENSE file.
*/
+#include "battery.h"
+#include "console.h"
+#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
+
#include <stdio.h>
#include <zephyr/shell/shell.h>
#include <zephyr/shell/shell_dummy.h> /* nocheck */
#include <zephyr/ztest.h>
-#include "battery.h"
-#include "console.h"
-#include "test/drivers/test_state.h"
-#include "test/drivers/utils.h"
-
ZTEST_SUITE(console_cmd_pwr_avg, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/rtc.c b/zephyr/test/drivers/default/src/console_cmd/rtc.c
index 80530129af..974d3709b7 100644
--- a/zephyr/test/drivers/default/src/console_cmd/rtc.c
+++ b/zephyr/test/drivers/default/src/console_cmd/rtc.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "system.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_rtc, test_rtc_no_arg)
{
char expected_buffer[32];
diff --git a/zephyr/test/drivers/default/src/console_cmd/rw.c b/zephyr/test/drivers/default/src/console_cmd/rw.c
index a25bf5f07c..1560254f92 100644
--- a/zephyr/test/drivers/default/src/console_cmd/rw.c
+++ b/zephyr/test/drivers/default/src/console_cmd/rw.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "test/drivers/test_state.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_rw, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/shared_mem.c b/zephyr/test/drivers/default/src/console_cmd/shared_mem.c
index e7b9396509..ed796124e4 100644
--- a/zephyr/test/drivers/default/src/console_cmd/shared_mem.c
+++ b/zephyr/test/drivers/default/src/console_cmd/shared_mem.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "shared_mem.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_shared_mem, drivers_predicate_post_main, NULL, NULL,
NULL, NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/sleepmask.c b/zephyr/test/drivers/default/src/console_cmd/sleepmask.c
index 6ae017dc66..40d174e6af 100644
--- a/zephyr/test/drivers/default/src/console_cmd/sleepmask.c
+++ b/zephyr/test/drivers/default/src/console_cmd/sleepmask.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
+#include "system.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
-#include "system.h"
+
+#include <zephyr/drivers/emul.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
ZTEST_USER(console_cmd_sleepmask, test_no_args)
{
diff --git a/zephyr/test/drivers/default/src/console_cmd/sleeptimeout.c b/zephyr/test/drivers/default/src/console_cmd/sleeptimeout.c
index d802eb5948..3bd8a39f3f 100644
--- a/zephyr/test/drivers/default/src/console_cmd/sleeptimeout.c
+++ b/zephyr/test/drivers/default/src/console_cmd/sleeptimeout.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_sleeptimeout, test_no_params)
{
zassert_ok(shell_execute_cmd(get_ec_shell(), "sleeptimeout"),
diff --git a/zephyr/test/drivers/default/src/console_cmd/switch.c b/zephyr/test/drivers/default/src/console_cmd/switch.c
index 7d1f63172f..f533ebe7b9 100644
--- a/zephyr/test/drivers/default/src/console_cmd/switch.c
+++ b/zephyr/test/drivers/default/src/console_cmd/switch.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(console_cmd_switch, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/console_cmd/sysinfo.c b/zephyr/test/drivers/default/src/console_cmd/sysinfo.c
index 3aeef6510c..ba14e9158f 100644
--- a/zephyr/test/drivers/default/src/console_cmd/sysinfo.c
+++ b/zephyr/test/drivers/default/src/console_cmd/sysinfo.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
+#include "system.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
-#include "system.h"
+
+#include <zephyr/drivers/emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
ZTEST_USER(console_cmd_sysinfo, test_no_args)
{
diff --git a/zephyr/test/drivers/default/src/console_cmd/tcpci_dump.c b/zephyr/test/drivers/default/src/console_cmd/tcpci_dump.c
index 88379a78bd..fc8533280b 100644
--- a/zephyr/test/drivers/default/src/console_cmd/tcpci_dump.c
+++ b/zephyr/test/drivers/default/src/console_cmd/tcpci_dump.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(console_cmd_tcpci_dump, test_no_params)
{
int rv = shell_execute_cmd(get_ec_shell(), "tcpci_dump");
diff --git a/zephyr/test/drivers/default/src/console_cmd/usb_pd_console.c b/zephyr/test/drivers/default/src/console_cmd/usb_pd_console.c
index a63e2de496..8e40f9ec2a 100644
--- a/zephyr/test/drivers/default/src/console_cmd/usb_pd_console.c
+++ b/zephyr/test/drivers/default/src/console_cmd/usb_pd_console.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
@@ -14,6 +11,9 @@
#include "usb_pd_dpm_sm.h"
#include "usb_prl_sm.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static void console_cmd_usb_pd_after(void *fixture)
{
ARG_UNUSED(fixture);
diff --git a/zephyr/test/drivers/default/src/console_cmd/vboot_hash.c b/zephyr/test/drivers/default/src/console_cmd/vboot_hash.c
index b475f344c8..bdc9dddc66 100644
--- a/zephyr/test/drivers/default/src/console_cmd/vboot_hash.c
+++ b/zephyr/test/drivers/default/src/console_cmd/vboot_hash.c
@@ -2,12 +2,6 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <string.h>
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/sys/util.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "flash.h"
#include "printf.h"
@@ -16,6 +10,13 @@
#include "test/drivers/test_state.h"
#include "vboot_hash.h"
+#include <string.h>
+
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/sys/util.h>
+#include <zephyr/ztest.h>
+
#define CUSTOM_HASH_LENGTH (32)
struct console_cmd_hash_fixture {
diff --git a/zephyr/test/drivers/default/src/console_cmd/version.c b/zephyr/test/drivers/default/src/console_cmd/version.c
index 932cc51449..e3606b5d0e 100644
--- a/zephyr/test/drivers/default/src/console_cmd/version.c
+++ b/zephyr/test/drivers/default/src/console_cmd/version.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
+#include "system.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
-#include "system.h"
+
+#include <zephyr/drivers/emul.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
ZTEST_USER(console_cmd_version, test_no_args)
{
diff --git a/zephyr/test/drivers/default/src/console_cmd/waitms.c b/zephyr/test/drivers/default/src/console_cmd/waitms.c
index 0d03ee7414..703e233568 100644
--- a/zephyr/test/drivers/default/src/console_cmd/waitms.c
+++ b/zephyr/test/drivers/default/src/console_cmd/waitms.c
@@ -3,13 +3,14 @@
* found in the LICENSE file.
*/
+#include "console.h"
+#include "timer.h"
+
#include <stdio.h>
+
#include <zephyr/shell/shell.h>
#include <zephyr/ztest.h>
-#include "console.h"
-#include "timer.h"
-
static void test_int(int ms)
{
char cmd[32];
diff --git a/zephyr/test/drivers/default/src/cros_cbi.c b/zephyr/test/drivers/default/src/cros_cbi.c
index e92765cb52..2669abe21e 100644
--- a/zephyr/test/drivers/default/src/cros_cbi.c
+++ b/zephyr/test/drivers/default/src/cros_cbi.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/device.h>
-#include <zephyr/ztest.h>
-
#include "cros_cbi.h"
#include "test/drivers/test_state.h"
+#include <zephyr/device.h>
+#include <zephyr/ztest.h>
+
ZTEST(cros_cbi, test_check_match)
{
int value;
diff --git a/zephyr/test/drivers/default/src/espi.c b/zephyr/test/drivers/default/src/espi.c
index 413d42b4c1..e526980ef1 100644
--- a/zephyr/test/drivers/default/src/espi.c
+++ b/zephyr/test/drivers/default/src/espi.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <string.h>
-#include <zephyr/fff.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "gpio.h"
#include "host_command.h"
@@ -16,6 +11,12 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <string.h>
+
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define PORT 0
#define AC_OK_OD_GPIO_NAME "acok_od"
diff --git a/zephyr/test/drivers/default/src/flash.c b/zephyr/test/drivers/default/src/flash.c
index 8f8208415e..29ea381893 100644
--- a/zephyr/test/drivers/default/src/flash.c
+++ b/zephyr/test/drivers/default/src/flash.c
@@ -3,13 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/kernel.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "emul/emul_flash.h"
#include "flash.h"
@@ -17,6 +10,13 @@
#include "system.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
+
#define WP_L_GPIO_PATH DT_PATH(named_gpios, wp_l)
static int gpio_wp_l_set(int value)
diff --git a/zephyr/test/drivers/default/src/gpio.c b/zephyr/test/drivers/default/src/gpio.c
index 9950edd84c..7304324532 100644
--- a/zephyr/test/drivers/default/src/gpio.c
+++ b/zephyr/test/drivers/default/src/gpio.c
@@ -8,22 +8,21 @@
* @brief Unit Tests for GPIO.
*/
-#include <zephyr/device.h>
-
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/logging/log.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
#include "ec_tasks.h"
#include "gpio.h"
#include "gpio/gpio.h"
#include "gpio/gpio_int.h"
#include "test/drivers/stubs.h"
-#include "util.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include "util.h"
+
+#include <zephyr/device.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
+#include <zephyr/ztest.h>
extern bool gpio_test_interrupt_triggered;
diff --git a/zephyr/test/drivers/default/src/i2c.c b/zephyr/test/drivers/default/src/i2c.c
index caced4aedf..a1fa2451f5 100644
--- a/zephyr/test/drivers/default/src/i2c.c
+++ b/zephyr/test/drivers/default/src/i2c.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "host_command.h"
#include "i2c.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(i2c, test_i2c_set_speed_success)
{
struct ec_response_i2c_control response;
diff --git a/zephyr/test/drivers/default/src/i2c_passthru.c b/zephyr/test/drivers/default/src/i2c_passthru.c
index 67e1317876..421d4bb69c 100644
--- a/zephyr/test/drivers/default/src/i2c_passthru.c
+++ b/zephyr/test/drivers/default/src/i2c_passthru.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "driver/ln9310.h"
#include "ec_commands.h"
#include "host_command.h"
#include "i2c.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(i2c_passthru, test_read_without_write)
{
uint8_t param_buf[sizeof(struct ec_params_i2c_passthru) +
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb.c b/zephyr/test/drivers/default/src/integration/usbc/usb.c
index 9fc8f66505..31c8887bf1 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb.c
@@ -3,14 +3,10 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
#include "battery_smart.h"
+#include "driver/tcpm/ps8xxx_public.h"
#include "ec_commands.h"
#include "ec_tasks.h"
-#include "driver/tcpm/ps8xxx_public.h"
#include "emul/emul_isl923x.h"
#include "emul/emul_smart_battery.h"
#include "emul/tcpc/emul_ps8xxx.h"
@@ -27,6 +23,10 @@
#include "test/usb_pe.h"
#include "usb_tc_sm.h"
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define BATTERY_NODE DT_NODELABEL(battery)
#define GPIO_AC_OK_PATH DT_PATH(named_gpios, acok_od)
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c b/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c
index d5c975894e..10ade25222 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c
@@ -3,8 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "battery_smart.h"
#include "emul/emul_isl923x.h"
#include "emul/emul_smart_battery.h"
@@ -13,6 +11,8 @@
#include "test/drivers/utils.h"
#include "usb_pd.h"
+#include <zephyr/ztest.h>
+
#define BATTERY_NODE DT_NODELABEL(battery)
struct usb_attach_20v_3a_pd_charger_fixture {
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c
index c29762063c..218ef9550e 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/ztest.h>
-
#include "battery_smart.h"
#include "emul/emul_isl923x.h"
#include "emul/emul_smart_battery.h"
@@ -16,6 +13,10 @@
#include "timer.h"
#include "usb_pd.h"
+#include <stdint.h>
+
+#include <zephyr/ztest.h>
+
struct usb_attach_5v_3a_pd_sink_fixture {
struct tcpci_partner_data sink_5v_3a;
struct tcpci_snk_emul_data snk_ext;
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c
index c2b603e6ad..325b8aee8c 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/sys/byteorder.h>
-#include <zephyr/sys/slist.h>
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "battery_smart.h"
#include "dps.h"
@@ -20,6 +15,11 @@
#include "test/drivers/utils.h"
#include "usb_pd.h"
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/sys/byteorder.h>
+#include <zephyr/sys/slist.h>
+#include <zephyr/ztest.h>
+
#define BATTERY_NODE DT_NODELABEL(battery)
#define GPIO_BATT_PRES_ODL_PATH DT_PATH(named_gpios, ec_batt_pres_odl)
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_attach_src_snk.c b/zephyr/test/drivers/default/src/integration/usbc/usb_attach_src_snk.c
index bcc94fe869..401a89cb11 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_attach_src_snk.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_attach_src_snk.c
@@ -3,24 +3,24 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
+#include "driver/tcpm/ps8xxx_public.h"
#include "ec_commands.h"
#include "ec_tasks.h"
-#include "driver/tcpm/ps8xxx_public.h"
#include "emul/emul_isl923x.h"
#include "emul/tcpc/emul_ps8xxx.h"
#include "emul/tcpc/emul_tcpci.h"
#include "emul/tcpc/emul_tcpci_partner_snk.h"
#include "emul/tcpc/emul_tcpci_partner_src.h"
#include "host_command.h"
-#include "test/drivers/stubs.h"
#include "tcpm/tcpci.h"
-#include "test/usb_pe.h"
-#include "test/drivers/utils.h"
+#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
+#include "test/usb_pe.h"
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
#define SNK_PORT USBC_PORT_C0
#define SRC_PORT USBC_PORT_C1
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_bist_shared.c b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_bist_shared.c
index 56cbee7ad0..36a417d22c 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_bist_shared.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_bist_shared.c
@@ -3,8 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "emul/emul_isl923x.h"
#include "emul/emul_smart_battery.h"
#include "emul/tcpc/emul_tcpci_partner_snk.h"
@@ -15,6 +13,8 @@
#include "usb_pd.h"
#include "util.h"
+#include <zephyr/ztest.h>
+
struct usb_pd_bist_shared_fixture {
struct tcpci_partner_data sink_5v_500ma;
struct tcpci_snk_emul_data snk_ext_500ma;
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c
index 87b559dd7c..1d3da4921f 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
#include "ec_tasks.h"
#include "emul/emul_isl923x.h"
@@ -17,6 +14,10 @@
#include "test/usb_pe.h"
#include "usb_pd.h"
+#include <stdint.h>
+
+#include <zephyr/ztest.h>
+
#define TEST_USB_PORT 0
BUILD_ASSERT(TEST_USB_PORT == USBC_PORT_C0);
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_rev3.c b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_rev3.c
index 2eff9996f2..781a0cc06a 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_rev3.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_rev3.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/sys/byteorder.h>
-#include <zephyr/sys/slist.h>
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "battery_smart.h"
#include "chipset.h"
@@ -21,6 +17,10 @@
#include "usb_pd.h"
#include "util.h"
+#include <zephyr/sys/byteorder.h>
+#include <zephyr/sys/slist.h>
+#include <zephyr/ztest.h>
+
struct usb_attach_5v_3a_pd_source_rev3_fixture {
struct tcpci_partner_data source_5v_3a;
struct tcpci_src_emul_data src_ext;
diff --git a/zephyr/test/drivers/default/src/isl923x.c b/zephyr/test/drivers/default/src/isl923x.c
index e17dbbe797..72aad72cd9 100644
--- a/zephyr/test/drivers/default/src/isl923x.c
+++ b/zephyr/test/drivers/default/src/isl923x.c
@@ -3,21 +3,21 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/fff.h>
-
#include "battery.h"
#include "battery_smart.h"
-#include "test/drivers/charger_utils.h"
#include "driver/charger/isl923x.h"
#include "driver/charger/isl923x_public.h"
#include "emul/emul_common_i2c.h"
#include "emul/emul_isl923x.h"
#include "system.h"
+#include "test/drivers/charger_utils.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
BUILD_ASSERT(CONFIG_CHARGER_SENSE_RESISTOR == 10 ||
CONFIG_CHARGER_SENSE_RESISTOR == 5);
diff --git a/zephyr/test/drivers/default/src/led.c b/zephyr/test/drivers/default/src/led.c
index e89a3d8b66..3f727599b4 100644
--- a/zephyr/test/drivers/default/src/led.c
+++ b/zephyr/test/drivers/default/src/led.c
@@ -3,12 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/ztest_assert.h>
-
-#include <zephyr/device.h>
-#include <zephyr/drivers/pwm.h>
-
#include "ec_commands.h"
#include "led.h"
#include "led_common.h"
@@ -16,6 +10,11 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/device.h>
+#include <zephyr/drivers/pwm.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
ZTEST_SUITE(pwm_led_driver, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);
diff --git a/zephyr/test/drivers/default/src/lid_angle.c b/zephyr/test/drivers/default/src/lid_angle.c
index 568057d95a..3611e176d4 100644
--- a/zephyr/test/drivers/default/src/lid_angle.c
+++ b/zephyr/test/drivers/default/src/lid_angle.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "lid_angle.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
#define LID_ANGLE_MIN_LARGE_ANGLE 0
#define LID_ANGLE_MAX_LARGE_ANGLE 360
diff --git a/zephyr/test/drivers/default/src/lid_switch.c b/zephyr/test/drivers/default/src/lid_switch.c
index a0920234b3..2fe7daa85a 100644
--- a/zephyr/test/drivers/default/src/lid_switch.c
+++ b/zephyr/test/drivers/default/src/lid_switch.c
@@ -3,18 +3,19 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
+#include "ec_commands.h"
+#include "host_command.h"
+#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
+
#include <zephyr/drivers/emul.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <lid_switch.h>
#include <zephyr/shell/shell_dummy.h>
-#include <console.h>
+#include <zephyr/ztest.h>
-#include "test/drivers/test_state.h"
-#include "test/drivers/utils.h"
-#include "ec_commands.h"
-#include "host_command.h"
+#include <console.h>
+#include <lid_switch.h>
#define LID_GPIO_PATH DT_PATH(named_gpios, lid_open_ec)
#define LID_GPIO_PIN DT_GPIO_PIN(LID_GPIO_PATH, gpios)
diff --git a/zephyr/test/drivers/default/src/lis2dw12.c b/zephyr/test/drivers/default/src/lis2dw12.c
index 8f5e30e559..4cacf725ba 100644
--- a/zephyr/test/drivers/default/src/lis2dw12.c
+++ b/zephyr/test/drivers/default/src/lis2dw12.c
@@ -3,13 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/emul.h>
#include "driver/accel_lis2dw12.h"
#include "emul/emul_common_i2c.h"
#include "emul/emul_lis2dw12.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/ztest.h>
+
#define LIS2DW12_NODELABEL DT_NODELABEL(ms_lis2dw12_accel)
#define LIS2DW12_SENSOR_ID SENSOR_ID(LIS2DW12_NODELABEL)
#define LIS2DW12_EMUL_NODE DT_NODELABEL(lis2dw12_emul)
diff --git a/zephyr/test/drivers/default/src/ln9310.c b/zephyr/test/drivers/default/src/ln9310.c
index 414c62287c..509d6831ec 100644
--- a/zephyr/test/drivers/default/src/ln9310.c
+++ b/zephyr/test/drivers/default/src/ln9310.c
@@ -3,17 +3,17 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest_assert.h>
-#include <zephyr/drivers/i2c_emul.h>
-
#include "driver/ln9310.h"
-#include "emul/emul_ln9310.h"
#include "emul/emul_common_i2c.h"
-#include "timer.h"
+#include "emul/emul_ln9310.h"
#include "test/drivers/test_state.h"
+#include "timer.h"
+
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/i2c_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
/*
* TODO(b/201420132): Implement approach for tests to immediately schedule work
diff --git a/zephyr/test/drivers/default/src/locate_chip.c b/zephyr/test/drivers/default/src/locate_chip.c
index 6842543971..c54031c5df 100644
--- a/zephyr/test/drivers/default/src/locate_chip.c
+++ b/zephyr/test/drivers/default/src/locate_chip.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
+#include "host_command.h"
+#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
+
#include <zephyr/fff.h>
-#include <zephyr/shell/shell.h>
#include <zephyr/kernel.h>
+#include <zephyr/shell/shell.h>
#include <zephyr/ztest.h>
-#include "test/drivers/test_state.h"
-#include "test/drivers/utils.h"
-#include "host_command.h"
-
/**
* @brief TestPurpose: test the TCPC locate valid case.
*/
diff --git a/zephyr/test/drivers/default/src/motion_sense/motion_sense.c b/zephyr/test/drivers/default/src/motion_sense/motion_sense.c
index 42ee056874..c3f03e4ade 100644
--- a/zephyr/test/drivers/default/src/motion_sense/motion_sense.c
+++ b/zephyr/test/drivers/default/src/motion_sense/motion_sense.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "motion_sense.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(motion_sense, drivers_predicate_post_main, NULL, NULL, NULL, NULL);
ZTEST_USER(motion_sense, ec_motion_sensor_fill_values)
diff --git a/zephyr/test/drivers/default/src/panic.c b/zephyr/test/drivers/default/src/panic.c
index 7dcb18e4cf..a2addc786d 100644
--- a/zephyr/test/drivers/default/src/panic.c
+++ b/zephyr/test/drivers/default/src/panic.c
@@ -8,18 +8,17 @@
* @brief Unit Tests for panic.
*/
-#include <zephyr/device.h>
-
-#include <zephyr/logging/log.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
#include "ec_tasks.h"
#include "panic.h"
#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
+#include <zephyr/device.h>
+#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
+#include <zephyr/ztest.h>
+
struct panic_test_fixture {
struct panic_data saved_pdata;
};
diff --git a/zephyr/test/drivers/default/src/panic_output.c b/zephyr/test/drivers/default/src/panic_output.c
index 210c862901..f815744d8c 100644
--- a/zephyr/test/drivers/default/src/panic_output.c
+++ b/zephyr/test/drivers/default/src/panic_output.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "panic.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST_SUITE(panic_output, drivers_predicate_post_main, NULL, NULL, NULL, NULL);
ZTEST(panic_output, test_panic_printf)
diff --git a/zephyr/test/drivers/default/src/port80.c b/zephyr/test/drivers/default/src/port80.c
index 8563c2e478..6bde1392c7 100644
--- a/zephyr/test/drivers/default/src/port80.c
+++ b/zephyr/test/drivers/default/src/port80.c
@@ -8,19 +8,18 @@
* @brief Unit Tests for ESPI port 80 writes
*/
-#include <zephyr/logging/log.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "host_command.h"
#include "port80.h"
-
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
/*
* Flush any existing writes.
*/
diff --git a/zephyr/test/drivers/default/src/power_common.c b/zephyr/test/drivers/default/src/power_common.c
index f96fed9f05..6e18204188 100644
--- a/zephyr/test/drivers/default/src/power_common.c
+++ b/zephyr/test/drivers/default/src/power_common.c
@@ -3,31 +3,30 @@
* found in the LICENSE file.
*/
-#include <string.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/shell/shell_uart.h>
-
+#include "battery.h"
+#include "battery_smart.h"
#include "chipset.h"
#include "common.h"
+#include "ec_tasks.h"
+#include "emul/emul_common_i2c.h"
+#include "emul/emul_smart_battery.h"
#include "extpower.h"
#include "hooks.h"
#include "host_command.h"
#include "power.h"
-#include "test/drivers/stubs.h"
#include "task.h"
-#include "ec_tasks.h"
+#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
-#include "emul/emul_common_i2c.h"
-#include "emul/emul_smart_battery.h"
+#include <string.h>
-#include "battery.h"
-#include "battery_smart.h"
-#include "test/drivers/utils.h"
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/shell/shell_uart.h>
+#include <zephyr/ztest.h>
#define BATTERY_NODE DT_NODELABEL(battery)
diff --git a/zephyr/test/drivers/default/src/ppc_sn5s330.c b/zephyr/test/drivers/default/src/ppc_sn5s330.c
index eb595939fc..664d9fed36 100644
--- a/zephyr/test/drivers/default/src/ppc_sn5s330.c
+++ b/zephyr/test/drivers/default/src/ppc_sn5s330.c
@@ -3,20 +3,20 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/device.h>
-#include <zephyr/devicetree.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/ztest.h>
-#include <zephyr/fff.h>
-
#include "driver/ppc/sn5s330.h"
#include "driver/ppc/sn5s330_public.h"
#include "emul/emul_common_i2c.h"
#include "emul/emul_sn5s330.h"
-#include "usbc_ppc.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include "usbc_ppc.h"
+
+#include <zephyr/device.h>
+#include <zephyr/devicetree.h>
+#include <zephyr/drivers/emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
/** This must match the index of the sn5s330 in ppc_chips[] */
#define SN5S330_PORT 0
diff --git a/zephyr/test/drivers/default/src/ppc_syv682x.c b/zephyr/test/drivers/default/src/ppc_syv682x.c
index 648510da07..6e1602804e 100644
--- a/zephyr/test/drivers/default/src/ppc_syv682x.c
+++ b/zephyr/test/drivers/default/src/ppc_syv682x.c
@@ -3,24 +3,24 @@
* found in the LICENSE file.
*/
+#include "emul/emul_common_i2c.h"
+#include "emul/emul_syv682x.h"
+#include "syv682x.h"
+#include "test/drivers/stubs.h"
+#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
+#include "timer.h"
+#include "usbc_ppc.h"
+
#include <zephyr/device.h>
#include <zephyr/devicetree/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
#include <zephyr/fff.h>
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <zephyr/ztest_assert.h>
-#include "emul/emul_common_i2c.h"
-#include "emul/emul_syv682x.h"
-#include "test/drivers/stubs.h"
-#include "syv682x.h"
-#include "timer.h"
-#include "test/drivers/test_state.h"
-#include "test/drivers/utils.h"
-#include "usbc_ppc.h"
-
#define SYV682X_NODE DT_NODELABEL(syv682x_emul)
#define GPIO_USB_C1_FRS_EN_PATH DT_PATH(named_gpios, usb_c1_frs_en)
diff --git a/zephyr/test/drivers/default/src/ps8xxx.c b/zephyr/test/drivers/default/src/ps8xxx.c
index 6fb1658c06..cb0ac7d2d5 100644
--- a/zephyr/test/drivers/default/src/ps8xxx.c
+++ b/zephyr/test/drivers/default/src/ps8xxx.c
@@ -3,22 +3,21 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
+#include "driver/tcpm/ps8xxx.h"
+#include "driver/tcpm/ps8xxx_public.h"
#include "emul/emul_common_i2c.h"
-#include "emul/tcpc/emul_tcpci.h"
#include "emul/tcpc/emul_ps8xxx.h"
-#include "timer.h"
+#include "emul/tcpc/emul_tcpci.h"
#include "i2c.h"
+#include "tcpm/tcpci.h"
#include "test/drivers/stubs.h"
#include "test/drivers/tcpci_test_common.h"
-
-#include "tcpm/tcpci.h"
-#include "driver/tcpm/ps8xxx.h"
-#include "driver/tcpm/ps8xxx_public.h"
#include "test/drivers/test_state.h"
+#include "timer.h"
+
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
#define PS8XXX_EMUL_NODE DT_NODELABEL(ps8xxx_emul)
diff --git a/zephyr/test/drivers/default/src/smart.c b/zephyr/test/drivers/default/src/smart.c
index 9db292ac96..a26d84b93c 100644
--- a/zephyr/test/drivers/default/src/smart.c
+++ b/zephyr/test/drivers/default/src/smart.c
@@ -3,21 +3,20 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/shell/shell_uart.h>
-
+#include "battery.h"
+#include "battery_smart.h"
#include "common.h"
#include "console.h"
-#include "i2c.h"
#include "emul/emul_common_i2c.h"
#include "emul/emul_smart_battery.h"
-
-#include "battery.h"
-#include "battery_smart.h"
+#include "i2c.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/shell/shell_uart.h>
+#include <zephyr/ztest.h>
+
#define BATTERY_NODE DT_NODELABEL(battery)
/** Test all simple getters */
diff --git a/zephyr/test/drivers/default/src/stm_mems_common.c b/zephyr/test/drivers/default/src/stm_mems_common.c
index f7c59105b0..09f1cf8506 100644
--- a/zephyr/test/drivers/default/src/stm_mems_common.c
+++ b/zephyr/test/drivers/default/src/stm_mems_common.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/device.h>
-#include <zephyr/devicetree.h>
-#include <errno.h>
-
#include "common.h"
#include "driver/stm_mems_common.h"
#include "emul/emul_common_i2c.h"
@@ -15,6 +10,12 @@
#include "i2c/i2c.h"
#include "test/drivers/test_state.h"
+#include <errno.h>
+
+#include <zephyr/device.h>
+#include <zephyr/devicetree.h>
+#include <zephyr/ztest.h>
+
#define MOCK_EMUL EMUL_DT_GET(DT_NODELABEL(i2c_mock))
#define COMMON_DATA emul_i2c_mock_get_i2c_common_data(MOCK_EMUL)
diff --git a/zephyr/test/drivers/default/src/tablet_mode.c b/zephyr/test/drivers/default/src/tablet_mode.c
index d600d26072..c947663239 100644
--- a/zephyr/test/drivers/default/src/tablet_mode.c
+++ b/zephyr/test/drivers/default/src/tablet_mode.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "tablet_mode.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
static void tabletmode_before(void *state)
{
ARG_UNUSED(state);
diff --git a/zephyr/test/drivers/default/src/task.c b/zephyr/test/drivers/default/src/task.c
index 1f29a4f2f2..4c4087c5a1 100644
--- a/zephyr/test/drivers/default/src/task.c
+++ b/zephyr/test/drivers/default/src/task.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "task.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
#include "timer.h"
+#include <zephyr/ztest.h>
+
struct tasks_fixture {
timestamp_t fake_time;
};
diff --git a/zephyr/test/drivers/default/src/tcpci.c b/zephyr/test/drivers/default/src/tcpci.c
index de2437eb96..f648b43a96 100644
--- a/zephyr/test/drivers/default/src/tcpci.c
+++ b/zephyr/test/drivers/default/src/tcpci.c
@@ -3,23 +3,22 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
#include "common.h"
#include "ec_tasks.h"
#include "emul/emul_common_i2c.h"
#include "emul/tcpc/emul_tcpci.h"
#include "hooks.h"
#include "i2c.h"
+#include "tcpm/tcpci.h"
#include "test/drivers/stubs.h"
#include "test/drivers/tcpci_test_common.h"
-
-#include "tcpm/tcpci.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define TCPCI_EMUL_NODE DT_NODELABEL(tcpci_emul)
/* Convenience pointer directly to the TCPCI mux under test */
diff --git a/zephyr/test/drivers/default/src/tcpci_test_common.c b/zephyr/test/drivers/default/src/tcpci_test_common.c
index 473fbe0f20..06f03d4834 100644
--- a/zephyr/test/drivers/default/src/tcpci_test_common.c
+++ b/zephyr/test/drivers/default/src/tcpci_test_common.c
@@ -3,15 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
#include "emul/emul_common_i2c.h"
#include "emul/tcpc/emul_tcpci.h"
+#include "tcpm/tcpci.h"
#include "test/drivers/tcpci_test_common.h"
-#include "tcpm/tcpci.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
/** Check TCPC register value */
void check_tcpci_reg_f(const struct emul *emul, int reg, uint16_t exp_val,
diff --git a/zephyr/test/drivers/default/src/tcs3400.c b/zephyr/test/drivers/default/src/tcs3400.c
index 045451169e..dba8dc5c56 100644
--- a/zephyr/test/drivers/default/src/tcs3400.c
+++ b/zephyr/test/drivers/default/src/tcs3400.c
@@ -3,19 +3,18 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
-#include "i2c.h"
-#include "emul/emul_tcs3400.h"
+#include "driver/als_tcs3400.h"
#include "emul/emul_common_i2c.h"
-
+#include "emul/emul_tcs3400.h"
+#include "i2c.h"
#include "motion_sense.h"
#include "motion_sense_fifo.h"
-#include "driver/als_tcs3400.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define TCS_NODE DT_NODELABEL(tcs_emul)
#define TCS_CLR_SENSOR_ID SENSOR_ID(DT_NODELABEL(tcs3400_clear))
#define TCS_RGB_SENSOR_ID SENSOR_ID(DT_NODELABEL(tcs3400_rgb))
diff --git a/zephyr/test/drivers/default/src/temp_sensor.c b/zephyr/test/drivers/default/src/temp_sensor.c
index f387302d73..83d9aa3812 100644
--- a/zephyr/test/drivers/default/src/temp_sensor.c
+++ b/zephyr/test/drivers/default/src/temp_sensor.c
@@ -3,16 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/adc.h>
-#include <zephyr/drivers/adc/adc_emul.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/drivers/emul.h>
-
-#include <math.h>
-
#include "common.h"
#include "driver/temp_sensor/pct2075.h"
#include "emul/emul_pct2075.h"
@@ -22,6 +12,16 @@
#include "test/drivers/test_state.h"
#include "timer.h"
+#include <math.h>
+
+#include <zephyr/drivers/adc.h>
+#include <zephyr/drivers/adc/adc_emul.h>
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define GPIO_PG_EC_DSW_PWROK_PATH DT_PATH(named_gpios, pg_ec_dsw_pwrok)
#define GPIO_PG_EC_DSW_PWROK_PORT DT_GPIO_PIN(GPIO_PG_EC_DSW_PWROK_PATH, gpios)
diff --git a/zephyr/test/drivers/default/src/thermistor.c b/zephyr/test/drivers/default/src/thermistor.c
index 9e41307618..edbe7acad5 100644
--- a/zephyr/test/drivers/default/src/thermistor.c
+++ b/zephyr/test/drivers/default/src/thermistor.c
@@ -3,18 +3,19 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
+#include "../driver/temp_sensor/thermistor.h"
+#include "common.h"
+#include "temp_sensor/temp_sensor.h"
+#include "test/drivers/test_state.h"
+
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/adc/adc_emul.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <temp_sensor.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
-#include "common.h"
-#include "../driver/temp_sensor/thermistor.h"
-#include "temp_sensor/temp_sensor.h"
-#include "test/drivers/test_state.h"
+#include <temp_sensor.h>
#define GPIO_PG_EC_DSW_PWROK_PATH DT_PATH(named_gpios, pg_ec_dsw_pwrok)
#define GPIO_PG_EC_DSW_PWROK_PORT DT_GPIO_PIN(GPIO_PG_EC_DSW_PWROK_PATH, gpios)
diff --git a/zephyr/test/drivers/default/src/uart_hostcmd.c b/zephyr/test/drivers/default/src/uart_hostcmd.c
index 5e1e200fa9..907dba929f 100644
--- a/zephyr/test/drivers/default/src/uart_hostcmd.c
+++ b/zephyr/test/drivers/default/src/uart_hostcmd.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "host_command.h"
-#include "uart.h"
#include "test/drivers/test_state.h"
+#include "uart.h"
+
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
/** Messages used in test */
static const char msg1[] = "test";
diff --git a/zephyr/test/drivers/default/src/usb_mux.c b/zephyr/test/drivers/default/src/usb_mux.c
index 4aea56962e..0e89cf2398 100644
--- a/zephyr/test/drivers/default/src/usb_mux.c
+++ b/zephyr/test/drivers/default/src/usb_mux.c
@@ -3,30 +3,29 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/shell/shell_uart.h>
-
#include "common.h"
#include "ec_commands.h"
#include "ec_tasks.h"
-#include <zephyr/fff.h>
#include "hooks.h"
#include "host_command.h"
#include "i2c.h"
-#include "test/drivers/stubs.h"
#include "task.h"
#include "tcpm/ps8xxx_public.h"
#include "tcpm/tcpci.h"
+#include "test/drivers/stubs.h"
+#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
+#include "usb_mux.h"
#include "usb_prl_sm.h"
#include "usb_tc_sm.h"
-#include "usb_mux.h"
-#include "test/drivers/test_state.h"
-#include "test/drivers/utils.h"
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/shell/shell_uart.h>
+#include <zephyr/ztest.h>
/** Copy of original usb_muxes[USB_PORT_C1] */
static struct usb_mux_chain usb_mux_c1;
diff --git a/zephyr/test/drivers/default/src/util.c b/zephyr/test/drivers/default/src/util.c
index 32f989bb0f..342ce9b971 100644
--- a/zephyr/test/drivers/default/src/util.c
+++ b/zephyr/test/drivers/default/src/util.c
@@ -2,11 +2,11 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/fff.h>
-
-#include "util.h"
#include "test/drivers/test_state.h"
+#include "util.h"
+
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
ZTEST(util, reverse)
{
diff --git a/zephyr/test/drivers/default/src/vboot_hash.c b/zephyr/test/drivers/default/src/vboot_hash.c
index 04f535a89c..61d4260a23 100644
--- a/zephyr/test/drivers/default/src/vboot_hash.c
+++ b/zephyr/test/drivers/default/src/vboot_hash.c
@@ -3,14 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <sha256.h>
-
#include "ec_commands.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
+#include <sha256.h>
+
ZTEST_USER(vboot_hash, test_hostcmd_abort)
{
struct ec_response_vboot_hash response;
diff --git a/zephyr/test/drivers/default/src/virtual_battery.c b/zephyr/test/drivers/default/src/virtual_battery.c
index 87c031e723..ee3eab217c 100644
--- a/zephyr/test/drivers/default/src/virtual_battery.c
+++ b/zephyr/test/drivers/default/src/virtual_battery.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "battery_smart.h"
#include "ec_commands.h"
@@ -13,6 +10,9 @@
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
void copy_memmap_string(uint8_t *dest, int offset, int len);
/* The param buffer has at most 2 msg's (write + read) and 1 byte write len. */
diff --git a/zephyr/test/drivers/default/src/vstore.c b/zephyr/test/drivers/default/src/vstore.c
index b4264aaeb3..923d14ff00 100644
--- a/zephyr/test/drivers/default/src/vstore.c
+++ b/zephyr/test/drivers/default/src/vstore.c
@@ -3,19 +3,20 @@
* found in the LICENSE file.
*/
+#include "ec_commands.h"
+#include "host_command.h"
+#include "system.h"
+#include "system_fake.h"
+#include "test/drivers/test_state.h"
+#include "vstore.h"
+
#include <setjmp.h>
-#include <console.h>
#include <zephyr/fff.h>
#include <zephyr/shell/shell_dummy.h>
#include <zephyr/ztest.h>
-#include "ec_commands.h"
-#include "host_command.h"
-#include "system.h"
-#include "system_fake.h"
-#include "vstore.h"
-#include "test/drivers/test_state.h"
+#include <console.h>
ZTEST_SUITE(vstore, drivers_predicate_post_main, NULL, NULL, NULL, NULL);
diff --git a/zephyr/test/drivers/default/src/watchdog.c b/zephyr/test/drivers/default/src/watchdog.c
index 958aa3eaaa..a82800a6de 100644
--- a/zephyr/test/drivers/default/src/watchdog.c
+++ b/zephyr/test/drivers/default/src/watchdog.c
@@ -8,20 +8,19 @@
* @brief Unit Tests for watchdog.
*/
-#include <zephyr/device.h>
-#include <zephyr/drivers/watchdog.h>
-
-#include <zephyr/logging/log.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
#include "ec_tasks.h"
-#include <zephyr/fff.h>
#include "hooks.h"
#include "test/drivers/stubs.h"
-#include "watchdog.h"
#include "test/drivers/test_state.h"
+#include "watchdog.h"
+
+#include <zephyr/device.h>
+#include <zephyr/drivers/watchdog.h>
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/logging/log.h>
+#include <zephyr/ztest.h>
#define wdt DEVICE_DT_GET(DT_CHOSEN(cros_ec_watchdog))
diff --git a/zephyr/test/drivers/dps/src/dps.c b/zephyr/test/drivers/dps/src/dps.c
index 88fd81a709..a573da670b 100644
--- a/zephyr/test/drivers/dps/src/dps.c
+++ b/zephyr/test/drivers/dps/src/dps.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "builtin/stdio.h"
#include "console.h"
#include "dps.h"
#include "test/drivers/test_state.h"
#include "timer.h"
+#include <zephyr/ztest.h>
+
struct dps_fixture {
struct dps_config_t saved_config;
int saved_debug_level;
diff --git a/zephyr/test/drivers/host_cmd/src/adc.c b/zephyr/test/drivers/host_cmd/src/adc.c
index 6b2bef1165..f283ef17d5 100644
--- a/zephyr/test/drivers/host_cmd/src/adc.c
+++ b/zephyr/test/drivers/host_cmd/src/adc.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/fff.h>
-#include <zephyr/ztest.h>
-
#include "adc.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, adc_read_channel, enum adc_channel);
ZTEST(hc_adc, normal_path)
diff --git a/zephyr/test/drivers/host_cmd/src/battery_cut_off.c b/zephyr/test/drivers/host_cmd/src/battery_cut_off.c
index ed9d96481d..019362f3c8 100644
--- a/zephyr/test/drivers/host_cmd/src/battery_cut_off.c
+++ b/zephyr/test/drivers/host_cmd/src/battery_cut_off.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "emul/emul_common_i2c.h"
#include "emul/emul_smart_battery.h"
@@ -14,6 +11,9 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/ztest.h>
+
struct host_cmd_battery_cut_off_fixture {
const struct emul *emul;
struct i2c_common_emul_data *i2c_emul;
diff --git a/zephyr/test/drivers/host_cmd/src/battery_display_soc.c b/zephyr/test/drivers/host_cmd/src/battery_display_soc.c
index 029551a49b..6af3d35043 100644
--- a/zephyr/test/drivers/host_cmd/src/battery_display_soc.c
+++ b/zephyr/test/drivers/host_cmd/src/battery_display_soc.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "charge_state.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(battery_display_soc, happy_path)
{
const uint32_t full_charge_as_tenths =
diff --git a/zephyr/test/drivers/host_cmd/src/battery_v2.c b/zephyr/test/drivers/host_cmd/src/battery_v2.c
index 3e0ac969f9..a6fab89b8c 100644
--- a/zephyr/test/drivers/host_cmd/src/battery_v2.c
+++ b/zephyr/test/drivers/host_cmd/src/battery_v2.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "ec_commands.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST(host_cmd_battery_v2, test_get_static__invalid_index)
{
struct ec_response_battery_static_info response;
diff --git a/zephyr/test/drivers/host_cmd/src/charge_manager.c b/zephyr/test/drivers/host_cmd/src/charge_manager.c
index 50a476dd99..6bbf7a3ae3 100644
--- a/zephyr/test/drivers/host_cmd/src/charge_manager.c
+++ b/zephyr/test/drivers/host_cmd/src/charge_manager.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "charge_manager.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(charge_manager, test_port_count)
{
struct ec_response_charge_port_count response = { 0 };
diff --git a/zephyr/test/drivers/host_cmd/src/get_cmd_versions.c b/zephyr/test/drivers/host_cmd/src/get_cmd_versions.c
index b935b69e46..0fa7ab3770 100644
--- a/zephyr/test/drivers/host_cmd/src/get_cmd_versions.c
+++ b/zephyr/test/drivers/host_cmd/src/get_cmd_versions.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "battery.h"
#include "charge_state.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(hc_get_cmd_versions, test_v0__both_versions)
{
struct ec_params_get_cmd_versions params = {
diff --git a/zephyr/test/drivers/host_cmd/src/get_panic_info.c b/zephyr/test/drivers/host_cmd/src/get_panic_info.c
index bdb19d9a98..85d5fdd6f2 100644
--- a/zephyr/test/drivers/host_cmd/src/get_panic_info.c
+++ b/zephyr/test/drivers/host_cmd/src/get_panic_info.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "host_command.h"
#include "panic.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
struct host_cmd_get_panic_info_fixture {
struct panic_data saved_pdata;
};
diff --git a/zephyr/test/drivers/host_cmd/src/get_pd_port_caps.c b/zephyr/test/drivers/host_cmd/src/get_pd_port_caps.c
index 721fbcd8f9..2d9410232d 100644
--- a/zephyr/test/drivers/host_cmd/src/get_pd_port_caps.c
+++ b/zephyr/test/drivers/host_cmd/src/get_pd_port_caps.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(host_cmd_get_pd_port_caps, test_good_index)
{
struct ec_params_get_pd_port_caps params = { .port = 0 };
diff --git a/zephyr/test/drivers/host_cmd/src/host_command.c b/zephyr/test/drivers/host_cmd/src/host_command.c
index 49e41acc89..a9f0fcb941 100644
--- a/zephyr/test/drivers/host_cmd/src/host_command.c
+++ b/zephyr/test/drivers/host_cmd/src/host_command.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST(host_cmd_host_commands, get_command_versions__v1)
{
struct ec_response_get_cmd_versions response;
diff --git a/zephyr/test/drivers/host_cmd/src/host_command_test_protocol.c b/zephyr/test/drivers/host_cmd/src/host_command_test_protocol.c
index 9d29aeb7de..f4bf956e9b 100644
--- a/zephyr/test/drivers/host_cmd/src/host_command_test_protocol.c
+++ b/zephyr/test/drivers/host_cmd/src/host_command_test_protocol.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(hc_test_protocol, test_echo_max_buffer_size)
{
struct ec_params_test_protocol params = {
diff --git a/zephyr/test/drivers/host_cmd/src/host_event_commands.c b/zephyr/test/drivers/host_cmd/src/host_event_commands.c
index c2f7e72045..8e7fff0fe2 100644
--- a/zephyr/test/drivers/host_cmd/src/host_event_commands.c
+++ b/zephyr/test/drivers/host_cmd/src/host_event_commands.c
@@ -3,11 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
#include "include/lpc.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/ztest.h>
+
struct host_cmd_host_event_commands_fixture {
struct host_events_ctx ctx;
};
diff --git a/zephyr/test/drivers/host_cmd/src/host_event_commands_deprecated.c b/zephyr/test/drivers/host_cmd/src/host_event_commands_deprecated.c
index 6d0a386d6e..3c72bb5f51 100644
--- a/zephyr/test/drivers/host_cmd/src/host_event_commands_deprecated.c
+++ b/zephyr/test/drivers/host_cmd/src/host_event_commands_deprecated.c
@@ -5,11 +5,12 @@
/* Tests for deprecated EC_CMD_HOST_EVENT_* commands */
-#include <zephyr/ztest.h>
#include "include/lpc.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/ztest.h>
+
#define HOST_EVENT_TEST_MASK_VAL EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN)
static void
diff --git a/zephyr/test/drivers/host_cmd/src/host_request_expected_size.c b/zephyr/test/drivers/host_cmd/src/host_request_expected_size.c
index 30ff8c11b2..19fdd9ea4a 100644
--- a/zephyr/test/drivers/host_cmd/src/host_request_expected_size.c
+++ b/zephyr/test/drivers/host_cmd/src/host_request_expected_size.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "host_command.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
ZTEST(host_request_expected_size, test_mismatched_host_request_version)
{
const struct ec_host_request request = {
diff --git a/zephyr/test/drivers/host_cmd/src/keyboard_mkbp.c b/zephyr/test/drivers/host_cmd/src/keyboard_mkbp.c
index 4c74a48ab4..e77230cfaf 100644
--- a/zephyr/test/drivers/host_cmd/src/keyboard_mkbp.c
+++ b/zephyr/test/drivers/host_cmd/src/keyboard_mkbp.c
@@ -3,11 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
#include "include/keyboard_mkbp.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/ztest.h>
+
struct keyboard_mkbp_commands_fixture {
struct ec_mkbp_config config;
};
diff --git a/zephyr/test/drivers/host_cmd/src/motion_sense.c b/zephyr/test/drivers/host_cmd/src/motion_sense.c
index 1b35eb637c..919baf7219 100644
--- a/zephyr/test/drivers/host_cmd/src/motion_sense.c
+++ b/zephyr/test/drivers/host_cmd/src/motion_sense.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "atomic.h"
#include "console.h"
#include "driver/accel_bma2x2.h"
@@ -17,6 +13,10 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, mock_set_range, struct motion_sensor_t *, int, int);
FAKE_VALUE_FUNC(int, mock_set_offset, const struct motion_sensor_t *,
const int16_t *, int16_t);
diff --git a/zephyr/test/drivers/host_cmd/src/pd_chip_info.c b/zephyr/test/drivers/host_cmd/src/pd_chip_info.c
index 54c8786548..c04e74810a 100644
--- a/zephyr/test/drivers/host_cmd/src/pd_chip_info.c
+++ b/zephyr/test/drivers/host_cmd/src/pd_chip_info.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
#define TEST_PORT USBC_PORT_C0
#define BAD_PORT 65
diff --git a/zephyr/test/drivers/host_cmd/src/pd_control.c b/zephyr/test/drivers/host_cmd/src/pd_control.c
index 97624fdb34..a881a8e0ea 100644
--- a/zephyr/test/drivers/host_cmd/src/pd_control.c
+++ b/zephyr/test/drivers/host_cmd/src/pd_control.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
#define TEST_PORT USBC_PORT_C0
#define BAD_PORT 82
diff --git a/zephyr/test/drivers/host_cmd/src/pd_log.c b/zephyr/test/drivers/host_cmd/src/pd_log.c
index a6022d8bb1..6b5ffc197d 100644
--- a/zephyr/test/drivers/host_cmd/src/pd_log.c
+++ b/zephyr/test/drivers/host_cmd/src/pd_log.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "event_log.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
#include "usb_pd.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
/**
* @brief This is the maximum size of a single log entry.
*
diff --git a/zephyr/test/drivers/host_cmd/src/tablet_mode.c b/zephyr/test/drivers/host_cmd/src/tablet_mode.c
index cb65899c4f..a84faa035f 100644
--- a/zephyr/test/drivers/host_cmd/src/tablet_mode.c
+++ b/zephyr/test/drivers/host_cmd/src/tablet_mode.c
@@ -3,17 +3,17 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/emul.h>
-#include <zephyr/ztest.h>
-
+#include "emul/emul_common_i2c.h"
+#include "emul/emul_smart_battery.h"
#include "hooks.h"
#include "host_command.h"
#include "tablet_mode.h"
-#include "emul/emul_common_i2c.h"
-#include "emul/emul_smart_battery.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/ztest.h>
+
struct host_cmd_tablet_mode_fixture {
const struct emul *emul;
struct i2c_common_emul_data *i2c_emul;
diff --git a/zephyr/test/drivers/host_cmd/src/usb_pd_control.c b/zephyr/test/drivers/host_cmd/src/usb_pd_control.c
index 8947fdca8c..f926c2b7ca 100644
--- a/zephyr/test/drivers/host_cmd/src/usb_pd_control.c
+++ b/zephyr/test/drivers/host_cmd/src/usb_pd_control.c
@@ -3,9 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "ec_commands.h"
#include "emul/emul_isl923x.h"
@@ -16,6 +13,9 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
#define TEST_PORT USBC_PORT_C0
#define BAD_PORT 42
diff --git a/zephyr/test/drivers/host_cmd/src/usb_pd_host_cmd.c b/zephyr/test/drivers/host_cmd/src/usb_pd_host_cmd.c
index 3afc90760a..d95461f274 100644
--- a/zephyr/test/drivers/host_cmd/src/usb_pd_host_cmd.c
+++ b/zephyr/test/drivers/host_cmd/src/usb_pd_host_cmd.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
#include "usb_pd.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
ZTEST_USER(usb_pd_host_cmd, test_hc_pd_host_event_status)
{
struct ec_response_host_event_status response;
diff --git a/zephyr/test/drivers/host_command_thread/src/main.c b/zephyr/test/drivers/host_command_thread/src/main.c
index 633942258e..d1df1ffed2 100644
--- a/zephyr/test/drivers/host_command_thread/src/main.c
+++ b/zephyr/test/drivers/host_command_thread/src/main.c
@@ -10,15 +10,15 @@
* Do not add tests to this binary. This test messes with the main thread and
* can only run a single test function.
*/
+#include "host_command.h"
+#include "task.h"
+#include "test/drivers/test_state.h"
+
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
-#include "host_command.h"
-#include "task.h"
-#include "test/drivers/test_state.h"
-
#define CUSTOM_COMMAND_ID 0x0088
/* Pointer to the main thread, defined in kernel/init.c */
diff --git a/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h b/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h
index c60c455dfa..c235d64825 100644
--- a/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h
+++ b/zephyr/test/drivers/i2c_controller/include/basic_i2c_device_emul.h
@@ -3,10 +3,10 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-
#include "emul/emul_common_i2c.h"
+#include <stdint.h>
+
#define BASIC_I2C_DEV_EXT_ACCESS_REG 0xFF
/**
diff --git a/zephyr/test/drivers/i2c_controller/src/basic_i2c_device_emul.c b/zephyr/test/drivers/i2c_controller/src/basic_i2c_device_emul.c
index 1b7810ad84..8d00d5d3ba 100644
--- a/zephyr/test/drivers/i2c_controller/src/basic_i2c_device_emul.c
+++ b/zephyr/test/drivers/i2c_controller/src/basic_i2c_device_emul.c
@@ -2,13 +2,14 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <string.h>
-#include <zephyr/device.h>
-
#include "basic_i2c_device_emul.h"
#include "emul/emul_common_i2c.h"
#include "emul/emul_stub_device.h"
+#include <string.h>
+
+#include <zephyr/device.h>
+
#define DT_DRV_COMPAT basic_i2c_device
void basic_i2c_device_reset(const struct emul *emul)
diff --git a/zephyr/test/drivers/i2c_controller/src/i2c_controller.c b/zephyr/test/drivers/i2c_controller/src/i2c_controller.c
index 0beb773297..4c00043e11 100644
--- a/zephyr/test/drivers/i2c_controller/src/i2c_controller.c
+++ b/zephyr/test/drivers/i2c_controller/src/i2c_controller.c
@@ -2,15 +2,15 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "basic_i2c_device_emul.h"
+#include "i2c.h"
+#include "test/drivers/test_state.h"
+
#include <zephyr/device.h>
#include <zephyr/fff.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/ztest.h>
-#include "basic_i2c_device_emul.h"
-#include "i2c.h"
-#include "test/drivers/test_state.h"
-
struct i2c_controller_fixture {
int port;
int addr;
diff --git a/zephyr/test/drivers/isl923x/src/charge_ramp_hw.c b/zephyr/test/drivers/isl923x/src/charge_ramp_hw.c
index f27791949e..a4e326bcec 100644
--- a/zephyr/test/drivers/isl923x/src/charge_ramp_hw.c
+++ b/zephyr/test/drivers/isl923x/src/charge_ramp_hw.c
@@ -3,8 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "driver/charger/isl923x.h"
#include "driver/charger/isl923x_public.h"
#include "emul/emul_common_i2c.h"
@@ -12,6 +10,8 @@
#include "test/drivers/charger_utils.h"
#include "test/drivers/test_state.h"
+#include <zephyr/ztest.h>
+
#define CHARGER_NUM get_charger_num(&isl923x_drv)
#define ISL923X_EMUL EMUL_DT_GET(DT_NODELABEL(isl923x_emul))
diff --git a/zephyr/test/drivers/isl923x/src/console_cmd_amon_bmon.c b/zephyr/test/drivers/isl923x/src/console_cmd_amon_bmon.c
index f8cd76d524..8eef7ea748 100644
--- a/zephyr/test/drivers/isl923x/src/console_cmd_amon_bmon.c
+++ b/zephyr/test/drivers/isl923x/src/console_cmd_amon_bmon.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/adc.h>
-#include <zephyr/drivers/adc/adc_emul.h>
-#include <zephyr/shell/shell.h>
-#include <zephyr/ztest.h>
-
#include "adc.h"
#include "console.h"
#include "driver/charger/isl923x.h"
@@ -19,6 +14,11 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/drivers/adc.h>
+#include <zephyr/drivers/adc/adc_emul.h>
+#include <zephyr/shell/shell.h>
+#include <zephyr/ztest.h>
+
#define ADC_DEVICE_NODE DT_NODELABEL(adc0)
#define CHARGER_NUM get_charger_num(&isl923x_drv)
#define ISL923X_EMUL EMUL_DT_GET(DT_NODELABEL(isl923x_emul))
diff --git a/zephyr/test/drivers/keyboard_scan/src/keyboard_backlight.c b/zephyr/test/drivers/keyboard_scan/src/keyboard_backlight.c
index 5b7cbfb2c7..6ced5c81bd 100644
--- a/zephyr/test/drivers/keyboard_scan/src/keyboard_backlight.c
+++ b/zephyr/test/drivers/keyboard_scan/src/keyboard_backlight.c
@@ -3,18 +3,19 @@
* found in the LICENSE file.
*/
+#include "console.h"
+#include "host_command.h"
+#include "keyboard_backlight.h"
+#include "test/drivers/test_state.h"
+
#include <stdint.h>
#include <string.h>
-#include <zephyr/ztest.h>
+
#include <zephyr/kernel.h>
#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
#include <zephyr/ztest_assert.h>
-#include "console.h"
-#include "host_command.h"
-#include "keyboard_backlight.h"
-#include "test/drivers/test_state.h"
-
/**
* @brief Send host command to set the backlight percentage
*
diff --git a/zephyr/test/drivers/keyboard_scan/src/keyboard_scan.c b/zephyr/test/drivers/keyboard_scan/src/keyboard_scan.c
index beaabd718d..91b69562b1 100644
--- a/zephyr/test/drivers/keyboard_scan/src/keyboard_scan.c
+++ b/zephyr/test/drivers/keyboard_scan/src/keyboard_scan.c
@@ -2,15 +2,6 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <string.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/fff.h>
-#include <emul/emul_kb_raw.h>
-
#include "console.h"
#include "host_command.h"
#include "keyboard_scan.h"
@@ -18,6 +9,17 @@
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <string.h>
+
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
+
+#include <emul/emul_kb_raw.h>
+
ZTEST(keyboard_scan, test_boot_key)
{
const struct device *dev = DEVICE_DT_GET(DT_NODELABEL(cros_kb_raw));
diff --git a/zephyr/test/drivers/keyboard_scan/src/keyboard_test_utils.c b/zephyr/test/drivers/keyboard_scan/src/keyboard_test_utils.c
index e20ece362b..4141028408 100644
--- a/zephyr/test/drivers/keyboard_scan/src/keyboard_test_utils.c
+++ b/zephyr/test/drivers/keyboard_scan/src/keyboard_test_utils.c
@@ -3,9 +3,10 @@
* found in the LICENSE file.
*/
-#include <emul/emul_kb_raw.h>
#include <zephyr/drivers/emul.h>
+#include <emul/emul_kb_raw.h>
+
const static struct device *dev = DEVICE_DT_GET(DT_NODELABEL(cros_kb_raw));
int emulate_keystate(int row, int col, int pressed)
diff --git a/zephyr/test/drivers/keyboard_scan/src/mkbp_event.c b/zephyr/test/drivers/keyboard_scan/src/mkbp_event.c
index 26a962d5fc..b45f7b20ef 100644
--- a/zephyr/test/drivers/keyboard_scan/src/mkbp_event.c
+++ b/zephyr/test/drivers/keyboard_scan/src/mkbp_event.c
@@ -2,13 +2,6 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/fff.h>
-#include <emul/emul_kb_raw.h>
-
#include "console.h"
#include "host_command.h"
#include "mkbp_event.h"
@@ -16,6 +9,14 @@
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
+#include <emul/emul_kb_raw.h>
+
/**
* @brief FFF fake that will be registered as a callback to monitor the EC->AP
* interrupt pin. Implements `gpio_callback_handler_t`.
diff --git a/zephyr/test/drivers/keyboard_scan/src/mkbp_info.c b/zephyr/test/drivers/keyboard_scan/src/mkbp_info.c
index 0e2a476f12..6fd1b0f975 100644
--- a/zephyr/test/drivers/keyboard_scan/src/mkbp_info.c
+++ b/zephyr/test/drivers/keyboard_scan/src/mkbp_info.c
@@ -2,10 +2,6 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/fff.h>
-#include <emul/emul_kb_raw.h>
-
#include "console.h"
#include "host_command.h"
#include "keyboard_scan.h"
@@ -14,6 +10,11 @@
#include "mkbp_input_devices.h"
#include "test/drivers/test_state.h"
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
+#include <emul/emul_kb_raw.h>
+
ZTEST(mkbp_info, host_command_mkbp_info__keyboard_info)
{
/* Get the number of keyboard rows and columns */
diff --git a/zephyr/test/drivers/led_driver/src/led.c b/zephyr/test/drivers/led_driver/src/led.c
index 4e4023beb4..135f2eab01 100644
--- a/zephyr/test/drivers/led_driver/src/led.c
+++ b/zephyr/test/drivers/led_driver/src/led.c
@@ -3,7 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
#include "ec_commands.h"
#include "gpio.h"
#include "include/power.h"
@@ -12,6 +11,8 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/ztest.h>
+
#define VERIFY_LED_COLOR(color, led_id) \
{ \
const struct led_pins_node_t *pin_node = \
diff --git a/zephyr/test/drivers/led_driver/src/led_common.c b/zephyr/test/drivers/led_driver/src/led_common.c
index e11a1f1952..2b113499a0 100644
--- a/zephyr/test/drivers/led_driver/src/led_common.c
+++ b/zephyr/test/drivers/led_driver/src/led_common.c
@@ -2,13 +2,13 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/fff.h>
-
#include "host_command.h"
#include "led_common.h"
#include "test/drivers/test_state.h"
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
ZTEST(led_common, host_command__query)
{
/* Gets the brightness range for an LED */
diff --git a/zephyr/test/drivers/locate_chip/src/locate_chip.c b/zephyr/test/drivers/locate_chip/src/locate_chip.c
index 5e4fd078d7..881b17a54c 100644
--- a/zephyr/test/drivers/locate_chip/src/locate_chip.c
+++ b/zephyr/test/drivers/locate_chip/src/locate_chip.c
@@ -3,10 +3,10 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
-#include "test/drivers/test_state.h"
#include "host_command.h"
+#include "test/drivers/test_state.h"
+
+#include <zephyr/ztest.h>
ZTEST_SUITE(locate_chip, drivers_predicate_post_main, NULL, NULL, NULL, NULL);
diff --git a/zephyr/test/drivers/mkbp/src/mkbp_fifo.c b/zephyr/test/drivers/mkbp/src/mkbp_fifo.c
index b80febbec9..5d59dababd 100644
--- a/zephyr/test/drivers/mkbp/src/mkbp_fifo.c
+++ b/zephyr/test/drivers/mkbp/src/mkbp_fifo.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest_assert.h>
-#include <zephyr/drivers/i2c_emul.h>
-
#include "keyboard_config.h"
#include "mkbp_fifo.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/i2c_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
/* Tests for Matrix Keyboard Protocol (MKBP) */
/* Largest event size that we support */
diff --git a/zephyr/test/drivers/power_host_sleep/src/test_power_host_sleep.c b/zephyr/test/drivers/power_host_sleep/src/test_power_host_sleep.c
index a76400a98a..521b4c735b 100644
--- a/zephyr/test/drivers/power_host_sleep/src/test_power_host_sleep.c
+++ b/zephyr/test/drivers/power_host_sleep/src/test_power_host_sleep.c
@@ -3,10 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/ztest_assert.h>
-
#include "ec_commands.h"
#include "hooks.h"
#include "host_command.h"
@@ -15,6 +11,10 @@
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
#define ARBITRARY_SLEEP_TRANSITIONS 1
/*
diff --git a/zephyr/test/drivers/rt9490/src/bc12.c b/zephyr/test/drivers/rt9490/src/bc12.c
index 7e7d9c2678..b32d50768e 100644
--- a/zephyr/test/drivers/rt9490/src/bc12.c
+++ b/zephyr/test/drivers/rt9490/src/bc12.c
@@ -3,11 +3,8 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/fff.h>
-
-#include "charger.h"
#include "charge_manager.h"
+#include "charger.h"
#include "driver/charger/rt9490.h"
#include "driver/tcpm/tcpci.h"
#include "emul/emul_rt9490.h"
@@ -17,6 +14,9 @@
#include "timer.h"
#include "usb_charge.h"
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, board_tcpc_post_init, int);
static const struct emul *emul = EMUL_DT_GET(DT_NODELABEL(rt9490));
diff --git a/zephyr/test/drivers/rt9490/src/charger.c b/zephyr/test/drivers/rt9490/src/charger.c
index f0d3510b89..2d892f9432 100644
--- a/zephyr/test/drivers/rt9490/src/charger.c
+++ b/zephyr/test/drivers/rt9490/src/charger.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "battery_smart.h"
#include "charger.h"
#include "driver/charger/rt9490.h"
#include "emul/emul_rt9490.h"
#include "i2c.h"
+#include <zephyr/ztest.h>
+
static const struct emul *emul = EMUL_DT_GET(DT_NODELABEL(rt9490));
static const int chgnum = CHARGER_SOLO;
diff --git a/zephyr/test/drivers/shim_gpio_id/src/test_shim_gpio_id.c b/zephyr/test/drivers/shim_gpio_id/src/test_shim_gpio_id.c
index 035d0c1b48..5e9381c2a5 100644
--- a/zephyr/test/drivers/shim_gpio_id/src/test_shim_gpio_id.c
+++ b/zephyr/test/drivers/shim_gpio_id/src/test_shim_gpio_id.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "system.h"
#include "test/drivers/test_state.h"
#include "util.h"
+#include <zephyr/ztest.h>
+
/*
* TODO(b/254924012): Test alternative GPIO when emulated gpio tristate is
* supported upstream.
diff --git a/zephyr/test/drivers/shim_pwm_hc/src/test_shim_pwm_hc.c b/zephyr/test/drivers/shim_pwm_hc/src/test_shim_pwm_hc.c
index b30ae6db6c..ddc406e58c 100644
--- a/zephyr/test/drivers/shim_pwm_hc/src/test_shim_pwm_hc.c
+++ b/zephyr/test/drivers/shim_pwm_hc/src/test_shim_pwm_hc.c
@@ -3,12 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest_assert.h>
-#include <zephyr/drivers/i2c_emul.h>
-
#include "drivers/cros_displight.h"
#include "ec_commands.h"
#include "host_command.h"
@@ -16,6 +10,12 @@
#include "pwm.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/emul.h>
+#include <zephyr/drivers/i2c_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
ZTEST(shim_pwm_hc, test_pwm_set_duty_hc__kblight)
{
struct ec_params_pwm_set_duty p = {
diff --git a/zephyr/test/drivers/shim_rtc/src/test_shim_rtc.c b/zephyr/test/drivers/shim_rtc/src/test_shim_rtc.c
index b3d2dfa465..6f4f9a43e2 100644
--- a/zephyr/test/drivers/shim_rtc/src/test_shim_rtc.c
+++ b/zephyr/test/drivers/shim_rtc/src/test_shim_rtc.c
@@ -3,17 +3,17 @@
* found in the LICENSE file.
*/
-#include <zephyr/drivers/i2c_emul.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/ztest_assert.h>
-
#include "ec_commands.h"
#include "host_command.h"
#include "lpc.h"
#include "system.h"
#include "test/drivers/test_state.h"
+#include <zephyr/drivers/i2c_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
ZTEST_USER(rtc_shim, test_hc_rtc_set_get_value)
{
struct ec_params_rtc set_value;
diff --git a/zephyr/test/drivers/system/src/system.c b/zephyr/test/drivers/system/src/system.c
index 4e3009ceab..b615dfc2df 100644
--- a/zephyr/test/drivers/system/src/system.c
+++ b/zephyr/test/drivers/system/src/system.c
@@ -3,19 +3,19 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "host_command.h"
+#include "mock/power.h"
#include "panic.h"
#include "system.h"
#include "test/drivers/stubs.h"
#include "test/drivers/test_mocks.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
-#include "mock/power.h"
+
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
FAKE_VALUE_FUNC(int, system_run_image_copy_with_flags, enum ec_image, int);
FAKE_VOID_FUNC(system_disable_jump);
diff --git a/zephyr/test/drivers/system/src/system_board_version_cbi.c b/zephyr/test/drivers/system/src/system_board_version_cbi.c
index d076716e23..cd4e40eef2 100644
--- a/zephyr/test/drivers/system/src/system_board_version_cbi.c
+++ b/zephyr/test/drivers/system/src/system_board_version_cbi.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "host_command.h"
#include "system.h"
-#include "test/drivers/test_state.h"
#include "test/drivers/test_mocks.h"
+#include "test/drivers/test_state.h"
+
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
FAKE_VALUE_FUNC(int, cbi_get_board_version, uint32_t *);
diff --git a/zephyr/test/drivers/system/src/system_board_version_default.c b/zephyr/test/drivers/system/src/system_board_version_default.c
index bcd28cc3de..0ef11a8c39 100644
--- a/zephyr/test/drivers/system/src/system_board_version_default.c
+++ b/zephyr/test/drivers/system/src/system_board_version_default.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "host_command.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(system, test_hostcmd_board_version)
{
struct ec_response_board_version response;
diff --git a/zephyr/test/drivers/system/src/system_not_board_ap_set_sku_id.c b/zephyr/test/drivers/system/src/system_not_board_ap_set_sku_id.c
index 8f71531bb8..2d4e60fdcb 100644
--- a/zephyr/test/drivers/system/src/system_not_board_ap_set_sku_id.c
+++ b/zephyr/test/drivers/system/src/system_not_board_ap_set_sku_id.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
+#include "system.h"
+
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
-#include "system.h"
-
/* Tests for !CONFIG_HOST_CMD_AP_SET_SKUID */
#define DEFAULT_BOARD_PROVIDED_SKU_ID 0
diff --git a/zephyr/test/drivers/timer/src/timer.c b/zephyr/test/drivers/timer/src/timer.c
index d94eb7811e..5cbdae1ea8 100644
--- a/zephyr/test/drivers/timer/src/timer.c
+++ b/zephyr/test/drivers/timer/src/timer.c
@@ -2,15 +2,15 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-#include <zephyr/fff.h>
-#include <zephyr/shell/shell_dummy.h>
-
#include "console.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
#include "timer.h"
+#include <zephyr/fff.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
+
BUILD_ASSERT(IS_ENABLED(CONFIG_HWTIMER_64BIT),
"Tests expect the 64-bit HW timer");
diff --git a/zephyr/test/drivers/usb_common/src/suite.c b/zephyr/test/drivers/usb_common/src/suite.c
index 56f3434d4c..36d3031881 100644
--- a/zephyr/test/drivers/usb_common/src/suite.c
+++ b/zephyr/test/drivers/usb_common/src/suite.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
+#include "suite.h"
+
#include <zephyr/fff.h>
#include <zephyr/ztest_test_new.h>
-#include "suite.h"
-
DEFINE_FAKE_VALUE_FUNC(int, board_vbus_source_enabled, int);
DEFINE_FAKE_VALUE_FUNC(int, ppc_discharge_vbus, int, int);
diff --git a/zephyr/test/drivers/usb_common/src/usb_common.c b/zephyr/test/drivers/usb_common/src/usb_common.c
index c9b951fc49..f286a4ffc9 100644
--- a/zephyr/test/drivers/usb_common/src/usb_common.c
+++ b/zephyr/test/drivers/usb_common/src/usb_common.c
@@ -3,17 +3,18 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/fff.h>
-#include <zephyr/ztest_assert.h>
-#include <zephyr/ztest_test_new.h>
-
#include "ec_commands.h"
#include "suite.h"
#include "timer.h"
#include "usb_common.h"
#include "usb_pd.h"
+#include <stdint.h>
+
+#include <zephyr/fff.h>
+#include <zephyr/ztest_assert.h>
+#include <zephyr/ztest_test_new.h>
+
#define TEST_PORT 0
ZTEST_USER(usb_common, test_get_typec_current_limit_detached)
diff --git a/zephyr/test/drivers/usb_common/src/usb_pd_discharge.c b/zephyr/test/drivers/usb_common/src/usb_pd_discharge.c
index e691d8e76b..847840e3e5 100644
--- a/zephyr/test/drivers/usb_common/src/usb_pd_discharge.c
+++ b/zephyr/test/drivers/usb_common/src/usb_pd_discharge.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/ztest_assert.h>
-#include <zephyr/ztest_test_new.h>
-
#include "suite.h"
#include "usb_pd.h"
#include "usb_pd_flags.h"
+#include <zephyr/fff.h>
+#include <zephyr/ztest_assert.h>
+#include <zephyr/ztest_test_new.h>
+
#define TEST_PORT 0
ZTEST_USER(usb_common, test_pd_set_vbus_discharge)
diff --git a/zephyr/test/drivers/usb_common/src/usb_pd_flags.c b/zephyr/test/drivers/usb_common/src/usb_pd_flags.c
index 8fe73bd141..05765da7b8 100644
--- a/zephyr/test/drivers/usb_common/src/usb_pd_flags.c
+++ b/zephyr/test/drivers/usb_common/src/usb_pd_flags.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest_assert.h>
-#include <zephyr/ztest_test_new.h>
-
#include "usb_pd.h"
#include "usb_pd_flags.h"
+#include <zephyr/ztest_assert.h>
+#include <zephyr/ztest_test_new.h>
+
ZTEST_USER(usb_common, test_usb_pd_charger_otg)
{
set_usb_pd_charger_otg(USB_PD_CHARGER_OTG_ENABLED);
diff --git a/zephyr/test/drivers/usb_malfunction_sink/src/usb_malfunction_sink.c b/zephyr/test/drivers/usb_malfunction_sink/src/usb_malfunction_sink.c
index 1a78d73c7b..fd6cab7bad 100644
--- a/zephyr/test/drivers/usb_malfunction_sink/src/usb_malfunction_sink.c
+++ b/zephyr/test/drivers/usb_malfunction_sink/src/usb_malfunction_sink.c
@@ -3,22 +3,23 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/sys/byteorder.h>
-#include <zephyr/ztest.h>
-
#include "battery_smart.h"
#include "emul/emul_isl923x.h"
#include "emul/emul_smart_battery.h"
#include "emul/tcpc/emul_tcpci_partner_faulty_ext.h"
#include "emul/tcpc/emul_tcpci_partner_snk.h"
#include "tcpm/tcpci.h"
+#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
-#include "test/drivers/stubs.h"
+#include "timer.h"
#include "usb_pd.h"
#include "usb_tc_sm.h"
-#include "timer.h"
+
+#include <stdint.h>
+
+#include <zephyr/sys/byteorder.h>
+#include <zephyr/ztest.h>
/* USB-C port used to connect port partner in this testsuite */
#define TEST_PORT 0
diff --git a/zephyr/test/drivers/usb_port_power_dumb/src/usb_port_power_dumb.c b/zephyr/test/drivers/usb_port_power_dumb/src/usb_port_power_dumb.c
index 2cb331b387..7594a6158e 100644
--- a/zephyr/test/drivers/usb_port_power_dumb/src/usb_port_power_dumb.c
+++ b/zephyr/test/drivers/usb_port_power_dumb/src/usb_port_power_dumb.c
@@ -3,19 +3,20 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <string.h>
-#include <zephyr/kernel.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest_assert.h>
-#include <zephyr/ztest.h>
-
#include "console.h"
#include "gpio.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
#include "usb_charge.h"
+#include <stdint.h>
+#include <string.h>
+
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
/* Expecting at least one port */
BUILD_ASSERT(ARRAY_SIZE(usb_port_enable) >= 1);
BUILD_ASSERT(USB_PORT_COUNT >= 1);
diff --git a/zephyr/test/drivers/usb_retimer_fw_update/src/usb_retimer_fw_update.c b/zephyr/test/drivers/usb_retimer_fw_update/src/usb_retimer_fw_update.c
index 82f67aad23..21a471f22a 100644
--- a/zephyr/test/drivers/usb_retimer_fw_update/src/usb_retimer_fw_update.c
+++ b/zephyr/test/drivers/usb_retimer_fw_update/src/usb_retimer_fw_update.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
#include "usb_common.h"
#include "usb_pd.h"
+#include <zephyr/ztest.h>
+
#define BB_RETIMER_NODE DT_NODELABEL(usb_c1_bb_retimer_emul)
#define TEST_PORT USBC_PORT_C1
diff --git a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c
index cbdd861585..24ee58bd01 100644
--- a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c
+++ b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
#include "ec_commands.h"
#include "ec_tasks.h"
#include "emul/emul_isl923x.h"
@@ -16,12 +11,18 @@
#include "emul/tcpc/emul_tcpci_partner_common.h"
#include "emul/tcpc/emul_tcpci_partner_snk.h"
#include "host_command.h"
-#include "test/drivers/stubs.h"
#include "tcpm/tcpci.h"
-#include "test/drivers/utils.h"
+#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
#include "test_usbc_alt_mode.h"
+#include <stdint.h>
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#define TEST_PORT 0
/* Arbitrary */
diff --git a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode__require_ap_mode_entry.c b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode__require_ap_mode_entry.c
index 9d34bc7917..597aac4179 100644
--- a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode__require_ap_mode_entry.c
+++ b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode__require_ap_mode_entry.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
#include "test/drivers/utils.h"
#include "test_usbc_alt_mode.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
/* Tests that require CONFIG_PLATFORM_EC_USB_PD_REQUIRE_AP_MODE_ENTRY enabled */
ZTEST_F(usbc_alt_mode, verify_displayport_mode_reentry)
diff --git a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode_ec_mode_entry.c b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode_ec_mode_entry.c
index 26db31318d..ef56332f55 100644
--- a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode_ec_mode_entry.c
+++ b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode_ec_mode_entry.c
@@ -3,17 +3,17 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/ztest_assert.h>
-#include <zephyr/ztest_test_new.h>
-
#include "ec_commands.h"
#include "emul/tcpc/emul_tcpci_partner_common.h"
#include "mock/power.h"
#include "test/drivers/utils.h"
#include "test_usbc_alt_mode.h"
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+#include <zephyr/ztest_test_new.h>
+
/* Tests that require CONFIG_PLATFORM_EC_USB_PD_REQUIRE_AP_MODE_ENTRY disabled
*/
diff --git a/zephyr/test/drivers/usbc_console_pd/src/usbc_console_pd.c b/zephyr/test/drivers/usbc_console_pd/src/usbc_console_pd.c
index 9c87b9a4a2..37908ce1e4 100644
--- a/zephyr/test/drivers/usbc_console_pd/src/usbc_console_pd.c
+++ b/zephyr/test/drivers/usbc_console_pd/src/usbc_console_pd.c
@@ -3,12 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/kernel.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
#include "console.h"
#include "ec_commands.h"
#include "ec_tasks.h"
@@ -18,12 +12,19 @@
#include "emul/tcpc/emul_tcpci_partner_drp.h"
#include "emul/tcpc/emul_tcpci_partner_src.h"
#include "host_command.h"
-#include "test/drivers/stubs.h"
#include "tcpm/tcpci.h"
-#include "test/drivers/utils.h"
+#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
#include "usb_pd.h"
+#include <stdint.h>
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
+
#define TEST_PORT 0
struct common_fixture {
diff --git a/zephyr/test/drivers/usbc_ocp/src/usbc_ocp.c b/zephyr/test/drivers/usbc_ocp/src/usbc_ocp.c
index f269c1e81f..a7828eb878 100644
--- a/zephyr/test/drivers/usbc_ocp/src/usbc_ocp.c
+++ b/zephyr/test/drivers/usbc_ocp/src/usbc_ocp.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
+#include "test/drivers/test_state.h"
+#include "timer.h"
+#include "usbc_ocp.h"
+
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <zephyr/ztest_assert.h>
-#include "usbc_ocp.h"
-#include "test/drivers/test_state.h"
-#include "timer.h"
-
/* Tests for USBC OCP (Overcurrent Protection) Common Code */
#define TEST_PORT 0
diff --git a/zephyr/test/drivers/usbc_ppc/src/usbc_ppc.c b/zephyr/test/drivers/usbc_ppc/src/usbc_ppc.c
index 70bf887968..c0cd438511 100644
--- a/zephyr/test/drivers/usbc_ppc/src/usbc_ppc.c
+++ b/zephyr/test/drivers/usbc_ppc/src/usbc_ppc.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/ztest.h>
-#include <zephyr/ztest_assert.h>
-
#include "console.h"
#include "test/drivers/test_state.h"
#include "timer.h"
#include "usbc_ppc.h"
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
+#include <zephyr/ztest_assert.h>
+
/* Tests for USBC PPC Common Code */
ZTEST(usbc_ppc, test_ppc_dump__no_args)
diff --git a/zephyr/test/drivers/usbc_svdm_dfp_only/src/usbc_svdm_dfp_only.c b/zephyr/test/drivers/usbc_svdm_dfp_only/src/usbc_svdm_dfp_only.c
index 33bc767407..5e55042d33 100644
--- a/zephyr/test/drivers/usbc_svdm_dfp_only/src/usbc_svdm_dfp_only.c
+++ b/zephyr/test/drivers/usbc_svdm_dfp_only/src/usbc_svdm_dfp_only.c
@@ -9,15 +9,15 @@
* The tests correspond to TEST.PD.PVDM.SRC.1 Discovery Process and Enter Mode
* as defined by the USB Power Delivery Compliance Test Specification.
*/
-#include <zephyr/sys/byteorder.h>
-#include <zephyr/ztest.h>
-
-#include "usb_pd.h"
#include "emul/tcpc/emul_tcpci.h"
#include "emul/tcpc/emul_tcpci_partner_common.h"
#include "emul/tcpc/emul_tcpci_partner_src.h"
#include "test/drivers/test_state.h"
#include "test/drivers/utils.h"
+#include "usb_pd.h"
+
+#include <zephyr/sys/byteorder.h>
+#include <zephyr/ztest.h>
struct usbc_svdm_dfp_only_fixture {
const struct emul *tcpci_emul;
diff --git a/zephyr/test/drivers/usbc_tbt_mode/src/usbc_tbt_mode.c b/zephyr/test/drivers/usbc_tbt_mode/src/usbc_tbt_mode.c
index 912d8fa644..2fc895bb27 100644
--- a/zephyr/test/drivers/usbc_tbt_mode/src/usbc_tbt_mode.c
+++ b/zephyr/test/drivers/usbc_tbt_mode/src/usbc_tbt_mode.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/kernel.h>
-#include <zephyr/sys/byteorder.h>
-#include <zephyr/ztest.h>
-
#include "ec_commands.h"
#include "ec_tasks.h"
#include "emul/emul_isl923x.h"
@@ -15,12 +10,18 @@
#include "emul/tcpc/emul_tcpci.h"
#include "emul/tcpc/emul_tcpci_partner_snk.h"
#include "host_command.h"
-#include "test/drivers/stubs.h"
#include "tcpm/tcpci.h"
-#include "test/drivers/utils.h"
+#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
#include "usb_pd_vdo.h"
+#include <stdint.h>
+
+#include <zephyr/kernel.h>
+#include <zephyr/sys/byteorder.h>
+#include <zephyr/ztest.h>
+
#define TEST_PORT USBC_PORT_C0
/* Remove polarity for any mux checks */
#define USB_MUX_CHECK_MASK ~USB_PD_MUX_POLARITY_INVERTED
diff --git a/zephyr/test/drivers/usbc_vconn_swap/src/usbc_vconn_swap.c b/zephyr/test/drivers/usbc_vconn_swap/src/usbc_vconn_swap.c
index beaafd6880..bc1eb6cd0d 100644
--- a/zephyr/test/drivers/usbc_vconn_swap/src/usbc_vconn_swap.c
+++ b/zephyr/test/drivers/usbc_vconn_swap/src/usbc_vconn_swap.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <stdint.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-
#include "ec_commands.h"
#include "ec_tasks.h"
#include "emul/emul_isl923x.h"
@@ -17,10 +12,16 @@
#include "emul/tcpc/emul_tcpci_partner_drp.h"
#include "emul/tcpc/emul_tcpci_partner_snk.h"
#include "host_command.h"
-#include "test/drivers/stubs.h"
#include "tcpm/tcpci.h"
-#include "test/drivers/utils.h"
+#include "test/drivers/stubs.h"
#include "test/drivers/test_state.h"
+#include "test/drivers/utils.h"
+
+#include <stdint.h>
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
#define TEST_PORT 0
diff --git a/zephyr/test/ec_app/src/main.c b/zephyr/test/ec_app/src/main.c
index b106754d47..3c317d2a08 100644
--- a/zephyr/test/ec_app/src/main.c
+++ b/zephyr/test/ec_app/src/main.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest_assert.h>
-#include <zephyr/ztest_test_new.h>
-#include <zephyr/shell/shell_dummy.h>
-
#include "ec_app_main.h"
#include "hooks.h"
#include "task.h"
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest_assert.h>
+#include <zephyr/ztest_test_new.h>
+
#ifdef CONFIG_CMD_AP_RESET_LOG
ZTEST(ec_app_tests, test_init_reset_log)
{
diff --git a/zephyr/test/herobrine/src/board_chipset.c b/zephyr/test/herobrine/src/board_chipset.c
index 87a8414804..1463547012 100644
--- a/zephyr/test/herobrine/src/board_chipset.c
+++ b/zephyr/test/herobrine/src/board_chipset.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
+#include "board_chipset.h"
+#include "hooks.h"
+
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
-#include "hooks.h"
-#include "board_chipset.h"
-
static int battery_soc_abs_value = 50;
int battery_state_of_charge_abs(int *percent)
diff --git a/zephyr/test/hooks/hooks.c b/zephyr/test/hooks/hooks.c
index 7d784aa65f..bc2840eae5 100644
--- a/zephyr/test/hooks/hooks.c
+++ b/zephyr/test/hooks/hooks.c
@@ -3,12 +3,13 @@
* found in the LICENSE file.
*/
-#include <stdbool.h>
-#include <zephyr/ztest.h>
-
#include "ap_power/ap_power.h"
#include "hooks.h"
+#include <stdbool.h>
+
+#include <zephyr/ztest.h>
+
static bool h1_called;
static bool h2_called;
static bool h3_called;
diff --git a/zephyr/test/i2c/src/main.c b/zephyr/test/i2c/src/main.c
index 364353f06d..eb4724d5a7 100644
--- a/zephyr/test/i2c/src/main.c
+++ b/zephyr/test/i2c/src/main.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/devicetree.h>
-#include <zephyr/ztest.h>
-
#include "common.h"
-#include "i2c/i2c.h"
#include "i2c.h"
+#include "i2c/i2c.h"
+
+#include <zephyr/devicetree.h>
+#include <zephyr/ztest.h>
/* Unused: required for shimming i2c. */
void watchdog_reload(void)
diff --git a/zephyr/test/kingler/src/alt_sensor.c b/zephyr/test/kingler/src/alt_sensor.c
index 0304656f4a..7cd0ceddfa 100644
--- a/zephyr/test/kingler/src/alt_sensor.c
+++ b/zephyr/test/kingler/src/alt_sensor.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
-#include "zephyr/kernel.h"
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/ztest.h>
-
#include "cros_board_info.h"
#include "cros_cbi.h"
#include "gpio_signal.h"
#include "hooks.h"
+#include "zephyr/kernel.h"
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/ztest.h>
/* SSFC field defined in zephyr/program/corsola/cbi_steelix.dts */
#define SSFC_BASE_MAIN_SENSOR (0x1)
diff --git a/zephyr/test/kingler/src/ccd.c b/zephyr/test/kingler/src/ccd.c
index 1b46631dc6..eb375fcfe7 100644
--- a/zephyr/test/kingler/src/ccd.c
+++ b/zephyr/test/kingler/src/ccd.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include "zephyr/kernel.h"
+#include "gpio/gpio_int.h"
+#include "gpio_signal.h"
+#include "hooks.h"
+
#include <zephyr/drivers/gpio/gpio_emul.h>
#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
-#include "gpio_signal.h"
-#include "gpio/gpio_int.h"
-#include "hooks.h"
-
FAKE_VOID_FUNC(typec_set_sbu, int, bool);
/* fake definitions to pass build */
FAKE_VOID_FUNC(bmi3xx_interrupt, enum gpio_signal);
diff --git a/zephyr/test/kingler/src/clamshell.c b/zephyr/test/kingler/src/clamshell.c
index 88595cc114..9871db1ca0 100644
--- a/zephyr/test/kingler/src/clamshell.c
+++ b/zephyr/test/kingler/src/clamshell.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include "zephyr/kernel.h"
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/ztest.h>
-
#include "cros_board_info.h"
#include "cros_cbi.h"
#include "gpio_signal.h"
#include "hooks.h"
#include "tablet_mode.h"
+#include "zephyr/kernel.h"
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/ztest.h>
static void *clamshell_setup(void)
{
diff --git a/zephyr/test/kingler/src/db_detect_hdmi.c b/zephyr/test/kingler/src/db_detect_hdmi.c
index df29e613d6..04a65269ad 100644
--- a/zephyr/test/kingler/src/db_detect_hdmi.c
+++ b/zephyr/test/kingler/src/db_detect_hdmi.c
@@ -3,17 +3,17 @@
* found in the LICENSE file.
*/
-#include "zephyr/kernel.h"
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/fff.h>
-#include <zephyr/ztest.h>
-
#include "baseboard_usbc_config.h"
#include "ec_commands.h"
#include "gpio_signal.h"
#include "hooks.h"
#include "usb_mux.h"
#include "variant_db_detection.h"
+#include "zephyr/kernel.h"
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
FAKE_VALUE_FUNC(int, corsola_is_dp_muxable, int);
FAKE_VOID_FUNC(svdm_set_hpd_gpio, int, int);
diff --git a/zephyr/test/kingler/src/db_detect_none.c b/zephyr/test/kingler/src/db_detect_none.c
index 9f37db04af..1bf9c05701 100644
--- a/zephyr/test/kingler/src/db_detect_none.c
+++ b/zephyr/test/kingler/src/db_detect_none.c
@@ -3,17 +3,18 @@
* found in the LICENSE file.
*/
-#include <stdlib.h>
-#include <zephyr/kernel.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/ztest.h>
-
#include "cros_board_info.h"
#include "cros_cbi.h"
#include "gpio_signal.h"
#include "hooks.h"
#include "variant_db_detection.h"
+#include <stdlib.h>
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
static void *db_detection_setup(void)
{
const struct device *wp_gpio =
diff --git a/zephyr/test/kingler/src/db_detect_typec.c b/zephyr/test/kingler/src/db_detect_typec.c
index 53716fe552..6662f485bc 100644
--- a/zephyr/test/kingler/src/db_detect_typec.c
+++ b/zephyr/test/kingler/src/db_detect_typec.c
@@ -3,13 +3,13 @@
* found in the LICENSE file.
*/
-#include "zephyr/kernel.h"
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/ztest.h>
-
#include "gpio_signal.h"
#include "hooks.h"
#include "variant_db_detection.h"
+#include "zephyr/kernel.h"
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/ztest.h>
static void *db_detection_setup(void)
{
diff --git a/zephyr/test/kingler/src/fakes.c b/zephyr/test/kingler/src/fakes.c
index 9b3194f18a..f5a3c30b0b 100644
--- a/zephyr/test/kingler/src/fakes.c
+++ b/zephyr/test/kingler/src/fakes.c
@@ -3,9 +3,10 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
#include "gpio_signal.h"
+#include <zephyr/fff.h>
+
FAKE_VOID_FUNC(power_button_interrupt, enum gpio_signal);
FAKE_VOID_FUNC(button_interrupt, enum gpio_signal);
FAKE_VOID_FUNC(lid_interrupt, enum gpio_signal);
diff --git a/zephyr/test/kingler/src/tablet.c b/zephyr/test/kingler/src/tablet.c
index 68be2b2b68..a2355e2b9d 100644
--- a/zephyr/test/kingler/src/tablet.c
+++ b/zephyr/test/kingler/src/tablet.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include "zephyr/kernel.h"
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/ztest.h>
-
#include "cros_board_info.h"
#include "cros_cbi.h"
#include "gpio_signal.h"
#include "hooks.h"
#include "tablet_mode.h"
+#include "zephyr/kernel.h"
+
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/ztest.h>
static void *tablet_setup(void)
{
diff --git a/zephyr/test/krabby/src/charger_workaround.c b/zephyr/test/krabby/src/charger_workaround.c
index afd3fe5f0c..5582fe5c64 100644
--- a/zephyr/test/krabby/src/charger_workaround.c
+++ b/zephyr/test/krabby/src/charger_workaround.c
@@ -3,11 +3,6 @@
* found in the LICENSE file.
*/
-#include <zephyr/devicetree.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/fff.h>
-#include <zephyr/ztest.h>
-
#include "charger.h"
#include "driver/charger/rt9490.h"
#include "emul/emul_rt9490.h"
@@ -15,6 +10,11 @@
#include "i2c.h"
#include "system.h"
+#include <zephyr/devicetree.h>
+#include <zephyr/drivers/emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
FAKE_VALUE_FUNC(int, board_get_version);
const struct emul *emul = EMUL_DT_GET(DT_NODELABEL(charger));
diff --git a/zephyr/test/krabby/src/stubs.c b/zephyr/test/krabby/src/stubs.c
index 7731aad43f..1e955fa8f0 100644
--- a/zephyr/test/krabby/src/stubs.c
+++ b/zephyr/test/krabby/src/stubs.c
@@ -4,9 +4,9 @@
*/
#include "adc.h"
-#include "usbc_ppc.h"
#include "charge_ramp.h"
#include "charge_state.h"
+#include "usbc_ppc.h"
int board_set_active_charge_port(int port)
{
diff --git a/zephyr/test/krabby/src/temp_tentacruel.c b/zephyr/test/krabby/src/temp_tentacruel.c
index 49d8a23ddf..1eaefad988 100644
--- a/zephyr/test/krabby/src/temp_tentacruel.c
+++ b/zephyr/test/krabby/src/temp_tentacruel.c
@@ -3,20 +3,20 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/adc.h>
-#include <zephyr/drivers/adc/adc_emul.h>
-
-#include "charger.h"
#include "charge_state.h"
+#include "charger.h"
#include "charger_profile_override.h"
#include "common.h"
#include "config.h"
#include "hooks.h"
-#include "util.h"
#include "temp_sensor.h"
#include "temp_sensor/temp_sensor.h"
+#include "util.h"
+
+#include <zephyr/drivers/adc.h>
+#include <zephyr/drivers/adc/adc_emul.h>
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
#define ADC_DEVICE_NODE DT_NODELABEL(adc0)
#define CHARGER_TEMP TEMP_SENSOR_ID(DT_NODELABEL(temp_charger))
diff --git a/zephyr/test/krabby/src/usb_mux_init.c b/zephyr/test/krabby/src/usb_mux_init.c
index 665f1c7b7e..8d1e4e81eb 100644
--- a/zephyr/test/krabby/src/usb_mux_init.c
+++ b/zephyr/test/krabby/src/usb_mux_init.c
@@ -3,15 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/devicetree.h>
-#include <zephyr/drivers/emul.h>
-#include <zephyr/ztest.h>
-
#include "driver/usb_mux/tusb1064.h"
#include "emul/emul_tusb1064.h"
#include "usb_mux.h"
#include "usbc/usb_muxes.h"
+#include <zephyr/devicetree.h>
+#include <zephyr/drivers/emul.h>
+#include <zephyr/ztest.h>
+
const static struct emul *emul = EMUL_DT_GET(DT_NODELABEL(tusb1064_mux_1));
const static int tusb1064_port = USB_MUX_PORT(DT_NODELABEL(tusb1064_mux_1));
diff --git a/zephyr/test/math/src/fixed_point_int_sqrtf.c b/zephyr/test/math/src/fixed_point_int_sqrtf.c
index a76567b9d7..4403980a96 100644
--- a/zephyr/test/math/src/fixed_point_int_sqrtf.c
+++ b/zephyr/test/math/src/fixed_point_int_sqrtf.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "math.h"
#include "math_util.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(math, int_sqrtf_negative)
{
zassert_equal(int_sqrtf(-100), 0);
diff --git a/zephyr/test/math/src/mask.c b/zephyr/test/math/src/mask.c
index c38b756eda..c986834eb8 100644
--- a/zephyr/test/math/src/mask.c
+++ b/zephyr/test/math/src/mask.c
@@ -3,12 +3,13 @@
* found in the LICENSE file.
*/
-#include <inttypes.h>
-#include <zephyr/ztest.h>
-
#include "math.h"
#include "math_util.h"
+#include <inttypes.h>
+
+#include <zephyr/ztest.h>
+
ZTEST_USER(math, bitmask_uint64)
{
zassert_equal(bitmask_uint64(-1), 0);
diff --git a/zephyr/test/math/src/math_util.c b/zephyr/test/math/src/math_util.c
index a3f26d3fea..184dd2b999 100644
--- a/zephyr/test/math/src/math_util.c
+++ b/zephyr/test/math/src/math_util.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
+#include "builtin/stdio.h"
#include "common.h"
#include "math.h"
#include "math_util.h"
-#include "builtin/stdio.h"
+
+#include <zephyr/ztest.h>
ZTEST_USER(math, arc_cos__x_below_range)
{
diff --git a/zephyr/test/math/src/vector.c b/zephyr/test/math/src/vector.c
index 87dad3a78d..e588be52af 100644
--- a/zephyr/test/math/src/vector.c
+++ b/zephyr/test/math/src/vector.c
@@ -3,11 +3,11 @@
* found in the LICENSE file.
*/
-#include <zephyr/ztest.h>
-
#include "math.h"
#include "math_util.h"
+#include <zephyr/ztest.h>
+
ZTEST_USER(math, cosine_of_angle_diff__zero_magnitude_vector)
{
intv3_t v0 = { 0, 0, 0 };
diff --git a/zephyr/test/qcom_power/src/main.c b/zephyr/test/qcom_power/src/main.c
index 33288af05f..8de3f051d6 100644
--- a/zephyr/test/qcom_power/src/main.c
+++ b/zephyr/test/qcom_power/src/main.c
@@ -3,27 +3,27 @@
* found in the LICENSE file.
*/
-#include <zephyr/device.h>
-#include <zephyr/devicetree.h>
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-#include <zephyr/drivers/gpio/gpio_emul.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/shell/shell_dummy.h>
-#include <zephyr/fff.h>
-
-#include <setjmp.h>
-
-#include "gpio_signal.h"
-#include "power/qcom.h"
-#include "ec_app_main.h"
-#include "power.h"
#include "console.h"
-#include "task.h"
+#include "ec_app_main.h"
+#include "gpio.h"
+#include "gpio_signal.h"
#include "hooks.h"
#include "host_command.h"
#include "lid_switch.h"
-#include "gpio.h"
+#include "power.h"
+#include "power/qcom.h"
+#include "task.h"
+
+#include <setjmp.h>
+
+#include <zephyr/device.h>
+#include <zephyr/devicetree.h>
+#include <zephyr/drivers/gpio.h>
+#include <zephyr/drivers/gpio/gpio_emul.h>
+#include <zephyr/fff.h>
+#include <zephyr/kernel.h>
+#include <zephyr/shell/shell_dummy.h>
+#include <zephyr/ztest.h>
/* For simplicity, enforce that all the gpios are on the same controller. */
#define GPIO_DEVICE \
diff --git a/zephyr/test/rex/src/usb_pd_policy.c b/zephyr/test/rex/src/usb_pd_policy.c
index f6a5ce4ee7..3f7406bdad 100644
--- a/zephyr/test/rex/src/usb_pd_policy.c
+++ b/zephyr/test/rex/src/usb_pd_policy.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
-#include <zephyr/fff.h>
-#include <zephyr/ztest.h>
-
#include "charge_manager.h"
#include "chipset.h"
#include "ec_commands.h"
-#include "usb_pd.h"
#include "usb_charge.h"
+#include "usb_pd.h"
#include "usbc_ppc.h"
+#include <zephyr/fff.h>
+#include <zephyr/ztest.h>
+
DECLARE_FAKE_VALUE_FUNC(int, chipset_in_state, int);
DEFINE_FAKE_VALUE_FUNC(int, chipset_in_state, int);
DECLARE_FAKE_VALUE_FUNC(int, ppc_vbus_source_enable, int, int);
diff --git a/zephyr/test/system_common/src/build_info.c b/zephyr/test/system_common/src/build_info.c
index 7983c1f0a4..1057a3c013 100644
--- a/zephyr/test/system_common/src/build_info.c
+++ b/zephyr/test/system_common/src/build_info.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
+#include "host_command.h"
+#include "system.h"
+
#include <zephyr/device.h>
#include <zephyr/fff.h>
#include <zephyr/ztest_assert.h>
#include <zephyr/ztest_test_new.h>
-#include "host_command.h"
-#include "system.h"
-
ZTEST_SUITE(host_cmd_get_build_info, NULL, NULL, NULL, NULL, NULL);
FAKE_VALUE_FUNC(const char *, system_get_build_info);
diff --git a/zephyr/test/system_common/src/get_version.c b/zephyr/test/system_common/src/get_version.c
index 87a41bad58..a5e4fd5365 100644
--- a/zephyr/test/system_common/src/get_version.c
+++ b/zephyr/test/system_common/src/get_version.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
+#include "host_command.h"
+#include "system.h"
+
#include <zephyr/device.h>
#include <zephyr/fff.h>
#include <zephyr/ztest_assert.h>
#include <zephyr/ztest_test_new.h>
-#include "host_command.h"
-#include "system.h"
-
ZTEST_SUITE(host_cmd_get_version, NULL, NULL, NULL, NULL, NULL);
__override const char *system_get_version(enum ec_image copy)
diff --git a/zephyr/test/system_common/src/reboot.c b/zephyr/test/system_common/src/reboot.c
index 759b93d89f..18b5f0fd38 100644
--- a/zephyr/test/system_common/src/reboot.c
+++ b/zephyr/test/system_common/src/reboot.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
+#include "host_command.h"
+#include "system.h"
+
#include <zephyr/device.h>
#include <zephyr/fff.h>
#include <zephyr/ztest_assert.h>
#include <zephyr/ztest_test_new.h>
-#include "host_command.h"
-#include "system.h"
-
FAKE_VOID_FUNC(system_reset, int);
FAKE_VOID_FUNC(system_hibernate, uint32_t, uint32_t);
diff --git a/zephyr/test/system_common/src/system_is_locked.c b/zephyr/test/system_common/src/system_is_locked.c
index 2ea9f3038b..d880e4e117 100644
--- a/zephyr/test/system_common/src/system_is_locked.c
+++ b/zephyr/test/system_common/src/system_is_locked.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
+#include "system.h"
+
#include <zephyr/shell/shell_dummy.h>
#include <zephyr/ztest_assert.h>
#include <zephyr/ztest_test_new.h>
-#include "system.h"
-
ZTEST_USER(system_is_locked, test_syslock_console_cmd)
{
/*
diff --git a/zephyr/test/system_shim/src/test_system.c b/zephyr/test/system_shim/src/test_system.c
index e6e7077540..56031a4b67 100644
--- a/zephyr/test/system_shim/src/test_system.c
+++ b/zephyr/test/system_shim/src/test_system.c
@@ -3,7 +3,12 @@
* found in the LICENSE file.
*/
+#include "drivers/cros_system.h"
+#include "fakes.h"
+#include "system.h"
+
#include <setjmp.h>
+
#include <zephyr/device.h>
#include <zephyr/drivers/bbram.h>
#include <zephyr/fff.h>
@@ -12,10 +17,6 @@
#include <zephyr/ztest_assert.h>
#include <zephyr/ztest_test_new.h>
-#include "drivers/cros_system.h"
-#include "fakes.h"
-#include "system.h"
-
LOG_MODULE_REGISTER(test);
#define BBRAM_REGION_OFF(name) \
diff --git a/zephyr/test/tasks/main.c b/zephyr/test/tasks/main.c
index 8bfe9eb602..bbf752c656 100644
--- a/zephyr/test/tasks/main.c
+++ b/zephyr/test/tasks/main.c
@@ -3,14 +3,15 @@
* found in the LICENSE file.
*/
-#include <zephyr/kernel.h>
-#include <stdbool.h>
-#include <zephyr/ztest.h>
-
#include "ec_tasks.h"
#include "task.h"
#include "timer.h"
+#include <stdbool.h>
+
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
/* Second for platform/ec task API (in microseconds). */
#define TASK_SEC(s) (s * 1000 * 1000)
diff --git a/zephyr/test/test_utils/tasks_fakes.c b/zephyr/test/test_utils/tasks_fakes.c
index b4068afa21..d688c6cc24 100644
--- a/zephyr/test/test_utils/tasks_fakes.c
+++ b/zephyr/test/test_utils/tasks_fakes.c
@@ -3,10 +3,11 @@
* found in the LICENSE file.
*/
-#include <zephyr/sys/atomic.h>
-#include <zephyr/fff.h>
#include "task_id.h"
+#include <zephyr/fff.h>
+#include <zephyr/sys/atomic.h>
+
/*
* The fakes below are needed to satisfy the final link, but are never
* actually called at runtime. Exclude from the coverage report to avoid
diff --git a/zephyr/test/vboot_efs2/src/main.c b/zephyr/test/vboot_efs2/src/main.c
index 3a4da9cd6e..f79d2dcf78 100644
--- a/zephyr/test/vboot_efs2/src/main.c
+++ b/zephyr/test/vboot_efs2/src/main.c
@@ -14,8 +14,8 @@
#include "usb_mux.h"
#include "usbc_ppc.h"
#include "vboot.h"
-
#include "zephyr/devicetree.h"
+
#include <stdint.h>
#include <zephyr/drivers/gpio/gpio_emul.h>