chore: Update zephyr ztest include paths and compiler flags (#660)
This commit is contained in:
@@ -29,6 +29,8 @@ if (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||
add_compile_options(-Wno-unused-variable)
|
||||
add_compile_options(-Wno-unused-function)
|
||||
add_compile_options(-Wno-unused-parameter)
|
||||
# FIXME: zephyr ztest has a strnlen hack in platform.h which triggers this warning
|
||||
add_compile_options(-Wno-redundant-decls)
|
||||
add_link_options(-fprofile-arcs -ftest-coverage)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#ifndef ZEPHYR_TESTSUITE_ZTEST_ASSERT_H_
|
||||
#define ZEPHYR_TESTSUITE_ZTEST_ASSERT_H_
|
||||
|
||||
#include <zephyr/ztest.h>
|
||||
#include <zephyr/ztest_test.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -24,7 +24,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
const char *ztest_relative_filename(const char *file);
|
||||
void ztest_test_fail(void);
|
||||
#if CONFIG_ZTEST_ASSERT_VERBOSE == 0
|
||||
|
||||
static inline bool z_zassert_(bool cond, const char *file, int line)
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#ifndef ZEPHYR_TESTSUITE_ZTEST_TEST_H_
|
||||
#define ZEPHYR_TESTSUITE_ZTEST_TEST_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if 0 /* __ZEPHYR__ */
|
||||
#include <app_memory/app_memdomain.h>
|
||||
#endif /* __ZEPHYR__ */
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf twister-out.unit_testing
|
||||
../zephyr/scripts/twister -O twister-out.unit_testing -p unit_testing -T zephyr/tests
|
||||
#for file in CMakeFiles CMakeCache.txt cmake_install.cmake Makefile
|
||||
#do
|
||||
# find twister-out.unit_testing -name $file -exec rm -rf {} \; || true
|
||||
#done
|
||||
Reference in New Issue
Block a user