1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests/saul_drivers: add saul build test application

This commit is contained in:
Alexandre Abadie 2022-01-05 10:42:38 +01:00
parent ad03af4a50
commit 70d7b4eb13
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
3 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,52 @@
BOARD ?= stm32f4discovery
include ../Makefile.tests_common
# Only build on a subset of boards (one per arch supported and
# with enough features provided)
BOARD_WHITELIST ?= \
atmega256rfr2-xpro \
esp32-wroom-32 \
stm32f4discovery \
#
# Get the list of drivers with a SAUL interface (without saul periph)
DRIVERS_DIR = $(RIOTBASE)/drivers
DRIVERS_WITH_SAUL_PATHS = $(filter-out $(wildcard $(DRIVERS_DIR)/saul/*_saul.c),$(wildcard $(DRIVERS_DIR)/*/*_saul.c))
DRIVERS ?= $(subst _saul.c,,$(notdir $(DRIVERS_WITH_SAUL_PATHS)))
USEMODULE += $(DRIVERS)
# Somes drivers with submodules needs special care to select a precise driver variant
ifneq (,$(filter adcxx1c,$(DRIVERS)))
USEMODULE += adc081c
endif
ifneq (,$(filter apds99xx,$(DRIVERS)))
USEMODULE += apds9960
endif
ifneq (,$(filter bme680,$(DRIVERS)))
USEMODULE += bme680_i2c
endif
ifneq (,$(filter lm75,$(DRIVERS)))
USEMODULE += tmp1075
endif
ifneq (,$(filter lpsxxx,$(DRIVERS)))
USEMODULE += lps22hh
endif
ifneq (,$(filter mhz19,$(DRIVERS)))
USEMODULE += mhz19_uart
endif
ifneq (,$(filter mpu9x50,$(DRIVERS)))
USEMODULE += mpu9150
endif
ifneq (,$(filter pcf857x,$(DRIVERS)))
USEMODULE += pcf8575
endif
ifneq (,$(filter si70xx,$(DRIVERS)))
USEMODULE += si7021
endif
ifneq (,$(filter tmp00x,$(DRIVERS)))
USEMODULE += tmp006
endif
USEMODULE += saul_default
include $(RIOTBASE)/Makefile.include

View File

@ -0,0 +1,9 @@
saul_drivers
============
This application is only used by the CI to check the build of drivers that
provide a SAUL interface.
All such drivers are added automatically to the build along with the
`saul_default` module. This will check:
- the build of the saul interface,
- the build of driver auto initialization.

24
tests/saul_drivers/main.c Normal file
View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2022 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief Build test application for drivers providing a SAUL interface
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*
* @}
*/
int main(void)
{
return 0;
}