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>
The generate_inc_file_for_target() extension is a useful wrapper
around the more low-level generate_inc_file(). It takes care of
ensuring that the generated file correctly depends on it's source.
To do so it needs to name and define a custom_target, the name must be
unique, so it was constructed based on the path to the generated file,
but this caused multiple issues.
The intention was that the path of the file would help identify the
target, in hindsight, identifying the target has proven to not be
important.
This patch fixes#5466 by using a random string to construct the
target name instead of the path to the generated file.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The --print-memory-usage check was accidentally corrupting the
CMAKE_REQUIRED_FLAGS variable due to a variable de-referencing bug.
This was affecting app CMakeLists.txt code that was using
CMAKE_REQUIRED_FLAGS.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
target_ld_options() was only testing whether a flag could be passed to
the compiler driver when it was compiling an object file. Not whether
a flag could be passed to the compiler driver when it was linking an
elf file.
For most flags, these tests would have the same result, but it does
not for flags like -Wl,--print-memory-usage or -Wl,notaflag.
This patch fixes#5488 by re-using the method from #5459.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added posix to the list of arch's with boards. Usage will now show
native_posix as one of the available boards.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
We are getting warnings when building with native port:
used with length equal to number of elements without multiplication by
element size
This fixes the call of memset.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
Added small delay in each iteration of the critical_loop
loop for the posix arch:
For this arch this loop and critical_rtn would otherwise
run in 0 time and therefore the test would never finish.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
test/timer/timer_api use k_busy_wait to implement the
tests' busy_wait_ms, for archs which require a different
type of busy waiting
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
terminate process as soon as the testcase is done
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
For the POSIX arch we rely on the native OS to handle
segfaults, and stack overflows.
So that we can debug them with normal native tools.
Therefore these 2 are ifdef'ed for this arch in this test
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
With the native port we are able to generate coverage reports, add the
needed options to the compliler and add a kconfig option to enable this
on the supported architectures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
benchmark/app_kernel test was giving a float exception
if the operations were performed faster than the
system timer resolution.
Added a safety macro in all divisions to avoid the fault
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Native port now adds .exe to the generated ELF
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To indicate the generated binary is executable on the host, add .exe
extension to the generated ELF file.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
All runner logic was implemented in qemu.cmake, remove the generic stuff
and make qemu.cmake qemu specific.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This adds support of 'make run' to the native port allowing us to run
applications natively on the host instead of qemu.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Right now we are hardcoded to only qemu, with the native port, we make
this more generic and support this in a plugin mode where a running has
its own cmake definitons implementing the various targets.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
A new arch (posix) which relies on pthreads to emulate the context
switching
A new soc for it (inf_clock) which emulates a CPU running at an
infinely high clock (so when the CPU is awaken it runs till completion
in 0 time)
A new board, which provides a trivial system tick timer and
irq generation.
Origin: Original
Fixes#1891
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Having posix headers in the default include path causes issues with the
posix port. Move to a sub-directory to avoid any conflicts.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Was ARM specific and could not be used by other architectures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
When building a native application, we use the host provided libc, so do
not build minimal libc or newlib.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Environment variables should be checked with if(DEFINED
ENV{ESP_IDF_PATH}).
if($ENV{ESP_IDF_PATH}) was not evaluating to true as it should have
when env[ESP_IDF_PATH] was set.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
To avoid warnings from cmake such as:
'path' is reserved or not valid for certain CMake features, such as
generator expressions, and may result in undefined behavior.
This can be seen in Jenkins for example where @ is used when multiple
jobs are run on the same machine.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Was enabled by default in gitlint, nothing really bad about tabs,
especially when copy-pasting into commit messages.
Fixes#5453
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Checking for TERM being undefined before doing tput with colors is not
enough; if TERM is defined as 'dumb', this thing also behaves dumbly.
In fact, the whole trying to do colors thing is dumb and causes all
kinds of headache in corner cases, so just wrap anything smelling like
color in a check for TERM being undefined or 'dumb' and be done with
it.
It shall take care of different automation mechanisms that don't
invoke 'make htmldocs' from a user console.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
The PIO cores on Altera Nios-II processors can be used
for GPIOs and each PIO core can be configured as Input only,
Output only or as Bidirectional port from the Qsys tool.
The present Nios-II softcpu image on the Zephyr only has the
support for Output only port and the PIOs[0:3] are wired to
LED[0:3] on the Altera MAX10 board.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>