Port unit tests to Zephyr build system
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) The Libre Solar Project Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "unity.h"
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <device.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_POSIX
|
||||
#include "posix_board_if.h"
|
||||
#endif
|
||||
|
||||
#include "tests.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
void setUp (void) {}
|
||||
void tearDown (void) {}
|
||||
|
||||
} /* extern "C" */
|
||||
|
||||
void main()
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
err += daq_tests();
|
||||
err += bat_charger_tests();
|
||||
err += power_port_tests();
|
||||
err += half_bridge_tests();
|
||||
err += dcdc_tests();
|
||||
err += device_status_tests();
|
||||
err += load_tests();
|
||||
|
||||
#ifdef CONFIG_CUSTOM_TESTS
|
||||
err += custom_tests();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_POSIX
|
||||
posix_exit(err);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user