mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Merge pull request #7231 from mikeller/optimise_timer_tests
Made timer tests respect 'USE_TIMER_MGMT'.
This commit is contained in:
commit
c9788f1831
3 changed files with 6 additions and 2 deletions
|
@ -21,6 +21,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "drivers/io.h"
|
#include "drivers/io.h"
|
||||||
|
#include "drivers/io_types.h"
|
||||||
|
#include "drivers/resource.h"
|
||||||
|
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -283,9 +283,8 @@ telemetry_ibus_unittest_SRC := \
|
||||||
|
|
||||||
timer_definition_unittest_EXPAND := yes
|
timer_definition_unittest_EXPAND := yes
|
||||||
|
|
||||||
# NERO and STM32F7X2 are universal targets with dynamic timer management.
|
|
||||||
# SITL is a simulator with empty timerHardware and many hearders in target.c.
|
# SITL is a simulator with empty timerHardware and many hearders in target.c.
|
||||||
timer_definition_unittest_BLACKLIST := NERO SITL STM32F7X2
|
timer_definition_unittest_BLACKLIST := SITL
|
||||||
|
|
||||||
timer_definition_unittest_SRC = \
|
timer_definition_unittest_SRC = \
|
||||||
$(TARGET_DIR)/$(call get_base_target,$1)/target.c
|
$(TARGET_DIR)/$(call get_base_target,$1)/target.c
|
||||||
|
|
|
@ -39,6 +39,7 @@ TEST(TimerDefinitionTest, Test_counterMismatch) {
|
||||||
<< " array element appears to be " << &t - timerHardware - 1 << '.';
|
<< " array element appears to be " << &t - timerHardware - 1 << '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(USE_TIMER_MGMT)
|
||||||
TEST(TimerDefinitionTest, Test_duplicatePin) {
|
TEST(TimerDefinitionTest, Test_duplicatePin) {
|
||||||
std::set<TestPinEnum> usedPins;
|
std::set<TestPinEnum> usedPins;
|
||||||
for (const timerHardware_t &t : timerHardware)
|
for (const timerHardware_t &t : timerHardware)
|
||||||
|
@ -87,6 +88,7 @@ TEST(TimerDefinitionTest, Test_usedTimers)
|
||||||
<< "USED_TIMERS definition based on timerHardware:" << std::endl
|
<< "USED_TIMERS definition based on timerHardware:" << std::endl
|
||||||
<< writeUsedTimers(expected) << std::endl;
|
<< writeUsedTimers(expected) << std::endl;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// STUBS
|
// STUBS
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue