Merge pull request #15438 from aabadie/pr/tests/sys_atomic_unittest
tests/unittests: split out atomic_utils unittests
This commit is contained in:
commit
4c9ee5d075
7
tests/sys_atomic_utils_unittests/Makefile
Normal file
7
tests/sys_atomic_utils_unittests/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
USEMODULE += embunit
|
||||
USEMODULE += atomic_utils
|
||||
USEMODULE += random # <-- used for input data to operate on
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup tests
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
@ -20,7 +21,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "embUnit.h"
|
||||
#include "tests-atomic_utils.h"
|
||||
|
||||
#include "atomic_utils.h"
|
||||
#include "random.h"
|
||||
@ -280,7 +280,11 @@ Test *tests_atomic_utils_tests(void)
|
||||
return (Test *)&atomic_utils_tests;
|
||||
}
|
||||
|
||||
void tests_atomic_utils(void)
|
||||
int main(void)
|
||||
{
|
||||
TESTS_START();
|
||||
TESTS_RUN(tests_atomic_utils_tests());
|
||||
TESTS_END();
|
||||
|
||||
return 0;
|
||||
}
|
||||
14
tests/sys_atomic_utils_unittests/tests/01-run.py
Executable file
14
tests/sys_atomic_utils_unittests/tests/01-run.py
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (C) 2020 Inria
|
||||
#
|
||||
# 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.
|
||||
|
||||
import sys
|
||||
|
||||
from testrunner import run_check_unittests
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(run_check_unittests())
|
||||
@ -1 +0,0 @@
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
@ -1,2 +0,0 @@
|
||||
USEMODULE += atomic_utils
|
||||
USEMODULE += random # <-- used for input data to operate on
|
||||
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup unittests
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Unittests for the atomic util module
|
||||
*
|
||||
* @author Marian Buschsieweke <marian.buschsieweke@ovgu.de>
|
||||
*/
|
||||
|
||||
#ifndef TESTS_ATOMIC_UTILS_H
|
||||
#define TESTS_ATOMIC_UTILS_H
|
||||
|
||||
#include "embUnit.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief The entry point of this test suite.
|
||||
*/
|
||||
void tests_atomic_util(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TESTS_ATOMIC_UTILS_H */
|
||||
/** @} */
|
||||
Loading…
x
Reference in New Issue
Block a user