Commit Graph

18 Commits

Author SHA1 Message Date
Marc Herbert 726dd545d6 cmocka/cmake: don't re-fetch (and change) cmocka.git on every build
Add "UPDATE_DISCONNECTED True" property in ExternalProject_Add() so:

- Unit tests can be rebuilt without a network connection
- The code can't change from one build to the next without the developer
  being aware.

Found by chance thanks to some network issue.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-03-20 12:07:44 +00:00
Karol Trzcinski 9a091a1320 test: Use common_mocks in each unit test
Link common_mock to each test by default.
Removed duplicated mocks in component specific folders.
Keep old mocks where implementation differs from
implementation in common_moks.c

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-01-22 14:45:29 +00:00
Karol Trzcinski 816f8919db test: Implement common mocks
In unit tests there are a lot of mocks duplication for mocks related
with memory management and panic routine.
As long as implementation doesn't have any module specific routines
and may be reused, it should be mocked in common mock space.

Marked each mock as WEAK to make it possible to overwrite this
implementation in specific test.

To use assert_false in __panic function, added dependence of
universal_mock from cmock.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-01-22 14:45:29 +00:00
Karol Trzcinski b7c92f18e6 test: Rename universal_mocks.c to common_mocks.c
Old name was quite misleading, new one better describes file content

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-01-22 14:45:29 +00:00
Janusz Jankowski 1d92e8e175 sof: use RELATIVE_FILE instead of __FILE__
Use RELATIVE_FILE because __FILE__ makes binary output
dependent on project location.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-11 12:50:30 +00:00
Tomasz Lauda 2eb5857c77 arch: xtensa: merge UP and SMP architectures
Merges xtensa UP and SMP architectures.
The amount of code which were duplicated by creating
SMP architecture as separate instance is too big
to maintain. I've decided to merge both architectures,
change explicit selection of SMP to be dependent on
configured number of cores (> 1) and add branching in
xtos based on currently used processor configuration.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-12 15:05:57 +02:00
Janusz Jankowski c6064624f6 cmake: add spdx license identifier
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski d33f8c99a1 test: rename CHECK to UNIT_TEST
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-25 14:11:47 +00:00
Janusz Jankowski f9494d9ce5 cmocka: add stdint.h includes
As written in cmocka documentation,
these headers have to be included before cmocka.h:

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
Janusz Jankowski 0cc895d609 cmake: cmocka: add toolchain file for xt
It's needed to make cmocka build correctly
for generic instead of unix system

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
Janusz Jankowski 6f88295017 cmake: fix memory mock lds for windows
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
Janusz Jankowski c47f3dbc03 cmake: fix unit tests for ninja
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
Jakub Dabek 935d13b891 memory: prework for memcpy calls change
Prepared host build and whole solution to use new memcpy_s
Fixed string.h dependencies

Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
2019-03-14 10:05:47 +00:00
Bartosz Kokoszko eae1d3a31c mailbox: deduplication of mailbox headers for cavs
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-03-01 10:26:54 +01:00
Janusz Jankowski 6c70f1a929 cmake: tests: support prebuilt Cmocka
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-31 20:22:30 +00:00
Janusz Jankowski 621e8702cc cmake: use cmocka tiny config
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-25 15:57:51 +00:00
Janusz Jankowski 97f3b70d65 cmake: update cmocka git
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-23 20:31:24 +01:00
Janusz Jankowski 9a3dff5475 cmake: add CMakeLists for unit tests
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00