1
0
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:
Mikolai Gütschow 2024-06-26 11:03:47 +02:00
parent 8f645a95a4
commit e02c953e33
No known key found for this signature in database
GPG Key ID: 943E2F37AA659AD5
3 changed files with 12 additions and 17 deletions

View File

@ -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

View 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="▢"

View File

@ -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!")