Closed salil0907 closed 3 years ago
Could you use -vv
flag to get more verbose traces? Probably something goes wrong when device tries to start application. You could try also application manually using some serial terminal application. Does it respond for example if you send help
command?
after giving -vv flag and yes it responded to help command
14:05:33.459 | D1 <-- DutThread: ================ THREAD STATS =============== 14:05:33.474 | D1 <-- DutThread: ID: 0x200015cc 14:05:33.490 | D1 <-- DutThread: Name: main_thread 14:05:33.506 | D1 <-- DutThread: State: 2 14:05:33.516 | D1 <-- DutThread: Priority: 24 14:05:33.526 | D1 <-- DutThread: Stack Size: 4096 14:05:33.530 | D1 MainThread: CMD timeout: set --retcode true 14:05:33.530 | D1 <-> MainThread: CMD set --retcode false, timeout=0, time=1545640533 14:05:33.546 | D1 <-- DutThread: Stack Space: 3152 14:05:33.546 | <-> DutThread: End DUT communication 14:05:33.546 | D1 <-> MainThread: Close port 'COM55' 14:05:33.562 | TC MainThread: Close node threads 14:05:33.562 | TC MainThread: Skip Sniffing NW data 14:05:33.562 | TC MainThread: Stop external services if any 14:05:33.562 | TC MainThread: Test Case fails because of: COM55 CMD timeout: set --retcode true 14:05:33.562 | TC MainThread: retcode: 1000, preliminaryVerdict: None 14:05:33.562 | TC MainThread: Test 'test_cmdline' FAIL, reason: COM55 CMD timeout: set --retcode true 14:05:33.562 Test bench returned return code 1000 detect GIT info by folder: 'C:\Users\ssir\Downloads\mbed-os-example-blinky-master\mbed-os\TEST_APPS\testcases\example\test_cmdline.py' all git_info: {'commitid': '2fd0c5cfbd83fce62da6308f9d64c0ab64e1f0d6', 'scm': 'unknown', 'git_path': 'TEST_APPS/testcases/example/test_cmdline.py', 'scm_path': 'unknown', 'scm_link': '', 'branch': 'mbed-os-5.10', 'url': 'https://github.com/ARMmbed/mbed-os', 'scm_group': 'unknown', 'dirty': True} 14:05:34.859 | TC MainThread: {'scm': 'unknown', 'commitId': '', 'branch': 'mbed-os-5.10', 'url': 'https://github.com/ARMmbed/mbed-os', 'scm_group': 'unknown', 'commitid': '2fd0c5cfbd83fce62da6308f9d64c0ab64e1f0d6', 'git_path': 'TEST_APPS/testcases/example/test_cmdline.py', 'scm_path': 'unknown', 'dirty': True, 'scm_link': ''} 14:05:34.953 Duration: 153.136 seconds 14:05:34.953 Test case test_cmdline failed, No retries left.
+--------------+--------------+---------------------------------------+-------------+-----------+----------+ | Testcase | Verdict | Fail Reason | Skip Reason | platforms | duration | +--------------+--------------+---------------------------------------+-------------+-----------+----------+ | test_cmdline | inconclusive | COM55 CMD timeout: set --retcode true | | | 153.136 | +--------------+--------------+---------------------------------------+-------------+-----------+----------+ +---------------+----------------+ | Summary | | +---------------+----------------+ | Final Verdict | INCONCLUSIVE | | count | 1 | | passrate | 0.00 % | | inconclusive | 1 | | Duration | 0:02:33.136000 | +---------------+----------------+ 14:05:35.032 | RSP MainThread: Cleaning up ResourceProvider. 14:05:35.032 | RSP MainThread: Cleaning up allocator. 14:05:35.032 Cleanup done.
after help command
C:\Users\ssir\Downloads\mbed-os-example-blinky-master\mbed-os>icetea --help usage: icetea [-h] [--list | --listsuites | --tc TC | --suite SUITE | --version] [--status STATUS] [--group GROUP] [--testtype TESTTYPE] [--subtype SUBTYPE] [--component COMPONENT] [--feature FEATURE] [--platform_filter PLATFORM_FILTER] [--jobId JOBID] [--gitUrl GITURL] [--branch BRANCH] [--commitId COMMITID] [--buildDate BUILDDATE] [--toolchain TOOLCHAIN] [--buildUrl BUILDURL] [--campaign CAMPAIGN] [--tcdir TCDIR] [--suitedir SUITEDIR] [--cfg_file CFG_FILE] [--plugin_path PLUGIN_PATH] [--allocator ALLOCATOR] [--allocator_cfg ALLOCATOR_CFG] [--env_cfg ENV_CFG] [--repeat REPEAT] [--stop_on_failure] [--clean] [--connector CONNECTOR] [--failure_return_value] [--color] [--check_version] [--ignore_invalid_params] [--parallel_flash] [--disable_log_truncate] [--cm CM] [--json] [--export SUITE_FILE_NAME] [--log LOG] [-s] [-v] [-w] [--with_logs] [--reset [RESET]] [--iface IFACE] [--bin BIN] [--tc_cfg TC_CFG] [--type {hardware,process}] [--platform_name PLATFORM_NAME] [--putty] [--skip_setup] [--skip_case] [--skip_teardown] [--valgrind] [--valgrind_tool {memcheck,callgrind,massif}] [--valgrind_extra_params VALGRIND_EXTRA_PARAMS] [--valgrind_text | --valgrind_console] [--valgrind_track_origins] [--use_sniffer] [--my_duts MY_DUTS] [--pause_ext] [--gdb GDB | --gdbs GDBS | --vgdb VGDB] [--gdbs-port GDBS_PORT] [--pre-cmds PRE_CMDS] [--post-cmds POST_CMDS] [--baudrate BAUDRATE] [--serial_timeout SERIAL_TIMEOUT] [--serial_xonxoff] [--serial_rtscts] [--serial_ch_size SERIAL_CH_SIZE] [--serial_ch_delay CH_MODE_CH_DELAY] [--nobuf NOBUF] [--kill_putty] [--forceflash | --forceflash_once] [--interface INTERFACE]
Test Framework for Command line interface
optional arguments:
-h, --help show this help message and exit
--list List of available testcases(nothing else)
--listsuites List of available suites
--tc TC execute testcase. Give test index, name, list of
indices/names, or all to execute all testcases
--suite SUITE Run tests from suite json file
Filter arguments: Arguments used for filtering tc:s
--status STATUS Run all testcases with status
Can you describe how you started icetea when test fails? Whole command with prameters you uses. It looks like device application is not running/starting, or perhaps it starts slowly. We need little more details what steps you actually did to be able to help more..
First i compiled blinky project using this command mbed compile --target DISCO_L475VG_IOT01A --toolchain GCC_ARM
than flashed the bin file onto the board then After that i tried to run test_cmdline using this command
icetea --tc test_cmdline --tcdir C:\Users\ssir\Downloads\mbed-os-example-blinky-master\mbed-os\TEST_APPS\testcases\example --platform_name DISCO_L475VG_IOT01A
Blinky application is not compatible for this test. Probable that’s the reason why it didn’t work. Could you follow these instructions to compile simple cli-application and use binary it produces: https://github.com/ARMmbed/icetea/tree/master/examples/cliapp/mbed-os5
after build success you can run icetea test like this:
icetea --tc test_cmdline --tcdir C:\Users\ssir\Downloads\mbed-os-example-blinky-master\mbed-os\TEST_APPS\testcases\example --platform_name DISCO_L475VG_IOT01A --bin <path-to-bin-file>
note:
mbed compile --target DISCO_L475VG_IOT01A --toolchain GCC_ARM
<path-to-bin-file>
with actul filename mbed compile
createsMore details about icetea usage can be found from here: https://os.mbed.com/docs/v5.10/tools/icetea-testing-applications.html
Which application is compatible test_cmdline testcase on icetea?
Hi I tried with your application i got the same error
C:\Users\ssir\Downloads\armcpp>icetea --tc test_cmdline --tcdir C:\Users\ssir\Downloads\mbed-os-example-blinky-master\mbed-os\TEST_APPS\testcases\example --platform_name DISCO_L475VG_IOT01A --bin C:\Users\ssir\Downloads\armcpp\BUILD\DISCO_L475VG_IOT01A\GCC_ARM\armcpp.bin 15:54:58.171 Using Icetea version 1.1.0 15:54:58.171 Generating suite from command line. 15:54:58.171 Importing testcases for filtering 15:54:58.184 Filtering testcases 15:54:58.184 Suite creation complete. 15:54:58.194 Test cases prepared. 15:54:58.194 Starting suite. 15:54:58.194 Starting repeat 1 of 1 15:54:58.196 Iteration 1 of 1 15:54:58.201 15:54:58.203 START TEST CASE EXECUTION: 'test_cmdline' 15:54:58.203 15:54:58.206 | TC MainThread: Start Test case 'test_cmdline' 15:54:58.207 | TC MainThread: ====setUpTestBench==== 15:54:58.233 | TC MainThread: ====setUpTestBench==== 15:54:58.233 | TC MainThread: --------------------- 15:54:58.234 | TC MainThread: Initialize DUT's connections 15:54:58.236 | RSP MainThread: Allocating 1 duts. 15:54:58.338 | LAL MainThread: Allocated device 07640221184E6161270AF738 15:54:58.339 | RSP MainThread: Allocation successful 15:54:58.348 | D1 Thread-3: Flashing dev: 07640221184E6161270AF738 15:54:58.440 | FLS Thread-3: sendBreak to device to reboot 15:54:58.693 | FLS Thread-3: reset completed 15:55:02.433 | FLS Thread-3: sendBreak to device to reboot 15:55:02.918 | FLS Thread-3: reset completed 15:55:03.624 | FLS Thread-3: 07640221184E6161270AF738 flash success 15:55:03.625 | TC Thread-3: flash ready 15:55:03.628 | TC Thread-3: Use board DISCO_L475VG_IOT01A as "D1" (id: 07640221184E6161270AF738) 15:55:03.658 | D1 MainThread: DutSerial COM55
+----------+--------------+ | COM port | Location | +----------+--------------+ | COM55 | X = 0, Y = 0 | +----------+--------------+ 15:55:03.658 | D1 <-> MainThread: Open Connection for 'D1' using 'COM55' baudrate: 115200 15:55:03.674 | D1 <-> MainThread: Use normal serial write mode 15:55:03.690 | TC MainThread: Waiting for dut 1 to initialize. 15:55:03.690 | D1 --> DutThread: set --retcode true 15:55:05.046 | D1 <-- DutThread: 15:55:53.963 | D1 MainThread: CMD timeout: set --retcode true 15:55:53.963 | TC MainThread: ====tearDownTestBench==== 15:56:45.279 | D1 MainThread: CMD timeout: set --retcode true 15:57:36.517 | D1 MainThread: CMD timeout: set --retcode true 15:57:37.793 | TC MainThread: Test Case fails because of: COM55 CMD timeout: set --retcode true 15:57:37.793 | TC MainThread: Test 'test_cmdline' FAIL, reason: COM55 CMD timeout: set --retcode true 15:57:39.401 Test case test_cmdline failed, No retries left.
+--------------+--------------+---------------------------------------+-------------+-----------+----------+ | Testcase | Verdict | Fail Reason | Skip Reason | platforms | duration | +--------------+--------------+---------------------------------------+-------------+-----------+----------+ | test_cmdline | inconclusive | COM55 CMD timeout: set --retcode true | | | 159.59 | +--------------+--------------+---------------------------------------+-------------+-----------+----------+ +---------------+----------------+ | Summary | | +---------------+----------------+ | Final Verdict | INCONCLUSIVE | | count | 1 | | passrate | 0.00 % | | inconclusive | 1 | | Duration | 0:02:39.590000 | +---------------+----------------+ 15:57:39.447 Cleanup done.
what kind of device app is this: C:\Users\ssir\Downloads\armcpp\BUILD\DISCO_L475VG_IOT01A\GCC_ARM\armcpp.bin ?
Is it something similar with this: https://github.com/ARMmbed/mbed-os/blob/master/TEST_APPS/device/exampleapp/main.cpp ?
Most probably mbed application you tried does not provide cli -interface or uses custom baudrate.
I just updated the source file of your pointed link with my app https://github.com/ARMmbed/icetea/tree/master/examples/cliapp/mbed-os5
yes it is similar to that.
Could you try to flash cliapp you build and run mbed sterm —baudrate 115200 —echo off
it opens serial port foe you and you can try to write commands to app, does it respond if you write help
and press enter there for example?
More details for mbed sterm is available here:
https://github.com/ARMmbed/mbed-cli#serial-terminal
actually looks a bit that application starts slowly and needs special syncronization before sending commands to it. Unfortunately simplest solution is not yet available that will allow to do sync using one extra cli parameter (—sync_start
). @jonikula do we have another sync approaches yet in icetea?
Yes, the cli initialization wait feature should be available. I'll check. There is a ticket for adding the sync_start feature as well.
Yes, you can find documentation on the cli_ready_trigger in the docs, check tc_api.md or rst. There's also an example in examples/testcase_example_usage/sample_cli_init.py.
This repository is no longer maintained and it is deprecated. As result, we are closing all issues/pull request.
Description
When trying to run test_cmdline I am getting this error 12:09:43.006 | TC MainThread: Test Case fails because of: COM55 CMD timeout: set --retcode true 12:09:43.006 | TC MainThread: Test 'test_something' FAIL, reason: COM55 CMD timeout: set --retcode true 12:09:47.505 Test case test_something failed, No retries left.
+----------------+--------------+---------------------------------------+-------------+-----------+----------+ | Testcase | Verdict | Fail Reason | Skip Reason | platforms | duration | +----------------+--------------+---------------------------------------+-------------+-----------+----------+ | test_something | inconclusive | COM55 CMD timeout: set --retcode true | | | 153.316 | +----------------+--------------+---------------------------------------+-------------+-----------+----------+ +---------------+----------------+ | Summary | | +---------------+----------------+ | Final Verdict | INCONCLUSIVE | | count | 1 | | passrate | 0.00 % | | inconclusive | 1 | | Duration | 0:02:33.316000 | +---------------+----------------+ 12:09:47.551 Cleanup done.