tests: Adding more sensor build tests.

Add another group of sensors tests.  Ideally these would be added to
the existing sensor test, however we are at the ROM limit of the
default board, enabling the rest of the bmc150 driver code is
sufficient to break the link.  Ideally these build tests would succeed
on as larger group of boards as possible, therefore rather than switch
the default board to something with more ROM it seems more appropriate
to create more, smaller tests.

Moving the current partial bmc150 build test from its current home to
a new test and adding the missing parts of the driver.

This split of sensor tests into multiple groups is arbitrary,
suggestions for a systematic approach welcome.

Change-Id: I4d33bff00e483558c4a8486afb96c1906e2d2281
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit is contained in:
Marcus Shawcroft 2016-10-07 17:28:28 +01:00 committed by Anas Nashif
commit 68b89da299
7 changed files with 52 additions and 1 deletions

View file

@ -8,7 +8,6 @@ CONFIG_SENSOR=y
CONFIG_LSM9DS0_MFD=y
CONFIG_AK8975=y
CONFIG_BMA280=y
CONFIG_BMC150_MAGN=y
CONFIG_BME280=y
CONFIG_DHT=y
CONFIG_HDC1008=y

View file

@ -0,0 +1,5 @@
KERNEL_TYPE = nano
BOARD ?= quark_d2000_crb
CONF_FILE = prj.conf
include ${ZEPHYR_BASE}/Makefile.inc

View file

@ -0,0 +1,2 @@
Build test for sensor drivers:
bmc150_magn

View file

@ -0,0 +1,9 @@
CONFIG_NANO_TIMEOUTS=y
CONFIG_I2C=y
CONFIG_ADC=y
CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SENSOR=y
CONFIG_BMC150_MAGN=y
CONFIG_BMC150_MAGN_TRIGGER=y
CONFIG_BMC150_MAGN_TRIGGER_DRDY=y

View file

@ -0,0 +1 @@
obj-y += main.o

View file

@ -0,0 +1,31 @@
/*
* Copyright (c) 2016 ARM Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <zephyr.h>
#include <misc/printk.h>
/*
* @file
* @brief Hello World demo
* Nanokernel version of hello world demo
*/
void main(void)
{
printk("Hello World!\n");
}

View file

@ -0,0 +1,4 @@
[test_sensor_build]
build_only = true
tags = drivers
platform_whitelist = arduino_101_sss quark_d2000_crb