Commit graph

165 commits

Author SHA1 Message Date
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
Neil Armstrong 7ab0333640 tests: spi_loopback: Enable SPI Loopback test on nucleo_f091rc board
Enable spi_loopback test to work with the nucleo_f091rc board using
the SPI1 controller

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Anas Nashif 829598be2b tests: add CONFIG_TEST for marking tests
Mark tests with CONFIG_TEST to allow for test specific setup and
configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 10:03:57 -05:00
Anas Nashif e1e68c7af3 tests: uart: fixed filtering and make test global
Remove build_only and improved platform filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif f07d66fcef tests: rtc: fix dependencies
Depend on RTC driver being available on the device.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 5f34003da2 tests: integrate quark clock test in build test
This is just a build test, so integrate in the build_only test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 7aec3948ec tests: pwm: fix dependencies and use depends_on
We should only build and run on supported devices.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 8383fa65d1 tests: pinmux: depend on pinmux and support harness
Make sure we only build and run on supported platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif a67a407c5d tests: pci: fix tags
Add correct tag to the testcase.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif f2dc220387 tests: ipm: fix testcase tags
Add correct tag to the testcase.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif e9abafa5fb tests: integrate nsim test in build test
This is just a build test, so make it part of the overall build test
instead of having a special test case for it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif c859ebe02e tests: i2c: make test depend on i2c
Build only for platforms that have an I2C driver.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif a0ba239886 tests: gpio: make test depend on gpio capability
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 9e91d910e8 tests: remove standalone enc28j60 build test
We do already test building this driver somewhere else, this is a
duplicate.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif de4835902e tests: dma: use depends_on to whitelist platforms
Only build for those platforms that support DMA.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 9bf53cb69c build: remove stray CMakeLists.txt
This file is in the wrong place and does nothing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif b886f3184b tests: rename AIO api test
Too much duplication in test structure, just call this api and being
under aio, explains that it is an API test for AIO.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 7440a7ff23 tests: move aio sample to tests
This is clearly a test and not a sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Alberto Escolar Piedras 04c7620580 native: blacklisted 3 testcases
The following 3 testcases are blacklisted for the POSIX
arch / simple_process BOARD:
* tests/drivers/ipm : won't compile due to missing
   __stdout_hook_install()  [part of minimal libc]
  (POSIX arch uses the native libc)
* tests/kernel/mem_protect/stackprot : will crash
  "natively" when trying to corrupt the stack and therefore
  will fail the testcase. The current understanding is that
  the POSIX arch should let the native OS handle faults,
  so they can be debugged with the native tools.
* samples/cpp_synchronization : it is not possible
  to build cpp code yet on top of the posix arch

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2017-12-27 14:16:08 -05:00
Anas Nashif 23f81eeb42 tests/samples: fixed yaml syntax
Use a map directory, avoid the list which makes parsing a bit
cumbersome.

Fixes #5109

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
ravishankar karkala Mallikarjunayya 5be0d4a706 tests/drivers/uart/uart_basic_api : Added build only tag
Testcase yaml requires some interactive inputs to be provided for
execution and hence fails on automation. Hence making it as build
only

Signed-off-by: ravishankar karkala Mallikarjunayya <ravix.shankar.km@intel.com>
2017-12-11 09:33:09 -05:00
Piotr Mienkowski e4dac28bb3 tests: Add i2s driver test
Origin: Original

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-11-30 10:30:33 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Nirmala Devi 44a3514a33 Uart: Added testcase support for drivers using only poll mode
Signed-off-by: Nirmala Devi <nirmala.devix.m@intel.com>
2017-11-03 10:53:17 -04:00
Leandro Pereira da9b0ddf5b drivers: Rename random to entropy
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Vikram Singh Shekhawat cbbec3db70 tests: entropy: Add Entropy driver test case
This test runs with ztest suite. It will verify get_entropy
operation of entropy driver.

Signed-off-by: Vikram Singh Shekhawat <vikramx.shekhawat@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-28 23:06:51 -04:00
Sebastian Bøe b7eaeb9f0a cleanup: Use quote include instead of system include
When the header file is located in the same directory as the source
file it is better to use a relative quote-include, e.g.

than a system include like

Avoiding the use of system includes in these cases is beneficial
because;

* The source code will be easier to build because there will be fewer
system include paths.

* It is easier for a user to determine where a quote-include header
  file is located than where a system include is located.

* You are less likely to encounter aliasing issues if the list of
  system include paths is minimized.

Authors:
Anas Nashif
Sebastian Bøe

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-28 07:11:53 -04:00
Anas Nashif 4bc6e27fda tests: aio: use depends on
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-17 08:55:38 -04:00
Anas Nashif 116aadf936 tests: adc_simple: use depends_on for testcase
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-17 08:55:38 -04:00
Anas Nashif 0b5c0498a5 tests: adc_api: use new testcase scheme and cleanup
Remove the many .conf files and use extra_configs instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-17 08:55:38 -04:00
Anas Nashif 0356590df5 tests: samples: fix yaml syntax
Fix indentation and syntax and make it pass yamllint tool.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-15 08:15:00 -04:00
Kumar Gala 0bfd810d13 i2c: deprecate use of union dev_config
There are several issues with the dev_config union used as a
convenience when calling the i2c_configure api.  One, the union is well
name spaced protected and doesn't convey use with just i2c.  Second
there are assumptions of how the bits might get packed by the union
which can't be guaranteed.  Since the API takes a u32_t lets change in
tree uses to using the macros to setup a u32_t and make the union as
deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-10-11 10:45:12 -04:00
Maureen Helm d5894a17d0 tests: adc: Remove custom hexiwear_k64 configuration
Instead of having a board-specific config for this adc test, enable the
required battery-sense circuit by default at the board level when the
adc driver is enabled.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-10-05 17:54:00 -04:00
Savinay Dharmappa b4fc0738a4 tests: driver: adc: change the sampling delay
patch fix the issue of unable to read from adc by setting
appropriate sampling delay.

The sampling delay should be set to resolution of adc + 2.
In adc qmsi driver the sampling delay received form application
is subtracted from resolution of adc + 2 , if the resultant value
is less than zero then zero is set as sampling delay. So in the
adc_simple application when 12 is passed as sampling delay driver
sets it as zero. So 26 is the minimum sampling delay should be
set in application for a adc with resolution of 12. The reason
to choose 30 was to maintain same value of sampling
delay between adc_simple and adc_api application.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-09-30 13:40:59 -04:00
Luiz Augusto von Dentz 7d01c5ecb7 poll: Enable multiple threads to use k_poll in the same object
This is necessary in order for k_queue_get to work properly since that
is used with buffer pools which might be used by multiple threads asking
for buffers.

Jira: ZEP-2553

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-25 09:00:46 -04:00
Leandro Pereira aa0e931ecc tests: gpio: Add support for ESP32
Adds an #elif for ESP32 boards.  Connect a wire from pin IO2 to pin IO4
so that the test can be executed.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-23 10:28:59 -04:00
Anas Nashif 2de59023dc tests: update min ram requirements and filters
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-14 13:28:42 -04:00
Michał Kruszewski 178191ce68 test: spi: Define asynchronous stack with K_THREAD_STACK_DEFINE.
Previous stack definition caused following warning: passing argument 2
of 'k_thread_create' from incompatible pointer type.

Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
2017-08-10 13:55:17 -04:00
Johann Fischer afedfa95ee tests: dma: cleanup and add loglevel configuration
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-08-09 16:04:46 -05:00
Marti Bolivar 86f23c8877 tests: spi_loopback: improve error logging
Print the entire memory areas of interest on error, instead of
stopping at the first null character.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-08-08 07:45:35 -04:00
Marti Bolivar f95632a14e tests: spi_loopback: log start/end of test at INF level
This makes it easier to distinguish which lines come from which tests.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-08-08 07:45:35 -04:00
Marti Bolivar b147c8f61b tests: spi_loopback: add 96b_carbon support
This includes files for both polled and IRQ-driven I/O. The log level
is deliberately kept to ERROR to try to shake out any timing-dependent
bugs which go away with extra logging.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-08-08 07:45:35 -04:00
Marti Bolivar 30ae3cb9b7 tests: spi_loopback: fix typos
Trivial fixups.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-08-08 07:45:35 -04:00
Michał Kruszewski 062360b596 test: spi: Use k_thread_abort to end asynchronous thread.
k_thread_cancel() is replaced with k_thread_abort() because
k_thread_cancel() is used to cancel threads that have not started yet.
Canceling asynchronous thread was returning an error.

Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
2017-08-08 07:44:21 -04:00
Anas Nashif b4598c19e3 tests: disable building of FXOS8700 sensor for all boards
This sensor was made dependent on certain boards, so building it with
all boards fails now. Disable until proper fix exists.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-28 09:40:38 -05:00
Maureen Helm 719f1dac07 tests: adc: Add support for freedom and hexiwear boards
Adds support for freedom and hexiwear boards to the adc_api test.

Jira: ZEP-1396

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-07-19 14:28:08 -05:00
Andrew Boie 65a9d2a94a kernel: make K_.*_INITIALIZER private to kernel
Upcoming memory protection features will be placing some additional
constraints on kernel objects:

- They need to reside in memory owned by the kernel and not the
application
- Certain kernel object validation schemes will require some run-time
initialization of all kernel objects before they can be used.

Per Ben these initializer macros were never intended to be public. It is
not forbidden to use them, but doing so requires care: the memory being
initialized must reside in kernel space, and extra runtime
initialization steps may need to be peformed before they are fully
usable as kernel objects. In particular, kernel subsystems or drivers
whose objects are already in kernel memory may still need to use these
macros if they define kernel objects as members of a larger data
structure.

It is intended that application developers instead use the
K_<object>_DEFINE macros, which will automatically put the object in the
right memory and add them to a section which can be iterated over at
boot to complete initiailization.

There was no K_WORK_DEFINE() macro for creating struct k_work objects,
this is now added.

k_poll_event and k_poll_signal are intended to be instatiated from
application memory and have not been changed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-10 11:44:56 -07:00
Kumar Gala 9eddc82be3 i2c: remove I2C Slave Read config
The I2C Slave Read support isn't well defined and not actually supported
by any i2c driver at this point.  We can add this back when slave mode
is more thought out.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-07 10:01:38 -05:00