1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/unittests/main.c
Francisco Molina 416c048737 tests: add test_utils_interactive_sync when possible
- Define test_utils_interactive_sync as DEFAULT_MODULE in Makefile.tests_common
- For tests disabling autoinit, add test_utils_interactive_sync to main
- Add DISABLE_MODULE += test_utils_interactive_sync for tests requiring
  sudo,  `tests/shell`, `tests/minimal` and `tests/stdin`
- Add shell_commands to tests/periph_wdt and tests/struct_tm_utility to
  pull `r` and `s` commands
- Remove includes and usage in `tests/main.c` for tests that where
  already using test_utils_interactive_sync
2019-11-27 15:07:42 +01:00

45 lines
976 B
C

/*
* Copyright (C) 2014 Martine Lenders <mlenders@inf.fu-berlin.de>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#include "map.h"
#include "embUnit.h"
#include "xtimer.h"
#include "test_utils/interactive_sync.h"
#define UNCURRY(FUN, ARGS) FUN(ARGS)
#define RUN_TEST_SUITES(...) MAP(RUN_TEST_SUITE, __VA_ARGS__)
#define RUN_TEST_SUITE(TEST_SUITE) \
do { \
extern void tests_##TEST_SUITE(void); \
tests_##TEST_SUITE(); \
} while (0);
int main(void)
{
test_utils_interactive_sync();
#ifdef MODULE_XTIMER
/* auto_init is disabled, but some modules depends on this module being initialized */
xtimer_init();
#endif
#ifdef OUTPUT
TextUIRunner_setOutputter(OUTPUTTER);
#endif
TESTS_START();
#ifndef NO_TEST_SUITES
UNCURRY(RUN_TEST_SUITES, TEST_SUITES)
#endif
TESTS_END();
return 0;
}