mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/sys/progress_bar: move configuration to app.config
Providing the configuration via Makefile variables if Kconfig is supported by the module may involve some non-determinism in the environment variable that is finally exposed to the python tests. This commit moves the configuration from Makefile to app.config.
This commit is contained in:
parent
8f645a95a4
commit
e02c953e33
@ -3,24 +3,10 @@ include ../Makefile.sys_common
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += progress_bar
|
||||
|
||||
CONFIG_PROGRESS_BAR_LENGTH ?= 50
|
||||
CONFIG_PROGRESS_BAR_FULL_CHARACTER ?= "█"
|
||||
CONFIG_PROGRESS_BAR_EMPTY_CHARACTER ?= " "
|
||||
|
||||
# Other nice progress bar characters:
|
||||
#CONFIG_PROGRESS_BAR_FULL_CHARACTER ?= "◉"
|
||||
#CONFIG_PROGRESS_BAR_EMPTY_CHARACTER ?= "◯"
|
||||
#CONFIG_PROGRESS_BAR_FULL_CHARACTER ?= "▣"
|
||||
#CONFIG_PROGRESS_BAR_EMPTY_CHARACTER ?= "▢"
|
||||
|
||||
CFLAGS += -DCONFIG_PROGRESS_BAR_FULL_CHARACTER=\"$(CONFIG_PROGRESS_BAR_FULL_CHARACTER)\"
|
||||
CFLAGS += -DCONFIG_PROGRESS_BAR_EMPTY_CHARACTER=\"$(CONFIG_PROGRESS_BAR_EMPTY_CHARACTER)\"
|
||||
CFLAGS += -DCONFIG_PROGRESS_BAR_LENGTH=$(CONFIG_PROGRESS_BAR_LENGTH)
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
# Make custom progress bar characters available in Python test script via
|
||||
# environment variables
|
||||
# Make custom progress bar configuration from app.config
|
||||
# available in Python test script via environment variables
|
||||
export CONFIG_PROGRESS_BAR_FULL_CHARACTER
|
||||
export CONFIG_PROGRESS_BAR_EMPTY_CHARACTER
|
||||
export CONFIG_PROGRESS_BAR_LENGTH
|
||||
|
9
tests/sys/progress_bar/app.config
Normal file
9
tests/sys/progress_bar/app.config
Normal file
@ -0,0 +1,9 @@
|
||||
CONFIG_PROGRESS_BAR_LENGTH=50
|
||||
CONFIG_PROGRESS_BAR_FULL_CHARACTER="█"
|
||||
CONFIG_PROGRESS_BAR_EMPTY_CHARACTER=" "
|
||||
|
||||
# Other nice progress bar characters:
|
||||
#CONFIG_PROGRESS_BAR_FULL_CHARACTER="◉"
|
||||
#CONFIG_PROGRESS_BAR_EMPTY_CHARACTER="◯"
|
||||
#CONFIG_PROGRESS_BAR_FULL_CHARACTER="▣"
|
||||
#CONFIG_PROGRESS_BAR_EMPTY_CHARACTER="▢"
|
@ -25,7 +25,7 @@ def testfunc(child):
|
||||
check_str = 'Progress bar 0 |{}| {:3}%'.format(
|
||||
progress_str, i)
|
||||
# todo: temporary printout for debugging this flaky test
|
||||
print("EXPECTS:", check_str)
|
||||
print("EXPECTS:", check_str, "LENGTH:", LENGTH, "ratio:", ratio)
|
||||
child.expect_exact(check_str)
|
||||
child.expect_exact("Done!")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user