Commit Graph

213 Commits

Author SHA1 Message Date
Ulf Magnusson 5405f68878 kconfig: Remove remaining 'option env' bounce symbols
These are no longer needed since commit 4dc9e5b2de ("kconfig: Get rid
of 'option env' bounce symbols"). The C tools are likely to get rid of
them soon too.

The APPLICATION_BASE symbol (option env="PROJECT_BASE") triggered a
compatibility warning, because 'option env' symbols now need to have the
same name as the environment variables they reference to be compatible
with Kconfiglib. APPLICATION_BASE is unused, so just remove it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-28 17:21:11 -04:00
Punit Vara 6a014b6321 tests: spi: Check for return value
Check return value for k_poll()

issue: #6687

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-25 13:37:45 -05:00
Ulf Magnusson d96dbadd75 tests: adc_simple: Change ADC_DEBUG=y to SYS_LOG_ADC_LEVEL=4
The ADC_DEBUG Kconfig symbol was removed in commit a679f32920
("sys_log: replace old debug macros at ADC driver"), which introduced
SYS_LOG_ADC_LEVEL and switched to using SYS_LOG_DBG() for debug
messages.

Remove the ADC_DEBUG=y assignment and set SYS_LOG_ADC_LEVEL=4 so that
the debug messages still show up.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-25 11:19:34 -04:00
Kumar Gala 8e41572774 drivers: spi: remove dead references to CONFIG_SPI_QMSI{_SS}
During the spi rework we removed the qmsi spi drivers so we no longer
have Kconfig symbols or drivers related to CONFIG_SPI_QMSI{_SS}.  There
are a few references still around that we should remove

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 21:09:32 -04:00
Ulf Magnusson 45221a9706 serial: nsim: Fix impossible-to-enable CONFIG_UART_NSIM
CONFIG_UART_NSIM depends on CONFIG_NSIM, which was removed in commit
9bc69a46fa ("boards: Update arc em_starterkit support from 2.2 to
2.3"). Remove the dependency, and also remove the CONFIG_NSIM=y setting
from the test_nsim test (which should now work).

Also change the condition for EXTERN()ing _VectorTable in
include/arch/arc/v2/linker.ld to check CONFIG_UART_NSIM instead of
CONFIG_NSIM. I'm guessing the EXTERN() is there to make the symbol
visible to nSIM, though I don't know anything about it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-24 13:09:28 -04:00
Punit Vara 7a3ace35dd tests: Remove newline character
Remove new line character from all zassert_*
messages. Following script has been used to do this.

https://github.com/punitvara/scripts/blob/master/remove_newlinech.py

zassert test framework adds newlines character implicitly.

issue: #7170

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-23 12:59:12 -04:00
Ulf Magnusson cf227f3681 tests: drivers: build_all: Fix CONFIG_ETH_ENC28J60_0_MAC2 reference
I'm guessing this was meant to assign CONFIG_ETH_ENC28J60_0_MAC{3-5},
which exist.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-23 08:52:58 -04:00
Andrew Boie 136687d26c test_build_sensors_a_m: disable app memory
We run into the limit of 32 object files on ARM when
CONFIG_APPLICATION_MEMORY is enabled.

Bug #7703 filed, meanwhile just disable it, it's not
needed for this test case.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-22 15:59:07 -07:00
Anas Nashif 39f396a8ad doc: tests: remove obsolete and bogus test groups
Remove unstructured and unused doxygen groups for tests. We will now add
doxygen comments per test function and follow a more structured
grouping.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-18 01:48:31 +03:00
Maureen Helm 3f43fc7770 tests: watchdog: Replace platform whitelists with depends_on
Replaces platform whitelists with "depends_on: watchdog" to make the
watchdog test build for all supported platforms. Also updates the
testcase name to follow the new <component>.<subcomponent>
classification scheme.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-17 15:00:55 -05:00
Maureen Helm fb74866c2d tests: watchdog: Update test to work with the mcux watchdog driver
Makes the dual timeout test conditional upon the nrfx watchdog driver
because not all watchdogs can support multiple timeouts.

Test now passes on frdm_k64f, hexiwear_k64, and usb_kw24d512 boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-17 15:00:55 -05:00
Andy Gross eeeffcaf58 tests: rtc: Adjust RTC samples tests for NXP RTC
This patch adjusts some of the timeouts for the RTC sample test.  The
NXP RTC varies a little bit from the QMSI due to the way the timer
count and alarm count work.  The NXP will trigger an alarm when the
timer count and alarm count are the same, but only when it increments
to the next value.

If you set the alarm to be 1 second past the current time, it may take
up to 2 seconds.  Setting the alarm equal to the current time will
result in an alarm occurring in less than 1 elapsed second.

Signed-off-by: Andy Gross <agross@kernel.org>
2018-05-17 13:45:08 -05:00
Andy Gross 27bdb83308 rtc: Add prescalar configuration option
This patch adds a prescaler configuration option that denotes the
number of RTC ticks per second.  This is used to calculate the value
for 1 second.

Signed-off-by: Andy Gross <agross@kernel.org>
2018-05-17 13:45:08 -05:00
Adithya Baglody 2db1c080d8 tests: drivers: build_all: Ensure correct builds.
Ensure that sanitycheck runs this sample only on boards with
right drivers support. This test was picking all targets and
executing on each of them .This eliminates incorrect builds.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-05-15 17:48:18 +03:00
Karol Lasończyk c9898097bb tests: watchdog: Add new test implementation
New test checks watchdog API if the simpliest test cases work
correctly. Each test contains description at the begining of the
source file.
This implementation replace old SoC-centric implementation.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2018-05-14 10:28:23 -05:00
Maureen Helm 5ef03f5f41 tests: spi_loopback: Add frdm_kw41z configuration
Adds a board-specific configuration for the frdm_kw41z to the
spi_loopback test.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Anas Nashif 93109f2d8e tests: enhance test meta-data/improve test naming
Enhance the test meta-data and test names. This will is needed for
better and consistent reporting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-07 12:27:07 -04:00
Anas Nashif b3275d651c tests/samples: add hw dependencies
Add hardware dependencies and filters to make sure we do not explode if
for example we try to build a sample/test using rtc when the platform
does not support that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 19:10:27 -04:00
Anas Nashif 2b62f1ab02 tests: fixed doxygen comments
Various fixes to bad doxygen syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-30 17:15:29 -04:00
Anas Nashif eb6f20318e tests: fix meta data of peripheral tests
Improve naming of tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-25 14:18:15 +05:30
Anas Nashif 7a5ff13703 tests: allow unsupported tests to be skipped
Instead of completely excluding those tests, mark them as skipped and
provide an noop function that marks the test as skipped where test is
not supported.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-25 14:18:15 +05:30
Andrzej Głąbek 998c79d09b drivers: spi: Add shim for nrfx SPIM driver
This adds a translation layer to make the nrfx driver for the nRF SPIM
(SPI Master with EasyDMA) peripheral accessible via the Zephyr's API.
The shim is provided only for nRF52840 because of a hardware anomaly
present in nRF52832. See Anomaly 58 (SPIM: An additional byte is clocked
out when RXD.MAXCNT = 1) in Errata for this chip.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-12 14:19:53 -04:00
Armando Visconti 9bde3c06e1 tests: build_all: Add LPS22HB and LSM6DSL sensors build test
Add to CI system the build test for LPS22HB environmental
sensor and LSM6DSL motion sensor.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-04-10 22:12:14 +02:00
Diego Sueiro e2924ab42b tests: add min_flash option for some tests
Following tests were failing on a microcontroller with 32KB flash:
    benchmark.application
    crypto.ecc_dh
    crypto.ecc_dsa
    test_build_ethernet
    test_build_sensors_a_m

The min_flash option has been added in the test case yaml files.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-04-10 10:07:18 -05:00
Anas Nashif 49bb83138c tests: classify periphera tests
Fix testcase naming and follow <component>.<subcomponent> where it makes
sense.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Anas Nashif f3e8cb7e61 tests: add missing harness support
Add missing harness requirement for driver tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Marti Bolivar 92be41126d tests: drivers: build_all: add TEMP_NRF5 to sensor test
Build the nRF5 temperature sensor driver in this test case.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-04-04 14:53:54 -05:00
Andrzej Głąbek 18d354c491 tests: spi_loopback: Add configurations for a few nRF5 boards
This adds to the spi_loopback test board-specific configurations
for the following boards:
- nrf51_pca10028
- nrf52_pca10040
- nrf52840_pca10056

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-04 19:02:35 +02:00
Maureen Helm 9116cc7aee tests: spi_loopback: Add frdm_k64f configuration
Adds a board-specific configuration for the frdm_k64f to the
spi_loopback test.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka b4247fde4d tests/spi: Remove excluded boards
These now support the new API through SPI DW native driver.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka a5efadf219 tests/drivers: Removing old SPI test
It was much more limited than the spi_loopback test, and of course using
the legacy API. Removing it then.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka f44ba8e7d4 api/spi: Make cs attribute in struct spi_config constant
Content is never modified by any driver.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka da42c0077c api/spi: Add a dedicated Kconfig option for asynchronous mode enablement
Instead of using CONFIG_POLL, which is not directly related to SPI and
is a kernel option, let's have SPI_ASYNC instead. When enabled, it will
select POLL automatically.

Fixes #5839

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka ea2431f32f api/spi: Reduce parameter number on transceive function
tx_bufs/tx_count and rx_bufs/rx_count can be hold in another dedicated
structure, thus reducing the number of parameters to transceive. This
permits to avoid using the stack when calling transceive.

Since we saved parameters, we can expose back the struct device pointer,
to stay consistent with other device driver APIs.

Fixes #5839

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 324265420b api/spi: Disable legacy API by default
Let's start deprecation work of the SPI legacy API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Jukka Rissanen 8b8178b0f9 drivers: eth: gmac: Do not verify config for unit tests
No need to verify that the configuration is proper if we are
compiling the driver for unit test and not going to ever run
the test.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-03-20 10:37:34 -04:00
Aapo Vienamo 3108d05420 tests: drivers: build_all: Add SX1509 GPIO test
A new build test for gpio drivers is added to build_all testcase.yaml.
The gpio_sx1509 driver is enabled in the .conf file and dts.fixup macros
are added for the driver.

Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
2018-03-13 12:31:16 -05:00
Henrik Brix Andersen b31ccd1261 tests: spi_loopback: Fix Arduino Zero SPI device name.
The SAM0 SoC was switched to use DTS for SPI configuration. Adapt the
spi_loopback test configuration for the Arduino Zero to use the
correct device name.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-03-10 17:03:33 -06:00
Michael Hope f7c1903418 tests: gpio: add a configuration for the Arduino Zero.
Allows testing the new interrupt support.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-10 11:42:25 -06:00
Daniel Wagenknecht 0aef9030e4 tests: spi_loopback: add testcase.yaml
Add a testcase.yaml configuration to spi_loopback test to include
it into sanitycheck.

Fixes #4576

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-02-14 08:06:26 -05:00
Daniel Wagenknecht c7c442ad9f tests: spi_loopback: add board specific configuration
This restores the board specific configurations that were present
before moving the test to using KConfig.

<board>.conf files from boards subdirectory get merged with
prj_base.conf file.

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-02-14 08:06:26 -05:00
Daniel Wagenknecht 64060020ea tests: spi_loopback: Move to using KConfig
Convert this test to using KConfig instead of conditional compilation.
Standard configuration is provided by prj_base.conf and KConfig
default values.

Remove prj_<board>.conf files.

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
2018-02-14 08:06:26 -05:00
Kumar Gala 30824c9dc3 tests: build_all: Fix building for lps25hb and lsm6ds0
The introduction of device tree support sensors need to update the
dts.fixup file in build_all to make sure that we still build.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-07 12:31:51 -06:00
Michael Hope e13e90f87f tests: spi: add a configuration for the Arduino Zero.
Used to test the recent driver updates.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-02-05 07:42:58 -08:00
Paul Sokolovsky b2ce9df077 tests: Few test require CONFIG_STDOUT_CONSOLE=n
For some, "y" affects output, for some less tested platforms, leads
to crashes.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-02-05 07:05:12 -08:00
Maureen Helm 7dc68b38c3 tests: build_all: Add missing sensors
Now that we have an application level dts fixup, we can re-enable the
fxos8700 sensor in the build_all test. Also added fxas21002 and max30101
sensors which were missing.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 10:17:58 -06:00
Kumar Gala e8d40df739 tests: build_all: add dts.fixup to deal with compile issues
The following drivers are in the process of support getting their I2C
name, bus, address params from device tree.  However if a given board
that supports device tree doesn't have one of these sensors we can't
build it.

To address this we add a dummy dts.fixup at the application level with
provides values for the defines we'd normally get from the dts
generation.

Fixes: #5722

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-29 10:39:59 -06:00
Kumar Gala d06b650712 tests: build_all: cleanup unused Kconfig symbols
We don't have anything that defines CONFIG_LSM2DS0 or
CONFIG_LSM2DS0_GYRO anymore so remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-29 10:39:59 -06:00
Yannis Damigos 3d1115adea tests: Clear SPI_*_IRQ_PRI from tests and samples
Remove SPI_*_IRQ_PRI from tests and samples.
Using DT to get the *_IRQ_PRI, we can't
override it using Kconfig.

If needed, use a BOARD_NAME.overlay file to
override default values.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-17 11:51:48 -06:00
Alberto Escolar Piedras eb633eaa53 tests: driver/ipm blacklist for POSIX arch
This test should be blacklisted for any board based
on the POSIX arch, not just the native_posix board

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-01-15 18:42:09 -05:00