zephyr/scripts
Ming Shao 2cea5850e2 twisterlib: re-add the logic to drain the serial leftover
This logic was added before but seems to be missed during the
twister refactoring.

Some tests can cause serial leftover logs buffered somewhere.
Such leftover can interfere with the next test case because the
serial log monitoring thread is started before a board is flashed.
And the monitoring thread can be fooled by such leftover logs and
make incorrect judgement of the test result.

A simple ser.flush() is not enough to eliminate such leftovers.
So add explicit readline() to drain such logs which ensures a clean
serial context for the case that follows.

An example from reel board captured with this patch:

leftover log of previous test: b'.287 seconds\r\n'
leftover log of previous test: b' - SKIP - [...test_coredump_backend]...
leftover log of previous test: b'\r\n'
leftover log of previous test: b'------ TESTSUITE SUMMARY END ------\r\n'
leftover log of previous test: b'\r\n'
leftover log of previous test: b'=====================================...
leftover log of previous test: b'RunID: 4e93757ad...53dcab9f0f5c6\r\n'
leftover log of previous test: b'PROJECT EXECUTION SUCCESSFUL\r\n

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-09-22 15:15:55 -05:00
..
build includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
checkpatch scripts: checkpatch: add Atmel Pwm typedef 2022-07-12 17:51:23 +02:00
ci scripts: ci: test_plan: Specify ZEPHYR_BASE for list_boards 2022-09-08 18:17:10 +09:00
coccinelle
coredump debug: coredump: add xtensa intel adsp, support toolchains 2022-06-23 15:44:45 -04:00
dts dtlib: error out on duplicate node names 2022-09-21 07:55:40 -07:00
footprint footprint: Add bt_hci_rpmsg with ISO for the nRF5340 netcore 2022-09-02 11:08:31 +00:00
gitlint scripts: gitlint: block Change-Id tags in commit message 2022-04-20 20:59:33 -04:00
kconfig scripts: kconfig: update size functions to convert bits to bytes 2022-09-21 15:22:36 +02:00
logging/dictionary scripts: dictionary: Initialise Colorama during module load 2022-05-24 09:00:16 -07:00
net
pylib/twister twisterlib: re-add the logic to drain the serial leftover 2022-09-22 15:15:55 -05:00
release scripts: release: list_backports: use older python dict merge method 2022-07-19 00:20:13 +09:00
schemas/twister twister: add support for platform_type filter 2022-05-14 14:49:59 -04:00
support
tests twister: fix bug retrieving subtests 2022-08-12 17:39:35 +02:00
tracing scripts: tracing: Initialise Colorama during module load 2022-05-24 09:00:16 -07:00
utils scripts: migrate_includes: migrate zephyr.h to kernel.h 2022-09-05 16:31:47 +02:00
west_commands west: jlink: adding optional flash loader flag required for some boards 2022-09-21 09:33:42 -05:00
.gitignore
checkpatch.pl scripts: checkpatch: allow leading spaces in multi-lines macros 2022-06-17 10:18:37 +02:00
checkstack.pl
coccicheck
dump_bugs_pickle.py scripts: add dump_bugs_pickle.py 2022-06-03 19:19:25 -05:00
gen_gcov_files.py
get_maintainer.py scripts: get_maintainer: Use SafeLaoder for yaml 2022-04-13 13:48:18 -07:00
github_helpers.py scripts: add github_helpers.py 2022-05-24 18:48:03 +02:00
list_boards.py scripts: remove ZEPHYR_BASE as default root for board listing 2022-08-18 14:29:14 +02:00
make_bugs_pickle.py scripts: add make_bugs_pickle.py 2022-05-24 18:48:03 +02:00
requirements-base.txt requirements: bump pyelftools to >=0.27 2022-06-10 09:46:31 +02:00
requirements-build-test.txt
requirements-compliance.txt scripts: Upgrade to junitparser v2+ 2022-08-03 14:04:36 -04:00
requirements-doc.txt doc: update requirements 2022-08-12 11:04:26 +02:00
requirements-extras.txt scripts: requirements-extras: Request imgtool 1.9 for write-block-size > 8 2022-09-01 10:28:33 +02:00
requirements-run-test.txt soc: xtensa: tools: remove dependency of netifaces package 2022-08-16 22:51:53 -07:00
requirements.txt
series-push-hook.sh
set_assignees.py scripts: set_assignee: handle exceptions 2022-07-18 21:41:22 -04:00
spelling.txt
tags.sh
twister twister: Set stdin explicitly on stty calls 2022-08-26 12:51:28 +02:00
valgrind.supp
west-commands.yml west: Add completion support for zsh 2022-09-06 08:43:15 -07:00
zephyr_module.py scripts: modules: Mark the build as tainted if blobs present 2022-08-29 15:57:59 +02:00