tests/shell: better naming for test categories

One test was removed, because the intended test case is
already covered by check_line_exceeded
This commit is contained in:
Hendrik van Essen 2020-10-21 17:41:23 +02:00
parent aead3162ec
commit 7a775ecc4c

View File

@ -45,8 +45,9 @@ CONTROL_D = DLE+'\x04'
PROMPT = '> ' PROMPT = '> '
CMDS = ( CMDS = (
# test start
('start_test', '[TEST_START]'), ('start_test', '[TEST_START]'),
# test empty line input
('\n', PROMPT), ('\n', PROMPT),
# test simple word separation # test simple word separation
@ -54,10 +55,7 @@ CMDS = (
('echo multiple spaces between argv', '"echo""multiple""spaces""between""argv"'), ('echo multiple spaces between argv', '"echo""multiple""spaces""between""argv"'),
('echo \t tabs\t\t processed \t\tlike\t \t\tspaces', '"echo""tabs""processed""like""spaces"'), ('echo \t tabs\t\t processed \t\tlike\t \t\tspaces', '"echo""tabs""processed""like""spaces"'),
# test long line # test unknown commands
('123456789012345678901234567890123456789012345678901234567890',
'shell: command not found: '
'123456789012345678901234567890123456789012345678901234567890'),
('unknown_command', 'shell: command not found: unknown_command'), ('unknown_command', 'shell: command not found: unknown_command'),
# test leading/trailing BLANK # test leading/trailing BLANK
@ -98,8 +96,9 @@ CMDS = (
('ps', EXPECTED_PS), ('ps', EXPECTED_PS),
('help', EXPECTED_HELP), ('help', EXPECTED_HELP),
# test end # test reboot
('reboot', 'test_shell.'), ('reboot', 'test_shell.'),
('end_test', '[TEST_END]'), ('end_test', '[TEST_END]'),
) )
@ -111,6 +110,16 @@ CMDS_REGEX = {'ps'}
BOARD = os.environ['BOARD'] BOARD = os.environ['BOARD']
# there's an issue with some boards' serial that causes lost characters.
LINE_EXCEEDED_BLACKLIST = {
# There is an issue with nrf52dk when the Virtual COM port is connected
# and sending more than 64 bytes over UART. If no terminal is connected
# to the Virtual COM and interfacing directly to the nrf52832 UART pins
# the issue is not present. See issue #10639 on GitHub.
'nrf52dk',
'z1',
}
def print_error(message): def print_error(message):
FAIL = '\033[91m' FAIL = '\033[91m'
@ -142,17 +151,6 @@ def check_and_get_bufsize(child):
return bufsize return bufsize
# there's an issue with some boards' serial that causes lost characters.
LINE_EXCEEDED_BLACKLIST = {
# There is an issue with nrf52dk when the Virtual COM port is connected
# and sending more than 64 bytes over UART. If no terminal is connected
# to the Virtual COM and interfacing directly to the nrf52832 UART pins
# the issue is not present. See issue #10639 on GitHub.
'nrf52dk',
'z1',
}
def check_line_exceeded(child, longline): def check_line_exceeded(child, longline):
if BOARD in LINE_EXCEEDED_BLACKLIST: if BOARD in LINE_EXCEEDED_BLACKLIST: