tests: drivers: build_all: add comparator test suite

Add comparator build_all test suite designed to test multiple
devicetree overlays and boards for each comparator device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
This commit is contained in:
Bjarki Arge Andreasen 2024-09-04 11:22:29 +02:00 committed by Anas Nashif
parent 4adc92475d
commit 13af5ca0dc
7 changed files with 119 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(build_all_comparator)
target_sources(app PRIVATE src/main.c)

View file

@ -0,0 +1,14 @@
/*
* Copyright (c) 2024 Nordic Semiconductor
*
* SPDX-License-Identifier: Apache-2.0
*/
&comp {
main-mode = "DIFF";
psel = "AIN0";
extrefsel = "AIN1";
sp-mode = "HIGH";
isource = "DISABLED";
status = "okay";
};

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2024 Nordic Semiconductor
*
* SPDX-License-Identifier: Apache-2.0
*/
&comp {
main-mode = "SE";
psel = "AIN0";
refsel = "INT_1V2";
sp-mode = "HIGH";
th-up = <36>;
th-down = <28>;
isource = "DISABLED";
status = "okay";
};

View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2024 Nordic Semiconductor
*
* SPDX-License-Identifier: Apache-2.0
*/
&comp {
main-mode = "SE";
psel = "AIN0";
extrefsel = "AIN1";
refsel = "AREF";
sp-mode = "HIGH";
th-up = <36>;
th-down = <28>;
isource = "DISABLED";
status = "okay";
};

View file

@ -0,0 +1,6 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_COMPARATOR=y

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
int main(void)
{
return 0;
}

View file

@ -0,0 +1,48 @@
common:
build_only: true
tags:
- drivers
- comparator
tests:
drivers.build_all.comparator.nrf_comp.diff:
extra_args:
- DTC_OVERLAY_FILE="nrf_comp/diff.overlay"
platform_allow:
- nrf52dk/nrf52810
- nrf52dk/nrf52832
- nrf52833dk/nrf52820
- nrf52833dk/nrf52833
- nrf52840dk/nrf52811
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf9280pdk/nrf9280/cpuapp
drivers.build_all.comparator.nrf_comp.se_aref:
extra_args:
- DTC_OVERLAY_FILE="nrf_comp/se_aref.overlay"
platform_allow:
- nrf52dk/nrf52810
- nrf52dk/nrf52832
- nrf52833dk/nrf52820
- nrf52833dk/nrf52833
- nrf52840dk/nrf52811
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf9280pdk/nrf9280/cpuapp
drivers.build_all.comparator.nrf_comp.se:
extra_args:
- DTC_OVERLAY_FILE="nrf_comp/se.overlay"
platform_allow:
- nrf52dk/nrf52810
- nrf52dk/nrf52832
- nrf52833dk/nrf52820
- nrf52833dk/nrf52833
- nrf52840dk/nrf52811
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf9280pdk/nrf9280/cpuapp