tests: gpio: remove whitelisting

Remove whitelisting and enable broader testing on all boards with needed
features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-07-06 18:35:28 -04:00
commit 5c485208bf
3 changed files with 11 additions and 70 deletions

View file

@ -4,38 +4,6 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
/**
* @addtogroup t_driver_gpio
* @{
* @defgroup t_gpio_basic_api test_gpio_basic_api
* @}
*
* Setup: loop PIN_OUT with PIN_IN on the target board
*
* quark_se_c1000_devboard - x86
* --------------------
*
* 1. PIN_OUT is GPIO_15
* 2. PIN_IN is GPIO_16
*
* quark_se_c1000_ss_devboard - arc
* --------------------
*
* 1. PIN_OUT is GPIO_SS_4/GPIO_SS_AIN_12
* 2. PIN_IN is GPIO_SS_5/GPIO_SS_AIN_13
*
* arduino_101 - x86
* --------------------
*
* 1. PIN_OUT is GPIO_16
* 2. PIN_IN is GPIO_19
*
* arduino_101_sss - arc
* --------------------
*
* 1. PIN_OUT is GPIO_SS_2
* 2. PIN_IN is GPIO_SS_3
*/
#include "test_gpio.h" #include "test_gpio.h"

View file

@ -12,46 +12,20 @@
#include <sys/util.h> #include <sys/util.h>
#include <ztest.h> #include <ztest.h>
#if defined(CONFIG_BOARD_QUARK_SE_C1000_DEVBOARD) #if defined(DT_ALIAS_GPIO_0_LABEL)
#define DEV_NAME DT_GPIO_QMSI_0_NAME #define DEV_NAME DT_ALIAS_GPIO_0_LABEL
#define PIN_OUT 15 /* GPIO15_I2S_RXD */ #elif defined(DT_ALIAS_GPIO_1_LABEL)
#define PIN_IN 16 /* GPIO16_I2S_RSCK */ #define DEV_NAME DT_ALIAS_GPIO_1_LABEL
#elif defined(CONFIG_BOARD_QUARK_SE_C1000_DEVBOARD_SS) #elif defined(DT_ALIAS_GPIO_3_LABEL)
#define DEV_NAME DT_GPIO_QMSI_SS_0_NAME #define DEV_NAME DT_ALIAS_GPIO_3_LABEL
#define PIN_OUT 4 /* GPIO_SS_AIN_12 */
#define PIN_IN 5 /* GPIO_SS_AIN_13 */
#elif defined(CONFIG_BOARD_ARDUINO_101)
#define DEV_NAME DT_GPIO_QMSI_0_NAME
#define PIN_OUT 16 /* IO8 */
#define PIN_IN 19 /* IO4 */
#elif defined(CONFIG_BOARD_ARDUINO_101_SSS)
#define DEV_NAME DT_GPIO_QMSI_SS_0_NAME
#define PIN_OUT 2 /* AD0 */
#define PIN_IN 3 /* AD1 */
#elif defined(CONFIG_BOARD_ESP32)
#define DEV_NAME CONFIG_GPIO_ESP32_0_NAME
#define PIN_OUT 4 /* DIO4 */
#define PIN_IN 2 /* DIO2 */
#elif defined(CONFIG_BOARD_ARDUINO_ZERO)
#define DEV_NAME DT_ATMEL_SAM0_GPIO_PORT_A_LABEL
#define PIN_OUT 20 /* PA20 / pin 6 */
#define PIN_IN 15 /* PA15 / pin 5 */
#elif defined(CONFIG_BOARD_NRF52840_PCA10056)
#define DEV_NAME DT_GPIO_P1_DEV_NAME
#define PIN_OUT 1 /* P1.01 */
#define PIN_IN 2 /* P1.02 */
#elif defined(CONFIG_BOARD_NRF52_PCA10040)
#define DEV_NAME DT_GPIO_P0_DEV_NAME
#define PIN_OUT 11 /* P0.11 */
#define PIN_IN 12 /* P0.12 */
#elif defined(CONFIG_BOARD_NRF51_PCA10028)
#define DEV_NAME DT_GPIO_P0_DEV_NAME
#define PIN_OUT 12 /* P0.12 */
#define PIN_IN 13 /* P0.13 */
#else #else
#error Unsupported board #error Unsupported board
#endif #endif
#define PIN_OUT 2
#define PIN_IN 3
#define MAX_INT_CNT 3 #define MAX_INT_CNT 3
struct drv_data { struct drv_data {
struct gpio_callback gpio_cb; struct gpio_callback gpio_cb;

View file

@ -2,6 +2,5 @@ tests:
peripheral.gpio: peripheral.gpio:
tags: drivers gpio tags: drivers gpio
depends_on: gpio depends_on: gpio
# FIXME: code is board specific, it should be generalised
platform_whitelist: quark_se_c1000_devboard esp32
harness: loopback # see documentation harness: loopback # see documentation
filter: DT_ALIAS_GPIO_0_LABEL or DT_ALIAS_GPIO_1_LABEL