test: add a gnss build_all test
Add a generic test for GNSS devices. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
d14066b061
commit
407e9a4c74
|
@ -1103,6 +1103,7 @@ Release Notes:
|
|||
- doc/hardware/peripherals/gnss.rst
|
||||
- drivers/gnss/
|
||||
- include/zephyr/drivers/gnss.h
|
||||
- tests/drivers/build_all/gnss/
|
||||
- tests/drivers/gnss/
|
||||
labels:
|
||||
- "area: GNSS"
|
||||
|
|
8
tests/drivers/build_all/gnss/CMakeLists.txt
Normal file
8
tests/drivers/build_all/gnss/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(build_all)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
22
tests/drivers/build_all/gnss/app.overlay
Normal file
22
tests/drivers/build_all/gnss/app.overlay
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright 2023 Google LLC
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_uart: uart@0 {
|
||||
compatible = "vnd,serial";
|
||||
reg = <0x0 0x1000>;
|
||||
status = "okay";
|
||||
|
||||
gnss: gnss-nmea-generic {
|
||||
compatible = "gnss-nmea-generic";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
3
tests/drivers/build_all/gnss/prj.conf
Normal file
3
tests/drivers/build_all/gnss/prj.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_GNSS=y
|
10
tests/drivers/build_all/gnss/src/main.c
Normal file
10
tests/drivers/build_all/gnss/src/main.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright 2023 Google LLC
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
8
tests/drivers/build_all/gnss/testcase.yaml
Normal file
8
tests/drivers/build_all/gnss/testcase.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
common:
|
||||
tags:
|
||||
- drivers
|
||||
- gnss
|
||||
build_only: true
|
||||
platform_allow: native_sim
|
||||
tests:
|
||||
drivers.gnss.default: {}
|
Loading…
Reference in a new issue