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:
Fabio Baltieri 2023-11-22 23:13:18 +00:00 committed by Carles Cufí
parent d14066b061
commit 407e9a4c74
6 changed files with 52 additions and 0 deletions

View file

@ -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"

View 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})

View 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";
};
};
};
};

View file

@ -0,0 +1,3 @@
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_GNSS=y

View file

@ -0,0 +1,10 @@
/*
* Copyright 2023 Google LLC
*
* SPDX-License-Identifier: Apache-2.0
*/
int main(void)
{
return 0;
}

View file

@ -0,0 +1,8 @@
common:
tags:
- drivers
- gnss
build_only: true
platform_allow: native_sim
tests:
drivers.gnss.default: {}