mirror of
https://github.com/OpenAMP/libmetal.git
synced 2026-02-06 12:02:14 +08:00
To-be-expanded suite of tests for libmetal using system-agnostic API instead of system specific tests. Signed-off-by: Lefteris Ntafotis <lntaf@ics.forth.gr>
30 lines
551 B
C
30 lines
551 B
C
/*
|
|
* Copyright (c) 2025, CARV ICS FORTH.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
/*
|
|
* @file init.c
|
|
* @brief Cross-platform tests for init interface
|
|
*/
|
|
|
|
#include <metal/sys.h>
|
|
#include <metal/log.h>
|
|
|
|
int test_init(void)
|
|
{
|
|
struct metal_init_params metal_param = METAL_INIT_DEFAULTS;
|
|
int init_ret;
|
|
|
|
init_ret = metal_init(&metal_param);
|
|
metal_set_log_handler(metal_default_log_handler);
|
|
metal_set_log_level(METAL_LOG_ERROR);
|
|
|
|
if (init_ret)
|
|
metal_err("metal_init() returned %d\n", init_ret);
|
|
|
|
metal_finish();
|
|
return init_ret;
|
|
}
|