twister: tests: add "no platform" test case for --device-testing

Add a test case for --device-testing without a platform specified.
Also adjust the error message to match current code.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
Luca Burelli 2024-03-21 14:58:06 +01:00 committed by Alberto Escolar
commit 5800c53b3e

View file

@ -55,6 +55,19 @@ TESTDATA_1 = [
['--enable-valgrind'],
'valgrind enabled but valgrind executable not found'
),
(
None,
None,
None,
[
'--device-testing',
'--device-serial',
'dummy',
],
'When --device-testing is used with --device-serial' \
' or --device-serial-pty, exactly one platform must' \
' be specified'
),
(
None,
None,
@ -69,7 +82,8 @@ TESTDATA_1 = [
'dummy_platform2'
],
'When --device-testing is used with --device-serial' \
' or --device-serial-pty, only one platform is allowed'
' or --device-serial-pty, exactly one platform must' \
' be specified'
),
# Note the underscore.
(
@ -124,6 +138,7 @@ TESTDATA_1 = [
'west runner without west flash',
'west-flash without device-testing',
'valgrind without executable',
'device serial without platform',
'device serial with multiple platforms',
'device flash with test without device testing',
'shuffle-tests without subset',