wiliot-certificate 4.4.2__py3-none-any.whl → 4.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. {brg_certificate → certificate}/ag/wlt_cmd_if.html +10 -4
  2. {brg_certificate → certificate}/ag/wlt_types_ag.py +1878 -519
  3. certificate/cert_common.py +1488 -0
  4. certificate/cert_config.py +480 -0
  5. {brg_certificate → certificate}/cert_data_sim.py +134 -46
  6. {brg_certificate → certificate}/cert_defines.py +129 -128
  7. {brg_certificate → certificate}/cert_gw_sim.py +183 -53
  8. {brg_certificate → certificate}/cert_mqtt.py +179 -64
  9. {brg_certificate → certificate}/cert_prints.py +35 -33
  10. {brg_certificate → certificate}/cert_protobuf.py +15 -6
  11. {brg_certificate → certificate}/cert_results.py +240 -64
  12. certificate/cert_utils.py +634 -0
  13. certificate/certificate.py +205 -0
  14. certificate/certificate_cli.py +76 -0
  15. certificate/certificate_eth_test_list.txt +76 -0
  16. certificate/certificate_sanity_test_list.txt +66 -0
  17. certificate/certificate_test_list.txt +76 -0
  18. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +3 -2
  19. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
  20. certificate/tests/calibration/output_power_test/output_power_test.json +23 -0
  21. certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
  22. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +2 -1
  23. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
  24. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +15 -0
  25. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
  26. certificate/tests/cloud_connectivity/acl_test/acl_test.json +15 -0
  27. certificate/tests/cloud_connectivity/acl_test/acl_test.py +96 -0
  28. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +19 -0
  29. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +41 -0
  30. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +19 -0
  31. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
  32. certificate/tests/cloud_connectivity/connection_test/connection_test.json +18 -0
  33. certificate/tests/cloud_connectivity/connection_test/connection_test.py +67 -0
  34. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.json +15 -0
  35. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +80 -0
  36. certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +21 -0
  37. certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +201 -0
  38. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +17 -0
  39. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +104 -0
  40. certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +18 -0
  41. certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +59 -0
  42. certificate/tests/cloud_connectivity/registration_test/registration_test.json +20 -0
  43. certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
  44. certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
  45. certificate/tests/cloud_connectivity/stress_test/stress_test.json +17 -0
  46. certificate/tests/cloud_connectivity/stress_test/stress_test.py +101 -0
  47. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +25 -0
  48. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +92 -0
  49. certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +20 -0
  50. certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +169 -0
  51. {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +2 -1
  52. certificate/tests/datapath/aging_test/aging_test.py +142 -0
  53. certificate/tests/datapath/event_ble5_test/event_ble5_test.json +17 -0
  54. certificate/tests/datapath/event_ble5_test/event_ble5_test.py +89 -0
  55. certificate/tests/datapath/event_test/event_test.json +17 -0
  56. certificate/tests/datapath/event_test/event_test.py +80 -0
  57. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +4 -3
  58. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +19 -13
  59. certificate/tests/datapath/output_power_test/output_power_test.json +23 -0
  60. {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
  61. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +2 -1
  62. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +13 -11
  63. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +2 -1
  64. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
  65. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +3 -2
  66. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
  67. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +20 -0
  68. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
  69. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +2 -1
  70. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +15 -14
  71. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +19 -0
  72. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +85 -0
  73. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +2 -1
  74. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  75. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +2 -1
  76. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  77. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +3 -2
  78. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
  79. brg_certificate/tests/datapath/output_power_test/output_power_test.json → certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +6 -4
  80. certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
  81. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +3 -2
  82. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
  83. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +8 -7
  84. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +113 -73
  85. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +8 -7
  86. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
  87. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +4 -3
  88. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +15 -11
  89. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +4 -3
  90. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +15 -11
  91. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +3 -1
  92. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
  93. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +15 -0
  94. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
  95. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +15 -0
  96. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
  97. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +15 -0
  98. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
  99. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +15 -0
  100. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
  101. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +16 -0
  102. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
  103. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +15 -0
  104. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
  105. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +15 -0
  106. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
  107. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +15 -0
  108. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +45 -0
  109. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +3 -2
  110. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
  111. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +2 -1
  112. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
  113. certificate/tests/energy2400/output_power_test/output_power_test.json +23 -0
  114. {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
  115. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +2 -1
  116. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
  117. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +26 -0
  118. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +379 -0
  119. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +20 -0
  120. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +173 -0
  121. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +24 -0
  122. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
  123. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +2 -1
  124. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
  125. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +2 -1
  126. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
  127. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +2 -1
  128. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
  129. {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +5 -4
  130. certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +450 -0
  131. certificate/wlt_types.py +122 -0
  132. {gw_certificate → common}/api_if/202/status.json +6 -0
  133. {gw_certificate → common}/api_if/203/status.json +6 -0
  134. {gw_certificate → common}/api_if/204/status.json +6 -0
  135. common/api_if/206/data.json +85 -0
  136. common/api_if/206/status.json +69 -0
  137. common/api_if/api_validation.py +91 -0
  138. common/web/templates/generator.html +210 -0
  139. common/web/templates/index.html +20 -0
  140. common/web/templates/menu.html +54 -0
  141. common/web/templates/parser.html +53 -0
  142. {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
  143. common/web/web_utils.py +399 -0
  144. {brg_certificate → common}/wltPb_pb2.py +14 -12
  145. {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
  146. gui_certificate/gui_certificate_cli.py +14 -0
  147. gui_certificate/server.py +1267 -0
  148. gui_certificate/templates/cert_run.html +1273 -0
  149. wiliot_certificate-4.5.0.dist-info/METADATA +99 -0
  150. wiliot_certificate-4.5.0.dist-info/RECORD +168 -0
  151. {wiliot_certificate-4.4.2.dist-info → wiliot_certificate-4.5.0.dist-info}/WHEEL +1 -1
  152. wiliot_certificate-4.5.0.dist-info/entry_points.txt +5 -0
  153. wiliot_certificate-4.5.0.dist-info/top_level.txt +3 -0
  154. brg_certificate/ag/energous_v0_defines.py +0 -925
  155. brg_certificate/ag/energous_v1_defines.py +0 -931
  156. brg_certificate/ag/energous_v2_defines.py +0 -925
  157. brg_certificate/ag/energous_v3_defines.py +0 -925
  158. brg_certificate/ag/energous_v4_defines.py +0 -925
  159. brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
  160. brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
  161. brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
  162. brg_certificate/ag/minew_lte_v0_defines.py +0 -925
  163. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -142
  164. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -785
  165. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -139
  166. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +0 -394
  167. brg_certificate/ag/wlt_types_ag_jsons/custom.json +0 -515
  168. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +0 -672
  169. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -550
  170. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -595
  171. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -598
  172. brg_certificate/ag/wlt_types_ag_jsons/interface.json +0 -938
  173. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -1234
  174. brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -105
  175. brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -77
  176. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
  177. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +0 -110
  178. brg_certificate/brg_certificate.py +0 -225
  179. brg_certificate/brg_certificate_cli.py +0 -63
  180. brg_certificate/cert_common.py +0 -923
  181. brg_certificate/cert_config.py +0 -402
  182. brg_certificate/cert_utils.py +0 -362
  183. brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
  184. brg_certificate/certificate_bcc_test_list.txt +0 -48
  185. brg_certificate/certificate_sanity_test_list.txt +0 -43
  186. brg_certificate/certificate_test_list.txt +0 -53
  187. brg_certificate/config/eclipse.json +0 -10
  188. brg_certificate/config/hivemq.json +0 -10
  189. brg_certificate/config/mosquitto.json +0 -10
  190. brg_certificate/config/mosquitto.md +0 -95
  191. brg_certificate/config/wiliot-dev.json +0 -10
  192. brg_certificate/restore_brg.py +0 -61
  193. brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
  194. brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
  195. brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
  196. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
  197. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
  198. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
  199. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
  200. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
  201. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
  202. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
  203. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
  204. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
  205. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
  206. brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
  207. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
  208. brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
  209. brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
  210. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
  211. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
  212. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
  213. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +0 -20
  214. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +0 -321
  215. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
  216. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
  217. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
  218. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
  219. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
  220. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
  221. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
  222. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
  223. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
  224. brg_certificate/wltPb_pb2.pyi +0 -234
  225. brg_certificate/wlt_types.py +0 -113
  226. gw_certificate/ag/ut_defines.py +0 -364
  227. gw_certificate/ag/wlt_types.py +0 -85
  228. gw_certificate/ag/wlt_types_ag.py +0 -5310
  229. gw_certificate/ag/wlt_types_data.py +0 -64
  230. gw_certificate/api/extended_api.py +0 -23
  231. gw_certificate/api_if/200/data.json +0 -106
  232. gw_certificate/api_if/200/status.json +0 -47
  233. gw_certificate/api_if/201/data.json +0 -98
  234. gw_certificate/api_if/201/status.json +0 -53
  235. gw_certificate/api_if/205/logs.json +0 -12
  236. gw_certificate/api_if/api_validation.py +0 -38
  237. gw_certificate/api_if/gw_capabilities.py +0 -54
  238. gw_certificate/cert_results.py +0 -145
  239. gw_certificate/common/analysis_data_bricks.py +0 -60
  240. gw_certificate/common/debug.py +0 -42
  241. gw_certificate/common/serialization_formatter.py +0 -93
  242. gw_certificate/common/utils.py +0 -8
  243. gw_certificate/common/utils_defines.py +0 -15
  244. gw_certificate/common/wltPb_pb2.py +0 -84
  245. gw_certificate/gw_certificate.py +0 -154
  246. gw_certificate/gw_certificate_cli.py +0 -87
  247. gw_certificate/interface/4.4.91_app.zip +0 -0
  248. gw_certificate/interface/4.4.91_sd_bl_app.zip +0 -0
  249. gw_certificate/interface/ble_simulator.py +0 -61
  250. gw_certificate/interface/ble_sniffer.py +0 -189
  251. gw_certificate/interface/flash_fw.py +0 -90
  252. gw_certificate/interface/if_defines.py +0 -36
  253. gw_certificate/interface/mqtt.py +0 -563
  254. gw_certificate/interface/nrfutil-linux +0 -0
  255. gw_certificate/interface/nrfutil-mac +0 -0
  256. gw_certificate/interface/nrfutil.exe +0 -0
  257. gw_certificate/interface/pkt_generator.py +0 -594
  258. gw_certificate/interface/uart_if.py +0 -236
  259. gw_certificate/interface/uart_ports.py +0 -20
  260. gw_certificate/templates/results.html +0 -241
  261. gw_certificate/templates/stage.html +0 -22
  262. gw_certificate/templates/table.html +0 -6
  263. gw_certificate/templates/test.html +0 -38
  264. gw_certificate/tests/__init__.py +0 -10
  265. gw_certificate/tests/actions.py +0 -289
  266. gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
  267. gw_certificate/tests/connection.py +0 -188
  268. gw_certificate/tests/downlink.py +0 -172
  269. gw_certificate/tests/generic.py +0 -238
  270. gw_certificate/tests/registration.py +0 -340
  271. gw_certificate/tests/static/__init__.py +0 -0
  272. gw_certificate/tests/static/connection_defines.py +0 -9
  273. gw_certificate/tests/static/downlink_defines.py +0 -9
  274. gw_certificate/tests/static/generated_packet_table.py +0 -195
  275. gw_certificate/tests/static/packet_table.csv +0 -10067
  276. gw_certificate/tests/static/references.py +0 -5
  277. gw_certificate/tests/static/uplink_defines.py +0 -14
  278. gw_certificate/tests/throughput.py +0 -240
  279. gw_certificate/tests/uplink.py +0 -853
  280. wiliot_certificate-4.4.2.dist-info/METADATA +0 -211
  281. wiliot_certificate-4.4.2.dist-info/RECORD +0 -210
  282. wiliot_certificate-4.4.2.dist-info/entry_points.txt +0 -3
  283. wiliot_certificate-4.4.2.dist-info/top_level.txt +0 -3
  284. {brg_certificate → certificate}/__init__.py +0 -0
  285. {gw_certificate → common}/api_if/202/data.json +0 -0
  286. {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
  287. {gw_certificate → common}/api_if/203/data.json +0 -0
  288. {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
  289. {gw_certificate → common}/api_if/204/data.json +0 -0
  290. {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
  291. {gw_certificate → common}/api_if/205/data.json +0 -0
  292. {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
  293. {gw_certificate → common}/api_if/205/status.json +0 -0
  294. {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
  295. {gw_certificate → common/api_if}/__init__.py +0 -0
  296. {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
  297. {wiliot_certificate-4.4.2.dist-info → wiliot_certificate-4.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,64 +0,0 @@
1
- from typing import Literal
2
-
3
- from gw_certificate.ag.wlt_types import WltPkt
4
- from gw_certificate.ag.ut_defines import *
5
- from gw_certificate.ag.wlt_types_ag import *
6
-
7
- DATA_DEFAULT_GROUP_ID = 0x020000
8
-
9
- class GenericPacket():
10
- def __init__(self, payload=0, pkt_id=0):
11
- self.payload = payload
12
- self.pkt_id = pkt_id
13
-
14
- def __eq__(self, other):
15
- if isinstance(other, GenericV7):
16
- return (
17
- self.payload == other.payload and
18
- self.pkt_id == other.pkt_id
19
- )
20
- return False
21
-
22
- def dump(self):
23
- string = bitstruct.pack("u160u32", self.payload, self.pkt_id)
24
- return string.hex().upper()
25
-
26
- def set(self, string):
27
- d = bitstruct.unpack("u160u32", binascii.unhexlify(string))
28
- self.payload = d[0]
29
- self.pkt_id = d[1]
30
-
31
-
32
- class DataPacket(WltPkt):
33
- def __init__(self, group_id=None, service_uuid:Literal["tag", "bridge"]='bridge', *args, **kwargs):
34
- if service_uuid == 'bridge':
35
- uuid_msb=HDR_DEFAULT_BRG_UUID_MSB
36
- uuid_lsb=HDR_DEFAULT_BRG_UUID_LSB
37
- else:
38
- uuid_msb=HDR_DEFAULT_TAG_UUID_MSB
39
- uuid_lsb=HDR_DEFAULT_TAG_UUID_LSB
40
- if group_id is None:
41
- group_id = DATA_DEFAULT_GROUP_ID
42
- else:
43
- group_id = group_id
44
- super().__init__(hdr=Hdr(uuid_msb=uuid_msb, uuid_lsb=uuid_lsb, group_id=group_id),
45
- data_hdr=DataHdr(uuid_msb=uuid_msb, uuid_lsb=uuid_lsb,
46
- group_id_minor=((group_id & 0xFFFF00) >> 8), group_id_major=(group_id & 0x0000FF)),
47
- generic=GenericPacket(), *args, **kwargs)
48
-
49
-
50
- def set(self, string):
51
- if not string.startswith("1E16"):
52
- string = "1E16" + string
53
- self.hdr.set(string[0:14])
54
- if self.hdr.group_id == DATA_DEFAULT_GROUP_ID:
55
- self.generic = GenericPacket()
56
- self.generic.set(string[14:62])
57
- else:
58
- super().set(string)
59
-
60
- def dump(self):
61
- return super().dump()
62
-
63
- def __repr__(self) -> str:
64
- return self.dump()
@@ -1,23 +0,0 @@
1
-
2
- from wiliot_api.edge.edge import EdgeClient
3
-
4
-
5
- class ExtendedEdgeClient(EdgeClient):
6
- def __init__(self, api_key, owner_id, env='prod', region='us-east-2', cloud='',log_file=None, logger_=None):
7
- # Support for GCP
8
- region='us-central1' if cloud=='gcp' else region
9
- super().__init__(api_key=api_key, owner_id=owner_id, env=env, region=region, cloud=cloud, log_file=log_file, logger_=logger_)
10
-
11
- def kick_gw_from_mqtt(self, gw_id):
12
- path = f"gateway/{gw_id}/kick-mqtt-connection"
13
- response = self._post(path, None)
14
- return response
15
-
16
- def get_kong_logs(self, gw_id):
17
- """
18
- Only available under the certificate registration account
19
- """
20
- path = f"gateway/{gw_id}/auth-logs"
21
-
22
- return self._get(path)
23
-
@@ -1,106 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "gatewayId": {
5
- "type": "string",
6
- "maxLength": 36
7
- },
8
- "gatewayType": {
9
- "type": "string"
10
- },
11
- "timestamp": {
12
- "type": "number"
13
- },
14
- "packets": {
15
- "allOf": [
16
- {
17
- "description": "Uncoupled Packet",
18
- "type": "array",
19
- "items": {
20
- "type": "object",
21
- "properties": {
22
- "timestamp": {
23
- "type": "number"
24
- },
25
- "sequenceId": {
26
- "type": "number"
27
- },
28
- "rssi": {
29
- "type": "number"
30
- },
31
- "payload": {
32
- "type": "string"
33
- }
34
- },
35
- "required": [
36
- "timestamp",
37
- "sequenceId",
38
- "rssi",
39
- "payload"
40
- ]
41
- }
42
- },
43
- {
44
- "description": "Coupled Packet",
45
- "type": "array",
46
- "items": {
47
- "type": "object",
48
- "properties": {
49
- "bridgeId": {
50
- "type": "string"
51
- },
52
- "timestamp": {
53
- "type": "number"
54
- },
55
- "sequenceId": {
56
- "type": "number"
57
- },
58
- "nfpkt": {
59
- "type": "number"
60
- },
61
- "rssi": {
62
- "type": "number"
63
- },
64
- "payload": {
65
- "type": "string"
66
- }
67
- },
68
- "dependentRequired":
69
- {
70
- "nfpkt": ["rssi", "bridgeId"]
71
- },
72
- "required": ["timestamp", "sequenceId", "payload"]
73
- }
74
-
75
- }
76
- ]
77
- }
78
- },
79
- "required": [
80
- "gatewayId",
81
- "gatewayType",
82
- "timestamp",
83
- "packets"
84
- ],
85
- "dependentSchemas": {
86
- "location": {
87
- "properties": {
88
- "location": {
89
- "type": "object",
90
- "properties": {
91
- "lat": {
92
- "type": "number"
93
- },
94
- "lng": {
95
- "type": "number"
96
- }
97
- },
98
- "required": [
99
- "lat",
100
- "lng"
101
- ]
102
- }
103
- }
104
- }
105
- }
106
- }
@@ -1,47 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "gatewayId": {
5
- "type": "string",
6
- "maxLength": 36
7
- },
8
- "gatewayType": {
9
- "type": "string"
10
- },
11
- "gatewayConf": {
12
- "type": "object",
13
- "properties": {
14
- "apiVersion": {
15
- "type": "string",
16
- "enum": ["202"]
17
- },
18
- "interfaceChipSwVersion": {
19
- "type": "string"
20
- },
21
- "bleChipSwVersion": {
22
- "type": "string"
23
- },
24
- "additional": {
25
- "type": "object",
26
- "additionalProperties": true
27
- }
28
- },
29
- "required": ["apiVersion", "interfaceChipSwVersion", "bleChipSwVersion"]
30
- },
31
- "tagMetadataCouplingSupported": {
32
- "type": "boolean"
33
- },
34
- "downlinkSupported": {
35
- "type": "boolean"
36
- },
37
- "bridgeOtaUpgradeSupported": {
38
- "type": "boolean"
39
- },
40
- "fwUpgradeSupported": {
41
- "type": "boolean"
42
- }
43
- },
44
- "required": ["gatewayId", "gatewayType", "gatewayConf", "tagMetadataCouplingSupported", "downlinkSupported", "bridgeOtaUpgradeSupported", "fwUpgradeSupported"]
45
- }
46
-
47
-
@@ -1,98 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "gatewayId": {
5
- "type": "string",
6
- "maxLength": 36
7
- },
8
- "gatewayType": {
9
- "type": "string"
10
- },
11
- "timestamp": {
12
- "type": "number"
13
- },
14
- "packets": {
15
- "type": "array",
16
- "items": "object",
17
- "oneOf": [
18
- {
19
- "description": "Uncoupled Packet",
20
- "type": "array",
21
- "items": {
22
- "type": "object",
23
- "properties": {
24
- "timestamp": {
25
- "type": "number"
26
- },
27
- "sequenceId": {
28
- "type": "number"
29
- },
30
- "rssi": {
31
- "type": "number"
32
- },
33
- "payload": {
34
- "type": "string"
35
- }
36
- },
37
- "required": ["timestamp", "sequenceId", "rssi", "payload"]
38
- }
39
- },
40
- {
41
- "description": "Coupled Packet",
42
- "type": "array",
43
- "items": {
44
- "type": "object",
45
- "properties": {
46
- "bridgeId": {
47
- "type": "string"
48
- },
49
- "timestamp": {
50
- "type": "number"
51
- },
52
- "sequenceId": {
53
- "type": "number"
54
- },
55
- "nfpkt": {
56
- "type": "number"
57
- },
58
- "rssi": {
59
- "type": "number"
60
- },
61
- "payload": {
62
- "type": "string"
63
- }
64
- },
65
- "required": ["nfpkt", "bridgeId", "timestamp", "sequenceId", "rssi", "payload"]
66
- }
67
- }
68
- ]
69
- }
70
- },
71
- "required": [
72
- "gatewayId",
73
- "gatewayType",
74
- "timestamp",
75
- "packets"
76
- ],
77
- "dependentSchemas": {
78
- "location": {
79
- "properties": {
80
- "location": {
81
- "type": "object",
82
- "properties": {
83
- "lat": {
84
- "type": "number"
85
- },
86
- "lng": {
87
- "type": "number"
88
- }
89
- },
90
- "required": [
91
- "lat",
92
- "lng"
93
- ]
94
- }
95
- }
96
- }
97
- }
98
- }
@@ -1,53 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "gatewayId": {
5
- "type": "string",
6
- "maxLength": 36
7
- },
8
- "gatewayType": {
9
- "type": "string"
10
- },
11
- "gatewayConf": {
12
- "type": "object",
13
- "properties": {
14
- "apiVersion": {
15
- "type": "string",
16
- "enum": ["202"]
17
- },
18
- "gatewayVersion": {
19
- "type": "string"
20
- },
21
- "additional": {
22
- "type": "object",
23
- "additionalProperties": true
24
- }
25
- },
26
- "oneOf":[
27
- {"required": ["apiVersion", "gatewayVersion"]},
28
- {"required": ["apiVersion", "interfaceChipSwVersion", "bleChipSwVersion"]}
29
- ]
30
- },
31
- "tagMetadataCouplingSupported": {
32
- "type": "boolean"
33
- },
34
- "downlinkSupported": {
35
- "type": "boolean"
36
- },
37
- "bridgeOtaUpgradeSupported": {
38
- "type": "boolean"
39
- },
40
- "fwUpgradeSupported": {
41
- "type": "boolean"
42
- },
43
- "geoLocationSupport": {
44
- "type": "boolean"
45
- }
46
- },
47
- "oneOf": [
48
- {"required": ["gatewayId", "gatewayType", "gatewayConf", "tagMetadataCouplingSupported", "downlinkSupported", "bridgeOtaUpgradeSupported", "fwUpgradeSupported", "geoLocationSupport"]},
49
- {"required": ["gatewayID", "gatewayType", "gatewayConf", "tagMetadataCouplingSupported", "downlinkSupported", "bridgeOtaUpgradeSupported", "fwUpgradeSupported"]}
50
- ]
51
- }
52
-
53
-
@@ -1,12 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "gatewayLogs": {
5
- "type": "array",
6
- "items": {
7
- "type": "string"
8
- }
9
- }
10
- },
11
- "required": ["gatewayLogs"]
12
- }
@@ -1,38 +0,0 @@
1
- import json
2
- from jsonschema import Draft202012Validator
3
- import pkg_resources
4
- from enum import Enum
5
-
6
- from gw_certificate.ag.ut_defines import GW_CONF, GW_API_VERSION
7
- from gw_certificate.common.debug import debug_print
8
-
9
- class MESSAGE_TYPES(Enum):
10
- STATUS = "status"
11
- DATA = "data"
12
- LOGS = "logs"
13
-
14
- LATEST_API = "205"
15
- api_version = LATEST_API
16
-
17
- def validate_message(message_type: MESSAGE_TYPES, message: dict) -> tuple[bool, str]:
18
- """
19
- Validate MQTT message
20
- :type message_type: MESSAGE_TYPES
21
- :param message_type: MQTT message type
22
- :type message: dict
23
- :param message: MQTT Message
24
- :return: tuple (bool, str)
25
- """
26
- global api_version
27
-
28
- # NOTE When Connection test is not ran (using the -tests flag), default api_version is the latest
29
- if message_type == MESSAGE_TYPES.STATUS:
30
- api_version = message[GW_CONF][GW_API_VERSION]
31
- debug_print(f'API version set as {api_version} according to the status message.')
32
- json_path = pkg_resources.resource_filename(__name__, f"{api_version}/{message_type.value}.json")
33
- with open(json_path) as f:
34
- relevant_schema = json.load(f)
35
- validator = Draft202012Validator(relevant_schema)
36
- valid = validator.is_valid(message)
37
- errors = [e for e in validator.iter_errors(message)]
38
- return (valid, errors)
@@ -1,54 +0,0 @@
1
- from dataclasses import dataclass
2
- from typing import Literal
3
-
4
- from gw_certificate.common.debug import debug_print
5
- from gw_certificate.interface.mqtt import Serialization
6
- from gw_certificate.ag.ut_defines import GW_CONF, GW_API_VERSION
7
-
8
- @dataclass
9
- class GWCapabilities:
10
- tagMetadataCouplingSupported: bool = False
11
- downlinkSupported: bool = False
12
- bridgeOtaUpgradeSupported: bool = False
13
- fwUpgradeSupported: bool = False
14
- geoLocationSupport: bool = False
15
-
16
- @staticmethod
17
- def get_capabilities():
18
- return list(GWCapabilities.__dataclass_fields__.keys())
19
-
20
- def set_capability(self, capability, value:bool):
21
- assert capability in GWCapabilities.get_capabilities(), f'{capability} is not a valid capability'
22
- setattr(self, capability, value)
23
-
24
- class ConfigurationData():
25
- """
26
- Hold variables which values must be shared between different tests.
27
- """
28
- def __init__(self):
29
- self.status_msg = None
30
- self.api_version = None
31
-
32
- def status_msg_set(self, status_msg, ser: Serialization):
33
- if not isinstance(status_msg, dict):
34
- debug_print('Status message should be a dict!')
35
- return
36
-
37
- self.status_msg = status_msg
38
- if ser == Serialization.PB:
39
- self.api_version = status_msg.get(GW_API_VERSION)
40
- else:
41
- conf = status_msg.get(GW_CONF, {})
42
- self.api_version = conf.get(GW_API_VERSION)
43
- if isinstance(self.api_version, str):
44
- self.api_version = int(self.api_version)
45
-
46
- def status_msg_get(self):
47
- return self.status_msg
48
-
49
- def is_acl_supported(self):
50
- API_VERSION_SUPPORT_ACL = 205
51
-
52
- if self.api_version != None and self.api_version >= API_VERSION_SUPPORT_ACL:
53
- return True
54
- return False
@@ -1,145 +0,0 @@
1
- import os
2
- import tabulate
3
- from reportlab.lib import colors
4
- from reportlab.lib.pagesizes import letter
5
- from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer, PageBreak, KeepTogether, Image
6
- from reportlab.lib.styles import ParagraphStyle
7
- from reportlab.lib.enums import TA_CENTER, TA_LEFT
8
-
9
- # Local imports
10
- from gw_certificate.ag.ut_defines import TEST_FAILED, TEST_INCONCLUSIVE, TEST_PASSED, TEST_INFO, TEST_WARNING, TEST_OPTIONAL
11
- BASE_DIR = os.path.dirname(os.path.abspath(__file__))
12
- format_timedelta = lambda delta: f"{int(delta.total_seconds()//3600):02}:{int((delta.total_seconds()%3600)//60):02}:{int(delta.total_seconds()%60):02}"
13
-
14
- ##################################
15
- # GENERIC
16
- ##################################
17
- def generate_pdf_results_file(gw_cert):
18
- # Extract GW certificate tests results
19
- failures, inconclusive = 0, 0
20
- for test in gw_cert.tests:
21
- if test.rc == TEST_INCONCLUSIVE:
22
- inconclusive += 1
23
- elif test.rc == TEST_FAILED:
24
- failures += 1
25
-
26
- # Generate PDF file
27
- doc = SimpleDocTemplate(gw_cert.result_pdf_path, pagesize=letter)
28
- doc.title = f"Wiliot Gateway Certificate Results"
29
- elements, hdr_page = [], []
30
-
31
- # Add Wiliot Logo
32
- img = Image(os.path.join(BASE_DIR, "../common", "wlt_logo.png"), width=100, height=40) # Adjust size as needed
33
- hdr_page.append(img)
34
- hdr_page.append(Spacer(1, 20))
35
-
36
- # Title and Summary
37
- red_header = STYLES_PDF.get("RED_HEADER", ParagraphStyle("Default"))
38
- green_header = STYLES_PDF.get("GREEN_HEADER", ParagraphStyle("Default"))
39
- module_header = STYLES_PDF.get("MODULE_HEADER", ParagraphStyle("Default"))
40
- test_header = STYLES_PDF.get("TEST_HEADER", ParagraphStyle("Default"))
41
- text_style_bold = STYLES_PDF.get("BLACK_BOLD", ParagraphStyle("Default"))
42
- text_style_centered = STYLES_PDF.get("BLACK", ParagraphStyle("Default"))
43
- if gw_cert.error:
44
- title = Paragraph(f"<b>Wiliot Gateway Certificate Error!</b>", red_header)
45
- hdr_page.append(title)
46
- hdr_page.append(Spacer(1, 20))
47
- hdr_page.append(Paragraph(f"{gw_cert.error}", text_style_bold))
48
- else:
49
- title = Paragraph(f"<b>Wiliot Gateway Certificate Passed!</b>", green_header) if not failures else Paragraph(f"<b>Wiliot Gateway Certificate Failed!</b>", red_header)
50
- hdr_page.append(title)
51
- hdr_page.append(Spacer(1, 20))
52
- hdr_page.append(Paragraph(f"<b>Summary</b>", module_header))
53
- hdr_page.append(Spacer(1, 20))
54
- hdr_page.append(Paragraph("<u>Run Info:</u>", text_style_bold))
55
- hdr_page.append(Paragraph(f"Run date: {gw_cert.current_datetime.strftime('%d/%m/%Y, %H:%M:%S')}", text_style_bold))
56
- hdr_page.append(Paragraph(f"Tests duration: {format_timedelta(gw_cert.runtime())}", text_style_bold))
57
- hdr_page.append(Paragraph(f"Certificate version: {gw_cert.gw_cert_version}", text_style_bold))
58
- hdr_page.append(Spacer(1, 10))
59
- if gw_cert.use_uart:
60
- hdr_page.append(Paragraph("<u>Certification Kit Info:</u>", text_style_bold))
61
- hdr_page.append(Paragraph(f"BLE simulator mac: {gw_cert.uart.mac}", text_style_bold))
62
- hdr_page.append(Paragraph(f"BLE simulator version: {gw_cert.uart.fw_version}", text_style_bold))
63
- hdr_page.append(Spacer(1, 10))
64
- hdr_page.append(Paragraph("<u>Tested Device Info:</u>", text_style_bold))
65
- hdr_page.append(Paragraph(f"Tested gateway ID: {gw_cert.gw_id}", text_style_bold))
66
- hdr_page.append(Spacer(1, 20))
67
-
68
- # Count Table
69
- count_data = [
70
- ["PASSED", "INCONCLUSIVE", "FAILED", "TOTAL"],
71
- [len(gw_cert.tests)-(failures+inconclusive), inconclusive, failures, len(gw_cert.tests)]
72
- ]
73
- count_table = Table(count_data)
74
- count_table.setStyle(INNER_TABLE_STYLE)
75
- hdr_page.append(count_table)
76
- hdr_page.append(Spacer(1, 20))
77
-
78
- # Test Results
79
- summary_data = []
80
- text_style_center = STYLES_PDF.get("BLACK", ParagraphStyle("Default"))
81
- text_style_left = STYLES_PDF.get("BLACK_LEFT", ParagraphStyle("Default"))
82
- for test in gw_cert.tests:
83
- summary_data += [[Paragraph(f'<a href="#{test}">{test}</a>', text_style_centered), pass_or_fail_pdf(test), format_timedelta(test.duration)]]
84
- elements.append(Paragraph(f"<a name='{test}'/><b>{test}</b>", module_header))
85
- elements.append(Spacer(1, 20))
86
- elements.append(pass_or_fail_pdf(test))
87
- elements.append(Spacer(1, 10))
88
- elements.append(Paragraph(f"Test duration: {format_timedelta(test.duration)}", text_style_bold))
89
- elements.append(Spacer(1, 10))
90
- inner_table, stages_breakdown = [["Phase", "Result", "Duration"]], []
91
- for stage in test.stages:
92
- stages_breakdown += [KeepTogether([Paragraph(stage.stage_name, test_header), Spacer(1, 10), pass_or_fail_pdf(stage), Spacer(1, 10)]
93
- + [Paragraph(l, text_style_left) for l in stage.report.split('\n')]
94
- + [Spacer(1, 10)])]
95
- inner_table += [[Paragraph(stage.stage_name, text_style_center), pass_or_fail_pdf(stage), Paragraph(format_timedelta(stage.duration), text_style_center)]]
96
- test_table = Table(inner_table)
97
- test_table.setStyle(INNER_TABLE_STYLE)
98
- elements.append(test_table)
99
- elements.append(Spacer(1, 20))
100
- elements += stages_breakdown
101
- elements.append(PageBreak())
102
- summary_table = Table([["Name", "Result", "Duration"]] + summary_data)
103
- summary_table.setStyle(INNER_TABLE_STYLE)
104
- elements = hdr_page + [summary_table, PageBreak()] + elements
105
-
106
- doc.build(elements)
107
-
108
-
109
- ##################################
110
- # PDF
111
- ##################################
112
- STYLES_PDF = {
113
- "GREEN_HEADER": ParagraphStyle("Green Header", fontName="Helvetica-Bold", fontSize=20, textColor=colors.green, alignment=TA_CENTER),
114
- "RED_HEADER": ParagraphStyle("Red Header", fontName="Helvetica-Bold", fontSize=20, textColor=colors.red, alignment=TA_CENTER),
115
- "MODULE_HEADER": ParagraphStyle("Module Header", fontName="Helvetica-Bold", fontSize=16, textColor=colors.navy, alignment=TA_CENTER),
116
- "TEST_HEADER": ParagraphStyle("Test Header", fontName="Helvetica-Bold", fontSize=12, textColor=colors.black, alignment=TA_CENTER),
117
- "BLACK": ParagraphStyle("Black", fontName="Helvetica", fontSize=9, textColor=colors.black, splitLongWords=False, alignment=TA_CENTER, wordWrap = 'CJK'),
118
- "BLACK_LEFT": ParagraphStyle("Black Left", fontName="Helvetica", fontSize=9, textColor=colors.black, splitLongWords=False, alignment=TA_LEFT, wordWrap = 'CJK'),
119
- "BLACK_BOLD": ParagraphStyle("Black Bold", fontName="Helvetica-Bold", fontSize=9, textColor=colors.black, splitLongWords=False, alignment=TA_LEFT, wordWrap = 'CJK'),
120
- "BLUE": ParagraphStyle("Blue", fontName="Helvetica-Bold", fontSize=9, textColor=colors.navy, splitLongWords=False, alignment=TA_CENTER),
121
- "CYAN": ParagraphStyle("Cyan", fontName="Helvetica-Bold", fontSize=9, textColor=colors.cyan, splitLongWords=False, alignment=TA_CENTER),
122
- "GREEN": ParagraphStyle("Green", fontName="Helvetica-Bold", fontSize=9, textColor=colors.green, splitLongWords=False, alignment=TA_CENTER),
123
- "WARNING": ParagraphStyle("Warning", fontName="Helvetica-Bold", fontSize=9, textColor=colors.gold, splitLongWords=False, alignment=TA_CENTER),
124
- "RED": ParagraphStyle("Red", fontName="Helvetica-Bold", fontSize=9, textColor=colors.red, splitLongWords=False, alignment=TA_CENTER),
125
- "GRAY": ParagraphStyle("Gray", fontName="Helvetica-Bold", fontSize=9, textColor=colors.gray, splitLongWords=False, alignment=TA_CENTER),
126
- }
127
- def color_pdf(c, t):
128
- style = STYLES_PDF.get(c, ParagraphStyle("Default"))
129
- return Paragraph(t, style)
130
- pdf_result_map = {TEST_FAILED: color_pdf("RED", "FAILED"), TEST_INCONCLUSIVE: color_pdf("WARNING", "INCONCLUSIVE"),
131
- TEST_PASSED: color_pdf("GREEN", "PASSED"), TEST_INFO: color_pdf("CYAN", "INFO"),
132
- TEST_WARNING: color_pdf("WARNING", "WARNING"), TEST_OPTIONAL: color_pdf("GRAY", "OPTIONAL")}
133
- pass_or_fail_pdf = lambda obj : pdf_result_map[obj.rc]
134
-
135
- INNER_TABLE_STYLE = TableStyle([
136
- ('BACKGROUND', (0, 0), (-1, 0), colors.grey),
137
- ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
138
- ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
139
- ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'),
140
- ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
141
- ('FONTSIZE', (0, 0), (-1, 0), 9),
142
- ('BOTTOMPADDING', (0, 0), (-1, 0), 12),
143
- ('BACKGROUND', (0, 1), (-1, -1), colors.whitesmoke),
144
- ('WORDWRAP', (0, 0), (-1, -1), False),
145
- ])