blob: 0d5113f00f60c32931df8ac0951e715d79cd0f6e [file] [log] [blame]
/* Copyright (c) 2023 Codecoup
* SPDX-License-Identifier: Apache-2.0
*/
#include <bs_tracing.h>
#include <bstests.h>
#define DECLARE_FLAG(flag) extern atomic_t flag
#define DEFINE_FLAG(flag) atomic_t flag = (atomic_t) false
#define SET_FLAG(flag) (void)atomic_set(&flag, (atomic_t) true)
#define UNSET_FLAG(flag) (void)atomic_set(&flag, (atomic_t) false)
#define WAIT_FOR_FLAG(flag) \
while (!(bool)atomic_get(&flag)) { \
(void)k_sleep(K_MSEC(1)); \
}
#define PASS(...) \
do { \
bst_result = Passed; \
bs_trace_info_time(1, __VA_ARGS__); \
} while (0)
#define BS_SECONDS(dur_sec) ((bs_time_t)dur_sec * 1000000)
#define SIMULATED_TEST_TIMEOUT BS_SECONDS(60)
extern enum bst_result_t bst_result;
void test_init(void);
void test_tick(bs_time_t HW_device_time);