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:
parent
58c8199aa6
commit
68b89da299
7 changed files with 52 additions and 1 deletions
|
@ -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
|
||||
|
|
5
tests/drivers/sensor2/Makefile
Normal file
5
tests/drivers/sensor2/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
KERNEL_TYPE = nano
|
||||
BOARD ?= quark_d2000_crb
|
||||
CONF_FILE = prj.conf
|
||||
|
||||
include ${ZEPHYR_BASE}/Makefile.inc
|
2
tests/drivers/sensor2/README.txt
Normal file
2
tests/drivers/sensor2/README.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Build test for sensor drivers:
|
||||
bmc150_magn
|
9
tests/drivers/sensor2/prj.conf
Normal file
9
tests/drivers/sensor2/prj.conf
Normal 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
|
1
tests/drivers/sensor2/src/Makefile
Normal file
1
tests/drivers/sensor2/src/Makefile
Normal file
|
@ -0,0 +1 @@
|
|||
obj-y += main.o
|
31
tests/drivers/sensor2/src/main.c
Normal file
31
tests/drivers/sensor2/src/main.c
Normal 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");
|
||||
}
|
4
tests/drivers/sensor2/testcase.ini
Normal file
4
tests/drivers/sensor2/testcase.ini
Normal file
|
@ -0,0 +1,4 @@
|
|||
[test_sensor_build]
|
||||
build_only = true
|
||||
tags = drivers
|
||||
platform_whitelist = arduino_101_sss quark_d2000_crb
|
Loading…
Add table
Add a link
Reference in a new issue