Skip to content
Permalink
Browse files

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>
  • Loading branch information...
nashif committed Jul 6, 2019
1 parent 5f24b41 commit 5c485208bf92f10ae2c784c97bec01afd047e0d5
@@ -4,38 +4,6 @@
* 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"

@@ -12,46 +12,20 @@
#include <sys/util.h>
#include <ztest.h>

#if defined(CONFIG_BOARD_QUARK_SE_C1000_DEVBOARD)
#define DEV_NAME DT_GPIO_QMSI_0_NAME
#define PIN_OUT 15 /* GPIO15_I2S_RXD */
#define PIN_IN 16 /* GPIO16_I2S_RSCK */
#elif defined(CONFIG_BOARD_QUARK_SE_C1000_DEVBOARD_SS)
#define DEV_NAME DT_GPIO_QMSI_SS_0_NAME
#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 */
#if defined(DT_ALIAS_GPIO_0_LABEL)
#define DEV_NAME DT_ALIAS_GPIO_0_LABEL
#elif defined(DT_ALIAS_GPIO_1_LABEL)
#define DEV_NAME DT_ALIAS_GPIO_1_LABEL
#elif defined(DT_ALIAS_GPIO_3_LABEL)
#define DEV_NAME DT_ALIAS_GPIO_3_LABEL
#else
#error Unsupported board
#endif

#define PIN_OUT 2
#define PIN_IN 3


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

0 comments on commit 5c48520

Please sign in to comment.
You can’t perform that action at this time.