Skip to content

Commit

Permalink
test: add a gnss build_all test
Browse files Browse the repository at this point in the history
Add a generic test for GNSS devices.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
fabiobaltieri committed Nov 23, 2023
1 parent c970f62 commit 6781264
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS.yml
Expand Up @@ -1101,6 +1101,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"
Expand Down
8 changes: 8 additions & 0 deletions tests/drivers/build_all/gnss/CMakeLists.txt
@@ -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 changes: 22 additions & 0 deletions tests/drivers/build_all/gnss/app.overlay
@@ -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 changes: 3 additions & 0 deletions tests/drivers/build_all/gnss/prj.conf
@@ -0,0 +1,3 @@
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_GNSS=y
10 changes: 10 additions & 0 deletions tests/drivers/build_all/gnss/src/main.c
@@ -0,0 +1,10 @@
/*
* Copyright 2023 Google LLC
*
* SPDX-License-Identifier: Apache-2.0
*/

int main(void)
{
return 0;
}
8 changes: 8 additions & 0 deletions tests/drivers/build_all/gnss/testcase.yaml
@@ -0,0 +1,8 @@
common:
tags:
- drivers
- gnss
build_only: true
platform_allow: native_sim
tests:
drivers.gnss.default: {}

0 comments on commit 6781264

Please sign in to comment.