Commit Graph

216 Commits

Author SHA1 Message Date
Simon Lin d7343c877b [style] change python yapf column_limit to 119 (#5339) 2020-08-06 21:40:24 -07:00
Simon Lin fd66f2399f [thci] add OpenThread_BR THCI for OTBR CLI (#5085) 2020-07-23 16:34:19 -07:00
Jing Ma 75e21adcec [harness-automation] add a parser tool for TopologyConfig file (#4975)
- parse TopologyConfig file in Thread Certification Test Harness
- list multi-vendor device numbers by case
- list needed vendor device numbers for the whole certification testbed
2020-06-08 10:15:59 -07:00
Simon Lin 578b29fa60 [thci] fix address filter code issues (#4986)
This commit fixes existing issues in address filters.

- Fix misuse of address filter modes
  - disabled should be disable
  - Whitelist should be whitelist
  - Blacklist should be blacklist
- Fix errors in removing macfilter entries

Impact on 1.1 certification:

This commit does not impact 1.1 certification because only
OpenThread_WpanCtl.py is changed. In 1.1 certification, all golden
devices are controlled by OpenThread.py. OpenThread_WpanCtl.py is used
to control OTBR DUT, and mac filter feature is not useful for a
DUT.
2020-05-28 11:23:00 -07:00
Jing Ma 204308f4a7 [harness-automation] fix browser stuck in navigating to url (#5005) 2020-05-27 22:43:57 -07:00
Jonathan Hui dd0fa0d34c [shell] resolve shellcheck warnings (#4966) 2020-05-19 13:04:42 -07:00
Jonathan Hui cb9b353fb3 [scripts] apply shfmt changes (#4966) 2020-05-19 13:04:42 -07:00
kangping 092eb186e1 [joiner] add validation of joiner PSKd (#4934) 2020-05-14 08:41:51 -07:00
doublemis1 2153f5a4f4 [harness-automation] add another PDU Controller for EATON by SNMP (#4688)
Another PDU Controller used to power cycle between tests. Based by
SNMP protocol. To use EATON_PDU_CONTROLLER is needed PySNMP module
(added to requirements.txt). Also extend settings_sample.py by
comments with needed parameters to create EATON_PDU_CONTROLLER.
2020-05-04 14:43:34 -07:00
Jonathan Hui 082f7e9fdc [docs] apply prettier changes (#4881) 2020-04-24 16:22:00 -07:00
Jing Ma 8d5fc20eda [harness-automation] fix case selection issue when using Chrome 80 (#4648)
elem.txt might be null when the required reference devices could not
be met (either due to the quantity or the type) for specific test.
perform() will throw exceptions if elem.text is null since Chrome and
chromedriver 80. If elem is not shown in current case list window,
move_to_element() will not work either.
2020-04-08 11:34:41 -07:00
Jonathan Hui 2f63f74693 [thci] remove unused assignments (#4719) 2020-03-23 00:09:13 -07:00
Yakun Xu 34b83ae6c5 [script] simplify pretty (#4660)
* No need to bootstrap and configure for make pretty
* Use parallel to speed up make pretty
2020-03-10 22:15:07 -07:00
Eduardo Montoya 15f6808206 [cli] allow to escape separators (#4608) 2020-03-02 08:48:31 -08:00
Simon Lin c8dff09d3a [python] remove unnecessary calls to dict.keys() (#4576) 2020-02-18 10:16:06 -08:00
Yakun Xu 33808ebfba [style] apply google python style guide (#4501)
This commit applies and enforces Google's python style for tests.
2020-02-04 10:27:50 -08:00
周瑞祺 bfa84c26b0 [harness-sniffer] add OT sniffer support in Thread Test Harness (#4233)
Run Test Harness with OT sniffer.
2020-01-10 08:43:37 -08:00
Abtin Keshavarzian 0215527358 [spi-hdlc-adapter] fix undefined config macro warnings (#4458) 2020-01-09 11:45:39 -08:00
Jing Ma e79bb5557e [thci] add configurable device connection type for OpenThread_WpanCtl (#4364) 2019-12-16 21:00:12 -08:00
Jing Ma 554407d107 [harness-automation] support RF-shield test cases (#4231)
- RF-shield needed cases 6.3.2, 5.6.7, 9.2.9, 9.2.10 automation both
  on CV and IV testbed

- Added DUT2_DEVICE and SHIELD_GOLDEN_DEVICES in settings file which
  list the second DUT and golden devices in RF-box. The emulation of
  the required shielding/unshielding test environment is achieved by
  controlling the programmable RF-switch (example: Agilent 3499B + HP
  44476A microwave switch module) via scripts (configure
  SHIELD_CONTROLLER_TYPE and SHIELD_CONTROLLER_PARAMS in settings
  file) and final impacting the IN/OUT signal of the devices in the
  box.

- Added case_need_shield and device_order parameters in RF-shield
  needed case scripts for checking if test case needs to use RF-shield
  box and its device order on the Test Harness Testbed page.
2019-12-11 09:14:37 -08:00
Simon Lin 6275173bab [thci] fix wrong call to .lstrip('0x') (#4383)
Wpanctl THCI might return the wrong RLOC address when RLOC16 == 0 due
to incorrect call to .lstrip('0x').  We use .lstrip('0x') to strip
'0x' at the beginning of a hex string, however this is not correct
when the hex string is '0x0', because '0x0'.lstrip('0x') == ''

This commit fixes all incorrect calls to .lstrip('0x'). There are 3
different kinds of fix:

- s.lstrip('0x') replaced by self.__lstrip0x(s) (lstrip_0x is a
  correct implementation of stripping '0x' at the beginning of a
  string)

- hex(v).rstrip('L').lstrip('0x') replaced by '%x' % v

- hex(v).lstrip('0x').zfill(4) replaced by '%04x' % v
2019-12-10 08:56:52 -08:00
Jonathan Hui 27f5d9a06e [mle] rename RouterRoleEnabled to RouterEligible (#4363) 2019-12-03 09:28:35 +08:00
Rongli Sun 6877ee83eb [thci] configure FED by disable routerrole (#4317) 2019-11-13 07:24:50 +01:00
Simon Lin 88df5fb4ac [thci] add delay to joinNetwork and ping (#4319)
Recent updates to the Thread Group Test Harness have caused 5.2.3,
5.5.2 tests to fail.

This commit:
- adds more delay interval to address the Test Harness' change in
  delays
- merge Test Harness' OpenThread THCI change for updateRouterStatus

The reduction in ping delay and joinNetwork delay have caused test
5.5.2 to fail by side affects described in DEV-2008. Even though it is
a Test Harness validation issue rather than an OpenThread THCI issue,
we increase the ping & joinNetwork delay so that we have a more stable
regression environment.

Both 5.2.3 and 5.5.2 pass on Harness 2.0.0 with this commit.
2019-11-12 19:46:36 +01:00
Jing 082c1c79f5 [harness-automation] save case failure times (#4261)
Save failure times for each case for judging if case passes randomly.
2019-11-06 07:03:16 -08:00
Rongli Sun 20220169f8 [thci] remove default guardtime configuration (#4296) 2019-11-04 00:04:39 -08:00
Zhanglong Xia 5858bd1d28 [spi-hdlc-adapter] remove unused variables (#4252) 2019-10-22 11:24:52 -07:00
Jing 0d9263cc0e [harness-automation] update to support both external and internal Test Harness (#3883)
1. add new role support for border router and its 8 cases 7.1.x

2. update cases referring to Test Harness v50.x

3. for version larger than R1.4.0, not trigger saving results
   web-operation since it will auto save.

4. use "python3 -m black -l 119 -S" to format harness-automation
   directory

5. correct required golden device numbers
2019-10-09 08:42:09 -07:00
Simon Lin c3be816e07 [thci] fix setXpanId bug and code cleanup (#4121)
This commit fixes a bug where setXpanId might raise exception when
called with xPanId of length 16.

This commit also renames __convertLongToString to __convertLongToHex
to better reflect its functionality and optimizes its implementation.
2019-08-30 08:53:50 -07:00
Łukasz Duda 3d3315bf61 [thci] remove unused methods (#4034) 2019-07-29 22:53:09 -07:00
Jonathan Hui 6393901e52 [spi-hdlc-adapter] add cast to unsigned int on call to usleep (#3994) 2019-07-16 09:04:34 -07:00
Yakun Xu ae014b3f6d [posix] close files on exec (#3977)
This commit adds the *_CLOEXEC flags when opening files. This ensures
files are closed when spawning new processes.

* use LOG_DAEMON as syslog facility
* remove setenv() when forkpty
2019-07-12 09:40:06 -07:00
Jonathan Hui f924adcb60 [style] update python style to conform to PEP 8 (#3951)
With the exception of line length set to 119 vs. 79.

Add tests/ and tools/ to py-pretty-check.
2019-07-11 11:45:55 -04:00
Zhanglong Xia 6468973718 [spi-hdlc-adapter] add delay after reset the RCP chip (#3968) 2019-07-10 06:07:10 -07:00
Zhanglong Xia 668256290d [spi-hdlc-adapter] add syslog to record signal (#3966) 2019-07-09 04:38:23 -07:00
Jonathan Hui 2142b0008d [scan-build] resolve warnings from scan-build-7 (#3943)
Resolve warnings when using clang static analyzer v7.
2019-06-26 03:42:41 -07:00
Rongli Sun 73ffd2a9dc [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`)
2019-06-17 09:03:55 -07:00
Kamil Sroka c14cc60962 [windows] remove unsupported platform (#3878) 2019-06-06 11:55:18 -07:00
Jonathan Hui 9cd11a2761 [cli] move joiner to separate source files (#3862) 2019-05-28 18:25:50 -07:00
Łukasz Duda 72b0708085 [thci] correct conversion of IPv6 prefix (#3846) 2019-05-21 08:32:46 -07:00
Yakun Xu 333d5f7afb [spi-hdlc-adapter] reset NCP/RCP on exit (#3801)
This commit triggers resetting NCP/RCP on exit, which ensures NCP/RCP
get back to uninitialized state so that they will not respond to 15.4
messages.

Note, host should disable soft reset by passing `--no-reset` for RCP.
Thus OpenThread POSIX app doesn't need to reset RCP when it exits.
2019-05-09 21:28:20 -07:00
Abtin Keshavarzian eab62dd699 [spi-hdlc-adapter] allow log level to be changed (#3747)
This commit contains the following improvements  in
`spi-hdlc-adapter`:

- It changes the default syslog log level to `LOG_WARNING`.
- It enhances the `--verbose[=num]` option to allow negative values
  to reduce the log level. Note that this change keeps the behavior
  backward compatible (it is an add-on).
- It updates the `print_help()` and the `README.md` files to document
  new behavior of `--verbose` option.
2019-04-10 08:33:20 -07:00
Irving-cl dcc13419c3 [thci] match meshlocalprefix accurately to classify the addresses correctly (#3639) 2019-03-04 08:31:16 -08:00
rongli 47be103a62 [thci] update routerselectionjitter before start thread (#3524) 2019-01-28 08:41:14 -08:00
wacmac 103a9db541 [harness-automation] update device category (#3449) 2019-01-10 08:55:39 -08:00
Jing eca3e81fd3 [thci] update pollperiod command to accept ms resolution configuration (#3361) 2018-12-27 15:39:46 -08:00
Yakun Xu 04860bf422 [spi-hdlc-adapter] make pretty spi-hdlc-adapter (#3341) 2018-12-06 13:22:35 -08:00
rongli 1253becb72 [meshcop] support operational dataset operations for MTD (#3339)
- This commit unties operational dataset operations from `OPENTHREAD_FTD` option.
- This commit also updates THCI for MTD certification
2018-12-03 21:28:09 -08:00
Jing 6b01499e83 [thci] pass the channel mask as a comma separated channel string (#3321) 2018-11-29 08:53:19 -08:00
Jing 6f578589ff [harness-automation] add new test cases according to testplan changes (#3270) 2018-11-05 20:48:48 -08:00