[tests] add test case Cert_9_2_02 (#3589)

1. Add new test case **Cert_9_2_02**. Since the test case contains 2
topologies, added 2 new files:
- `Cert_9_2_02A_MGMTCommissionerSet.py`,
- `Cert_9_2_02B_MGMTCommissionerSet.py`.

2. Add mesh_cop tlvs parsing. The corresponding file is
`mesh_cop.py`. The mesh_cop tlvs are used in many cases. For example,
`CommissionerSessionId` is used in both the parsing of **Commissioning
Data**(in mle) and the parsing of **CoAP**. Collected all mesh_cop
tlvs refered in Thread into this file with some unused tlvs
unimplemented.

3. Reuse `SubTlvsFactory` in `network_data.py`. `SubTlvsFactory` are
used to choose the corresponding factory of specific tlv and do the
parsing of it. The `NetworkLayerTlvsFactory` in `network_layer.py` had
exactly the same function with it (almost the same code). Moved the
`SubTlvsFactory` into a new file `tlvs_parsing.py` and change the
usage in `network_data.py` and `network_layer.py`. This helps us
remove some redundant code.

4. Some format issues. Remove some trailing spaces.
This commit is contained in:
Irving-cl
2019-03-19 21:17:15 -07:00
committed by Jonathan Hui
parent a3f398b30f
commit a637cdccf4
15 changed files with 1146 additions and 442 deletions
+4
View File
@@ -108,6 +108,7 @@ EXTRA_DIST = \
Cert_8_1_02_Commissioning.py \
Cert_8_2_01_JoinerRouter.py \
Cert_8_2_02_JoinerRouter.py \
Cert_9_2_02_MGMTCommissionerSet.py \
Cert_9_2_04_ActiveDataset.py \
Cert_9_2_07_DelayTimer.py \
Cert_9_2_08_PersistentDatasets.py \
@@ -153,6 +154,7 @@ EXTRA_DIST = \
test_service.py \
test_network_data.py \
test_network_layer.py \
tlvs_parsing.py \
$(NULL)
check_PROGRAMS = \
@@ -247,6 +249,7 @@ check_SCRIPTS = \
Cert_8_1_02_Commissioning.py \
Cert_8_2_01_JoinerRouter.py \
Cert_8_2_02_JoinerRouter.py \
Cert_9_2_02_MGMTCommissionerSet.py \
Cert_9_2_04_ActiveDataset.py \
Cert_9_2_07_DelayTimer.py \
Cert_9_2_08_PersistentDatasets.py \
@@ -288,6 +291,7 @@ XFAIL_NCP_TESTS = \
Cert_8_1_02_Commissioning.py \
Cert_8_2_01_JoinerRouter.py \
Cert_8_2_02_JoinerRouter.py \
Cert_9_2_02_MGMTCommissionerSet.py \
Cert_9_2_04_ActiveDataset.py \
Cert_9_2_07_DelayTimer.py \
Cert_9_2_08_PersistentDatasets.py \