2016-08-22 14:51:46 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
2017-01-18 17:01:01 -08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-08-22 14:51:46 +03:00
|
|
|
*/
|
|
|
|
|
2016-08-26 13:26:10 +03:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* @brief Zephyr testing suite
|
|
|
|
*/
|
|
|
|
|
2018-05-07 14:55:36 -05:00
|
|
|
/**
|
|
|
|
* @brief Zephyr Tests
|
|
|
|
* @defgroup all_tests Zephyr Tests
|
|
|
|
* @{
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2016-08-22 14:51:46 +03:00
|
|
|
#ifndef __ZTEST_H__
|
|
|
|
#define __ZTEST_H__
|
|
|
|
|
2018-03-19 18:38:53 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-08-26 13:26:10 +03:00
|
|
|
/**
|
|
|
|
* @defgroup ztest Zephyr testing suite
|
|
|
|
*/
|
|
|
|
|
2017-04-07 15:59:56 +03:00
|
|
|
#if !defined(CONFIG_ZTEST) && !defined(ZTEST_UNITTEST)
|
|
|
|
#error "You need to add CONFIG_ZTEST to your config file."
|
|
|
|
#endif
|
|
|
|
|
2016-08-22 14:51:46 +03:00
|
|
|
#ifndef KERNEL
|
|
|
|
#define CONFIG_STDOUT_CONSOLE 1
|
|
|
|
#define CONFIG_ZTEST_ASSERT_VERBOSE 1
|
|
|
|
#define CONFIG_ZTEST_MOCKING
|
2016-11-07 09:33:06 -08:00
|
|
|
#define CONFIG_NUM_COOP_PRIORITIES 16
|
2017-01-15 10:02:27 -05:00
|
|
|
#define CONFIG_COOP_ENABLED 1
|
|
|
|
#define CONFIG_PREEMPT_ENABLED 1
|
2018-09-19 10:52:07 -07:00
|
|
|
#define CONFIG_SYS_CLOCK_TICKS_PER_SEC 100
|
|
|
|
#define CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 10000000
|
2016-08-22 14:51:46 +03:00
|
|
|
/* FIXME: Properly integrate with Zephyr's arch specific code */
|
|
|
|
#define CONFIG_X86 1
|
2019-02-24 13:17:31 -08:00
|
|
|
#define CONFIG_PRINTK 1
|
2019-07-11 14:18:28 -07:00
|
|
|
struct esf;
|
|
|
|
typedef struct esf NANO_ESF;
|
2019-02-24 13:17:31 -08:00
|
|
|
#endif
|
2016-08-22 14:51:46 +03:00
|
|
|
|
2019-06-26 10:33:49 -04:00
|
|
|
#include <sys/printk.h>
|
2016-08-22 14:51:46 +03:00
|
|
|
#define PRINT printk
|
2019-02-24 13:17:31 -08:00
|
|
|
|
|
|
|
#include <zephyr.h>
|
|
|
|
|
2016-08-22 14:51:46 +03:00
|
|
|
|
|
|
|
#include <ztest_assert.h>
|
|
|
|
#include <ztest_mock.h>
|
|
|
|
#include <ztest_test.h>
|
|
|
|
#include <tc_util.h>
|
|
|
|
|
2018-03-19 18:38:53 +01:00
|
|
|
void test_main(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2016-08-22 14:51:46 +03:00
|
|
|
#endif /* __ZTEST_H__ */
|