mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
[thci] bug fixes and clean up the code style (#3817)
This commit squashes the approved updates, mainly include
1) bug fix or enhancement
- make pollperiod take effect
- fix the issue in finding the address of the specific address
(case-sensitive issue introduced in #3639)
- make `__sendCommand` more robust for possible extra serial output
3) Update along with master code and other minor updates
- the command used to find specific address (#3856)
- the IP6Prefix string len (from 20 to 19)
- correct typos
2) Code Style
- use single quotes for code
- update to use `print ()` and format `%`
- format via with `black` tool locally
`python3 -m black -l 79 -S tools/harness-thci -t py27`
- add travis python check example for THCI with `flake8` tool
notes: require OT code with #3856 (get specific address) and #3862 (`joiner id`)
This commit is contained in:
@@ -83,6 +83,9 @@ matrix:
|
||||
- env: BUILD_TARGET="posix-mtd" VERBOSE=1 VIRTUAL_TIME=1
|
||||
os: linux
|
||||
compiler: gcc
|
||||
- env: BUILD_TARGET="py-pretty-check"
|
||||
os: linux
|
||||
python: "2.7"
|
||||
- env: BUILD_TARGET="pretty-check"
|
||||
os: linux
|
||||
addons:
|
||||
|
||||
@@ -63,6 +63,11 @@ cd /tmp || die
|
||||
clang-format --version || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != py-pretty-check ] || {
|
||||
pip install --upgrade pip || die
|
||||
python -m pip install flake8 || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != posix-app-pty ] || {
|
||||
sudo apt-get install socat expect || die
|
||||
JOBS=$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
@@ -42,6 +42,10 @@ python --version || die
|
||||
make pretty-check || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != py-pretty-check ] || {
|
||||
flake8 --config=script/pystyle.cfg tools/harness-thci/ || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != scan-build ] || {
|
||||
./bootstrap || die
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[flake8]
|
||||
# it's not a bug that we aren't using all of hacking, ignore:
|
||||
# E203: White space before ':' (see #python#black#315).
|
||||
# W503: Line break occurred before a binary operator (see #python#black#README.md).
|
||||
ignore = E203, W503
|
||||
|
||||
# relax the length limitation for now.
|
||||
max-line-length = 119
|
||||
max-doc-length = 119
|
||||
|
||||
# Print the source code generating the error/warning in question.
|
||||
show_source = True
|
||||
show-source = True
|
||||
|
||||
# print the total number of errors.
|
||||
count = True
|
||||
+896
-628
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user