Port unit tests to Zephyr build system

This commit is contained in:
Martin Jäger
2021-10-05 14:59:39 +02:00
parent 456fcf86a4
commit c54d8ebe05
38 changed files with 392 additions and 426 deletions
+45
View File
@@ -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
}