mirror of https://github.com/thesofproject/sof.git
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>
This commit is contained in:
parent
0cc895d609
commit
f9494d9ce5
|
@ -67,6 +67,10 @@ function(cmocka_test test_name)
|
|||
target_link_libraries(${test_name} PRIVATE cmocka)
|
||||
target_link_libraries(${test_name} PRIVATE sof_options)
|
||||
target_compile_definitions(${test_name} PRIVATE -DCHECK)
|
||||
|
||||
# Cmocka requires this define for stdint.h that defines uintptr
|
||||
target_compile_definitions(${test_name} PRIVATE -D_UINTPTR_T_DEFINED)
|
||||
|
||||
add_test(NAME ${test_name} COMMAND xt-run --exit_with_target_code ${test_name})
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_audio_buffer_copy_underrun(void **state)
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_audio_buffer_new(void **state)
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_audio_buffer_write_fill_10_bytes_and_write_5(void **state)
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_audio_buffer_write_10_bytes_out_of_256_and_read_back
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
#include <sof/sof.h>
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <sof/sof.h>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/alloc.h>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <stddef.h>
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/list.h>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/alloc.h>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include "selector.h"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include "volume.h"
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/preproc.h>
|
||||
|
@ -70,7 +71,7 @@ static void test_debugability_macros_declare_log_entry(void **state)
|
|||
"(6 << 24)"
|
||||
"1"
|
||||
"1"
|
||||
"53"
|
||||
"54"
|
||||
"sizeof(\"" __FILE__ "\")"
|
||||
"sizeof(\"Message\")"
|
||||
"\"" __FILE__ "\""
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_lib_lib_rstrcmp_for_a_and_a_equals_0(void **state)
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_lib_lib_rstrlen_for_empty_str_equals_0(void **state)
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <test_group_generator.h>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <sof/alloc.h>
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/preproc.h>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <sof/alloc.h>
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/preproc.h>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/preproc.h>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <sof/alloc.h>
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/preproc.h>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <sof/alloc.h>
|
||||
#include <stdarg.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <sof/preproc.h>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_list_list_init_prev_equal_to_root(void **state)
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_list_list_is_empty_when_empty_then_true(void **state)
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
struct test_list_container {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
struct test_data {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
struct test_data {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
struct test_data {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
struct test_data {
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_math_numbers_ceil_divide(void **state)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_math_numbers_find_equal_int16_for_5_123_5_10_123_500_123_n_123_equals_1_4_and_6
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_math_numbers_find_max_abs_int32_for_neg100_99_98_50_equals_100
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_math_numbers_find_min_int16_for_2_equals_2(void **state)
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_math_numbers_gcd_for_5083_and_391_equals_391(void **state)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
static void test_math_numbers_norm_int32_for_0_equals_31(void **state)
|
||||
|
|
Loading…
Reference in New Issue