wiliot-certificate 4.5.0a2__py3-none-any.whl → 4.5.0a4__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.
- certificate/cert_common.py +35 -18
- certificate/cert_config.py +6 -6
- certificate/cert_data_sim.py +12 -9
- certificate/cert_defines.py +6 -0
- certificate/cert_gw_sim.py +3 -3
- certificate/cert_mqtt.py +5 -4
- certificate/cert_results.py +42 -32
- certificate/cert_utils.py +9 -10
- certificate/certificate.py +7 -5
- certificate/certificate_cli.py +9 -12
- certificate/certificate_eth_test_list.txt +3 -2
- certificate/certificate_sanity_test_list.txt +3 -2
- certificate/certificate_test_list.txt +3 -3
- certificate/tests/cloud_connectivity/acl_test/acl_test.py +13 -15
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +1 -1
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +2 -2
- certificate/tests/cloud_connectivity/connection_test/connection_test.py +4 -13
- certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +1 -2
- certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +1 -4
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +12 -6
- certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +1 -1
- certificate/tests/cloud_connectivity/stress_test/stress_test.py +12 -7
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +1 -2
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +26 -20
- certificate/tests/datapath/event_ble5_test/event_ble5_test.json +1 -1
- certificate/tests/datapath/event_ble5_test/event_ble5_test.py +7 -13
- certificate/tests/datapath/event_test/event_test.json +1 -1
- certificate/tests/datapath/event_test/event_test.py +5 -10
- certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +4 -4
- certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +5 -5
- certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +5 -5
- certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +10 -8
- certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +1 -1
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +4 -3
- certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +8 -9
- certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +113 -271
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +1 -1
- certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +4 -9
- common/api_if/api_validation.py +6 -0
- common/web/templates/generator.html +141 -79
- common/web/web_utils.py +78 -56
- gui_certificate/server.py +255 -70
- gui_certificate/templates/cert_run.html +128 -98
- {wiliot_certificate-4.5.0a2.dist-info → wiliot_certificate-4.5.0a4.dist-info}/METADATA +6 -11
- {wiliot_certificate-4.5.0a2.dist-info → wiliot_certificate-4.5.0a4.dist-info}/RECORD +49 -65
- certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -211
- certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -894
- certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -184
- certificate/ag/wlt_types_ag_jsons/calibration.json +0 -490
- certificate/ag/wlt_types_ag_jsons/custom.json +0 -614
- certificate/ag/wlt_types_ag_jsons/datapath.json +0 -900
- certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -670
- certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -691
- certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -727
- certificate/ag/wlt_types_ag_jsons/interface.json +0 -1095
- certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -1439
- certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -105
- certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -77
- certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -126
- certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +0 -175
- certificate/ag/wlt_types_ag_jsons/unified_sensor_pkt.json +0 -65
- {wiliot_certificate-4.5.0a2.dist-info → wiliot_certificate-4.5.0a4.dist-info}/WHEEL +0 -0
- {wiliot_certificate-4.5.0a2.dist-info → wiliot_certificate-4.5.0a4.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-4.5.0a2.dist-info → wiliot_certificate-4.5.0a4.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-4.5.0a2.dist-info → wiliot_certificate-4.5.0a4.dist-info}/top_level.txt +0 -0
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
{%- endmacro %}
|
|
157
157
|
|
|
158
158
|
{% set non_cert_text = "NOT READY FOR CERTIFICATION" %}
|
|
159
|
+
{% set unsterile_run_warning = "Unsterile run mode is set - a certifying run must be sterile." %}
|
|
159
160
|
|
|
160
161
|
<!-- Progress Indicator -->
|
|
161
162
|
<div class="step-indicator">
|
|
@@ -326,12 +327,15 @@
|
|
|
326
327
|
name="modules[]"
|
|
327
328
|
id="module_{{ mod.name }}"
|
|
328
329
|
value="{{ mod.name }}"
|
|
329
|
-
{% if is_selected
|
|
330
|
+
{% if is_selected or (is_mandatory and not has_selections) or (mod.is_mandatory_by_schema and not has_selections) %}checked{% endif %}>
|
|
330
331
|
<label class="form-check-label" for="module_{{ mod.name }}" style="font-weight: bold; font-size: 1.1rem;">
|
|
331
332
|
{{ mod.name }}
|
|
332
333
|
{% if is_mandatory %}
|
|
333
334
|
<span class="mandatory-badge">Mandatory</span>
|
|
334
335
|
{% endif %}
|
|
336
|
+
{% if mod.is_mandatory_by_schema %}
|
|
337
|
+
<span class="mandatory-badge" style="background: #0066cc;">Mandatory by Schema</span>
|
|
338
|
+
{% endif %}
|
|
335
339
|
{{ kb_link(mod_doc) }}
|
|
336
340
|
</label>
|
|
337
341
|
<p class="text-muted mt-1 mb-0">
|
|
@@ -451,7 +455,7 @@
|
|
|
451
455
|
{% set common_parameters = ['dut', 'custom_broker'] %}
|
|
452
456
|
|
|
453
457
|
{% for f in cert_schema.fields %}
|
|
454
|
-
{% if f.name != 'validation_schema' and f.name != 'tl' and f.name in common_parameters %}
|
|
458
|
+
{% if f.name != 'validation_schema' and f.name != 'tl' and f.name != 'custom_broker' and f.name in common_parameters %}
|
|
455
459
|
{% set arg_label = (f.option_strings|join(', ') if f.option_strings else f.name) %}
|
|
456
460
|
{% set tip_id = 'help_' ~ f.name %}
|
|
457
461
|
{% set field_name = cert_schema.title ~ '_' ~ f.name %}
|
|
@@ -478,18 +482,6 @@
|
|
|
478
482
|
<input type="checkbox" class="form-check-input" id="{{ field_name }}" name="{{ field_name }}" {% if field_value %}checked{% endif %}>
|
|
479
483
|
</div>
|
|
480
484
|
</div>
|
|
481
|
-
{% elif f.name == "overwrite_defaults" %}
|
|
482
|
-
<div class="col-sm-4">
|
|
483
|
-
<textarea id="{{ field_name }}" class="form-control" name="{{ field_name }}" rows="3" placeholder="key1=value1 key2=value2">{{ field_value }}</textarea>
|
|
484
|
-
</div>
|
|
485
|
-
{% elif f.name == "custom_broker" %}
|
|
486
|
-
<div class="col-sm-4">
|
|
487
|
-
<input type="file" class="form-control" id="{{ field_name }}" name="{{ field_name }}_file" accept=".json">
|
|
488
|
-
{% if field_value %}
|
|
489
|
-
{% set path_parts = field_value.replace('\\', '/').split('/') %}
|
|
490
|
-
<div class="form-text">Current: {{ path_parts[-1] if path_parts|length > 1 else field_value }}</div>
|
|
491
|
-
{% endif %}
|
|
492
|
-
</div>
|
|
493
485
|
{% else %}
|
|
494
486
|
<div class="col-sm-4">
|
|
495
487
|
<input type="{{ f.type }}" class="form-control" id="{{ field_name }}" name="{{ field_name }}" value="{{ field_value }}">
|
|
@@ -509,6 +501,43 @@
|
|
|
509
501
|
{% endif %}
|
|
510
502
|
{% endfor %}
|
|
511
503
|
|
|
504
|
+
<!-- Custom Broker Configuration -->
|
|
505
|
+
{% set cert_schema = cert_schema %}
|
|
506
|
+
{% set broker_field_prefix = cert_schema.title ~ '_custom_broker_' %}
|
|
507
|
+
<div class="card mb-3">
|
|
508
|
+
<div class="card-header d-flex align-items-center">
|
|
509
|
+
<button class="btn btn-sm btn-link text-decoration-none test-toggle me-2 collapsed"
|
|
510
|
+
type="button"
|
|
511
|
+
data-bs-toggle="collapse"
|
|
512
|
+
data-bs-target="#customBrokerConfig"
|
|
513
|
+
aria-expanded="false">
|
|
514
|
+
<svg class="chev" width="16" height="16" viewBox="0 0 16 16">
|
|
515
|
+
<path d="M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 1 1 .708.708L8.354 9.354a.5.5 0 0 1-.708 0L4.646 6.354a.5.5 0 0 1 0-.708z" fill="currentColor"/>
|
|
516
|
+
</svg>
|
|
517
|
+
</button>
|
|
518
|
+
<strong>Custom MQTT Broker Configuration</strong>
|
|
519
|
+
<span class="text-danger ms-2">*</span>
|
|
520
|
+
</div>
|
|
521
|
+
<div id="customBrokerConfig" class="collapse">
|
|
522
|
+
<div class="card-body">
|
|
523
|
+
{% for field_key, field_default in custom_broker_defaults.items() %}
|
|
524
|
+
{% set field_name = broker_field_prefix ~ field_key %}
|
|
525
|
+
{% set field_value = form_data.get(field_name, field_default) %}
|
|
526
|
+
{% set input_type = 'number' if field_key == 'port' else 'password' if field_key == 'password' else 'text' %}
|
|
527
|
+
{% set is_required = field_key not in ['username', 'password'] %}
|
|
528
|
+
<div class="row mb-3">
|
|
529
|
+
<label for="{{ field_name }}" class="col-sm-3 col-form-label">
|
|
530
|
+
{{ field_key }}{% if is_required %} <span class="text-danger">*</span>{% endif %}
|
|
531
|
+
</label>
|
|
532
|
+
<div class="col-sm-4">
|
|
533
|
+
<input type="{{ input_type }}" class="form-control" id="{{ field_name }}" name="{{ field_name }}" value="{{ field_value }}" {% if is_required %}required{% endif %}>
|
|
534
|
+
</div>
|
|
535
|
+
</div>
|
|
536
|
+
{% endfor %}
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
</div>
|
|
540
|
+
|
|
512
541
|
<div class="card mb-3">
|
|
513
542
|
<div class="card-header d-flex align-items-center">
|
|
514
543
|
<button class="btn btn-sm btn-link text-decoration-none test-toggle me-2 collapsed"
|
|
@@ -615,10 +644,20 @@
|
|
|
615
644
|
<small class="text-muted d-block mt-1">All mandatory modules and tests are selected</small>
|
|
616
645
|
{% else %}
|
|
617
646
|
<span class="badge bg-warning text-dark">{{ non_cert_text }}</span>
|
|
618
|
-
<small class="text-muted d-block mt-1">
|
|
647
|
+
<small class="text-muted d-block mt-1">
|
|
648
|
+
{% if not unsterile_run %}
|
|
649
|
+
Some mandatory modules or tests are missing
|
|
650
|
+
{% endif %}
|
|
651
|
+
</small>
|
|
619
652
|
{% endif %}
|
|
620
653
|
</p>
|
|
621
654
|
|
|
655
|
+
{% if unsterile_run %}
|
|
656
|
+
<div class="alert alert-warning">
|
|
657
|
+
<strong>⚠️ Warning:</strong> {{ unsterile_run_warning }}
|
|
658
|
+
</div>
|
|
659
|
+
{% endif %}
|
|
660
|
+
|
|
622
661
|
{% if not is_certified %}
|
|
623
662
|
{% if missing_modules %}
|
|
624
663
|
<div class="alert alert-warning">
|
|
@@ -644,12 +683,13 @@
|
|
|
644
683
|
{% endif %}
|
|
645
684
|
{% if missing_tests_details %}
|
|
646
685
|
<div class="alert alert-warning">
|
|
647
|
-
<strong>Missing Mandatory Tests:</strong>
|
|
686
|
+
<strong>Missing Mandatory Tests from Selected Modules:</strong>
|
|
648
687
|
<ul class="mb-0">
|
|
649
688
|
{% for test in missing_tests_details %}
|
|
650
689
|
<li>{{ test.label }} <small class="text-muted">({{ test.module }})</small></li>
|
|
651
690
|
{% endfor %}
|
|
652
691
|
</ul>
|
|
692
|
+
<small class="d-block mt-2">When a module is selected, its mandatory tests must also be selected.</small>
|
|
653
693
|
</div>
|
|
654
694
|
{% endif %}
|
|
655
695
|
{% endif %}
|
|
@@ -662,7 +702,10 @@
|
|
|
662
702
|
<h5 class="mb-0">Schema Verification</h5>
|
|
663
703
|
</div>
|
|
664
704
|
<div class="card-body">
|
|
665
|
-
{% if schema_errors or schema_warnings %}
|
|
705
|
+
{% if schema_errors or schema_warnings or missing_modules_by_schema %}
|
|
706
|
+
<p><strong>Schema Status:</strong>
|
|
707
|
+
<span class="badge bg-warning text-dark">SCHEMA DOES NOT MATCH RUN SETTINGS</span>
|
|
708
|
+
</p>
|
|
666
709
|
{% if schema_errors %}
|
|
667
710
|
<div class="alert alert-danger">
|
|
668
711
|
<strong>Errors:</strong>
|
|
@@ -683,84 +726,26 @@
|
|
|
683
726
|
</ul>
|
|
684
727
|
</div>
|
|
685
728
|
{% endif %}
|
|
729
|
+
{% if missing_modules_by_schema %}
|
|
730
|
+
<div class="alert alert-warning mt-3">
|
|
731
|
+
<strong>Missing Modules Mandatory by Schema:</strong>
|
|
732
|
+
<ul class="mb-0">
|
|
733
|
+
{% for mod in missing_modules_by_schema %}
|
|
734
|
+
<li>{{ mod }}</li>
|
|
735
|
+
{% endfor %}
|
|
736
|
+
</ul>
|
|
737
|
+
<small class="d-block mt-2">These modules are declared in your validation schema but are not selected. They should be included for proper certification.</small>
|
|
738
|
+
</div>
|
|
739
|
+
{% endif %}
|
|
686
740
|
{% else %}
|
|
687
741
|
<p><strong>Schema Status:</strong>
|
|
688
|
-
<span class="badge bg-success">SCHEMA MATCHES
|
|
742
|
+
<span class="badge bg-success">SCHEMA MATCHES RUN SETTINGS</span>
|
|
689
743
|
<small class="text-muted d-block mt-1">The uploaded schema matches the selected flavor, modules, and tests</small>
|
|
690
744
|
</p>
|
|
691
745
|
{% endif %}
|
|
692
|
-
</div>
|
|
693
|
-
</div>
|
|
694
|
-
|
|
695
|
-
<!-- Run Parameters Summary -->
|
|
696
|
-
{% set cert_schema = cert_schema %}
|
|
697
|
-
{% set cb_index = -1 %}
|
|
698
|
-
{% for f in cert_schema.fields %}
|
|
699
|
-
{% if f.name == 'custom_broker' %}
|
|
700
|
-
{% set cb_index = loop.index0 %}
|
|
701
|
-
{% endif %}
|
|
702
|
-
{% endfor %}
|
|
703
|
-
{% set has_advanced = False %}
|
|
704
|
-
{% for f in cert_schema.fields %}
|
|
705
|
-
{% if f.name != 'validation_schema' and f.name != 'tl' and cb_index >= 0 and loop.index0 > cb_index %}
|
|
706
|
-
{% set has_advanced = True %}
|
|
707
|
-
{% endif %}
|
|
708
|
-
{% endfor %}
|
|
709
|
-
{% if has_advanced %}
|
|
710
|
-
<div class="card mb-4">
|
|
711
|
-
<div class="card-header">
|
|
712
|
-
<h5 class="mb-0">Run Parameters</h5>
|
|
713
|
-
</div>
|
|
714
|
-
<div class="card-body">
|
|
715
|
-
{% for f in cert_schema.fields %}
|
|
716
|
-
{% if f.name != 'validation_schema' and f.name != 'tl' %}
|
|
717
|
-
{% set field_name = cert_schema.title ~ '_' ~ f.name %}
|
|
718
|
-
{% set field_value = form_data.get(field_name, f.default if f.default is not none else '') %}
|
|
719
|
-
{% set is_advanced = cb_index >= 0 and loop.index0 > cb_index %}
|
|
720
|
-
|
|
721
|
-
{% if not is_advanced %}
|
|
722
|
-
{% set arg_label = (f.option_strings|join(', ') if f.option_strings else f.name) %}
|
|
723
|
-
<p><strong>{{ arg_label }}:</strong>
|
|
724
|
-
{% if f.is_flag %}
|
|
725
|
-
{{ 'Yes' if field_value else 'No' }}
|
|
726
|
-
{% else %}
|
|
727
|
-
{{ field_value if field_value else '(not set)' }}
|
|
728
|
-
{% endif %}
|
|
729
|
-
</p>
|
|
730
|
-
{% endif %}
|
|
731
|
-
{% endif %}
|
|
732
|
-
{% endfor %}
|
|
733
746
|
|
|
734
|
-
{% if has_advanced %}
|
|
735
|
-
<div class="mb-3">
|
|
736
|
-
<button class="btn btn-outline-secondary btn-sm" type="button" data-bs-toggle="collapse" data-bs-target="#advancedParamsReview" aria-expanded="false" aria-controls="advancedParamsReview">
|
|
737
|
-
Advanced Parameters ▼
|
|
738
|
-
</button>
|
|
739
|
-
</div>
|
|
740
|
-
<div class="collapse" id="advancedParamsReview">
|
|
741
|
-
{% for f in cert_schema.fields %}
|
|
742
|
-
{% if f.name != 'validation_schema' and f.name != 'tl' %}
|
|
743
|
-
{% set field_name = cert_schema.title ~ '_' ~ f.name %}
|
|
744
|
-
{% set field_value = form_data.get(field_name, f.default if f.default is not none else '') %}
|
|
745
|
-
{% set is_advanced = cb_index >= 0 and loop.index0 > cb_index %}
|
|
746
|
-
|
|
747
|
-
{% if is_advanced %}
|
|
748
|
-
{% set arg_label = (f.option_strings|join(', ') if f.option_strings else f.name) %}
|
|
749
|
-
<p><strong>{{ arg_label }}:</strong>
|
|
750
|
-
{% if f.is_flag %}
|
|
751
|
-
{{ 'Yes' if field_value else 'No' }}
|
|
752
|
-
{% else %}
|
|
753
|
-
{{ field_value if field_value else '(not set)' }}
|
|
754
|
-
{% endif %}
|
|
755
|
-
</p>
|
|
756
|
-
{% endif %}
|
|
757
|
-
{% endif %}
|
|
758
|
-
{% endfor %}
|
|
759
|
-
</div>
|
|
760
|
-
{% endif %}
|
|
761
747
|
</div>
|
|
762
748
|
</div>
|
|
763
|
-
{% endif %}
|
|
764
749
|
|
|
765
750
|
<!-- Edit Links -->
|
|
766
751
|
<div class="mb-4">
|
|
@@ -841,8 +826,10 @@
|
|
|
841
826
|
const mandatoryTests = {{ mandatory_tests_for_js|tojson|safe }};
|
|
842
827
|
const currentSelectedModules = {{ selected_modules|tojson|safe }};
|
|
843
828
|
const brgCertSchema = {{ cert_schema|tojson|safe }};
|
|
829
|
+
const customBrokerFieldKeys = {{ custom_broker_field_keys|tojson|safe }};
|
|
844
830
|
|
|
845
831
|
// Step 3: Module selection validation
|
|
832
|
+
const mandatoryModulesBySchema = {{ mandatory_modules_by_schema_for_js|tojson|safe }};
|
|
846
833
|
function checkStep3Validation() {
|
|
847
834
|
if (stepNum !== 3) return;
|
|
848
835
|
|
|
@@ -861,6 +848,14 @@
|
|
|
861
848
|
warnings.push('Missing mandatory modules: ' + missingMandatory.join(', '));
|
|
862
849
|
}
|
|
863
850
|
|
|
851
|
+
// Check if schema-mandatory modules are deselected
|
|
852
|
+
if (mandatoryModulesBySchema && mandatoryModulesBySchema.length > 0) {
|
|
853
|
+
const missingBySchema = mandatoryModulesBySchema.filter(m => !selectedModules.includes(m));
|
|
854
|
+
if (missingBySchema.length > 0) {
|
|
855
|
+
warnings.push('Missing modules mandatory by schema: ' + missingBySchema.join(', '));
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
864
859
|
// Check Bridge/Combo requirement for at least one additional module
|
|
865
860
|
if (selectedFlavor === 'bridge_only' || selectedFlavor === 'combo') {
|
|
866
861
|
const nonMandatorySelected = selectedModules.filter(m => !mandatoryModules.includes(m));
|
|
@@ -897,18 +892,33 @@
|
|
|
897
892
|
|
|
898
893
|
let warnings = [];
|
|
899
894
|
|
|
895
|
+
// Check if unsterile_run is enabled
|
|
896
|
+
const unsterileRunField = document.querySelector('input[id*="unsterile_run"], input[name*="unsterile_run"]');
|
|
897
|
+
if (unsterileRunField && unsterileRunField.checked) {
|
|
898
|
+
warnings.push('{{ unsterile_run_warning }}');
|
|
899
|
+
}
|
|
900
|
+
|
|
900
901
|
// Check if mandatory modules are deselected (from step 3)
|
|
901
902
|
const missingMandatoryModules = mandatoryModules.filter(m => !selectedModules.includes(m));
|
|
902
903
|
if (missingMandatoryModules.length > 0) {
|
|
903
904
|
warnings.push('Missing mandatory modules: ' + missingMandatoryModules.join(', '));
|
|
904
905
|
}
|
|
905
906
|
|
|
906
|
-
// Check if mandatory
|
|
907
|
+
// Check if schema-mandatory modules are deselected
|
|
908
|
+
if (mandatoryModulesBySchema && mandatoryModulesBySchema.length > 0) {
|
|
909
|
+
const missingBySchema = mandatoryModulesBySchema.filter(m => !selectedModules.includes(m));
|
|
910
|
+
if (missingBySchema.length > 0) {
|
|
911
|
+
warnings.push('Missing modules mandatory by schema: ' + missingBySchema.join(', '));
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
// Check if mandatory tests from selected modules are deselected
|
|
916
|
+
// When a module is selected, its mandatory tests become mandatory
|
|
907
917
|
const missingMandatoryTests = mandatoryTests
|
|
908
918
|
.filter(t => selectedModules.includes(t.module) && !selectedTests.includes(t.id))
|
|
909
919
|
.map(t => t.label + ' (' + t.module + ')');
|
|
910
920
|
if (missingMandatoryTests.length > 0) {
|
|
911
|
-
warnings.push('Missing mandatory tests: ' + missingMandatoryTests.length + ' test(s)');
|
|
921
|
+
warnings.push('Missing mandatory tests from selected modules: ' + missingMandatoryTests.length + ' test(s)');
|
|
912
922
|
}
|
|
913
923
|
|
|
914
924
|
if (warnings.length > 0) {
|
|
@@ -1035,6 +1045,18 @@
|
|
|
1035
1045
|
if (stepNum === 3) checkStep3Validation();
|
|
1036
1046
|
if (stepNum === 4) checkStep4Validation();
|
|
1037
1047
|
}
|
|
1048
|
+
|
|
1049
|
+
// Unsterile run checkbox change
|
|
1050
|
+
const unsterileRunField = document.querySelector('input[id*="unsterile_run"], input[name*="unsterile_run"]');
|
|
1051
|
+
if (unsterileRunField && e.target === unsterileRunField) {
|
|
1052
|
+
// Show/hide warning and update validation
|
|
1053
|
+
const warningDiv = document.getElementById('step4_warning');
|
|
1054
|
+
const warningText = document.getElementById('step4_warning_text');
|
|
1055
|
+
if (warningDiv && warningText) {
|
|
1056
|
+
// Re-run validation to update warning
|
|
1057
|
+
if (stepNum === 4) checkStep4Validation();
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1038
1060
|
});
|
|
1039
1061
|
|
|
1040
1062
|
// Initialize params visibility for pre-checked tests
|
|
@@ -1067,17 +1089,25 @@
|
|
|
1067
1089
|
const fieldName = `${brgCertSchema.title}_${field.name}`;
|
|
1068
1090
|
let fieldValue = null;
|
|
1069
1091
|
|
|
1070
|
-
// Special handling for custom_broker
|
|
1092
|
+
// Special handling for custom_broker - check if all required broker fields have values (like dut)
|
|
1093
|
+
// Username and password are optional, all other fields are required
|
|
1071
1094
|
if (field.name === 'custom_broker') {
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
//
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
fieldValue = 'exists';
|
|
1095
|
+
const brokerFieldPrefix = `${brgCertSchema.title}_custom_broker_`;
|
|
1096
|
+
const optionalFields = ['username', 'password'];
|
|
1097
|
+
let allRequiredFieldsFilled = true;
|
|
1098
|
+
for (const brokerField of customBrokerFieldKeys) {
|
|
1099
|
+
// Skip optional fields
|
|
1100
|
+
if (optionalFields.includes(brokerField)) {
|
|
1101
|
+
continue;
|
|
1080
1102
|
}
|
|
1103
|
+
const input = document.querySelector(`input[name="${brokerFieldPrefix}${brokerField}"]`);
|
|
1104
|
+
if (!input || !input.value || (typeof input.value === 'string' && !input.value.trim())) {
|
|
1105
|
+
allRequiredFieldsFilled = false;
|
|
1106
|
+
break;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
if (allRequiredFieldsFilled) {
|
|
1110
|
+
fieldValue = 'configured';
|
|
1081
1111
|
}
|
|
1082
1112
|
} else {
|
|
1083
1113
|
// For other fields, check input/select value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wiliot_certificate
|
|
3
|
-
Version: 4.5.
|
|
3
|
+
Version: 4.5.0a4
|
|
4
4
|
Summary: A library for certifying Wiliot-compliant boards
|
|
5
5
|
Author-email: Wiliot <support@wiliot.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -30,7 +30,7 @@ Requires-Dist: reportlab>=4.3.1
|
|
|
30
30
|
Requires-Dist: google-api-python-client>=2.162.0
|
|
31
31
|
Dynamic: license-file
|
|
32
32
|
|
|
33
|
-
# wiliot-certificate
|
|
33
|
+
# wiliot-certificate
|
|
34
34
|
|
|
35
35
|
<!-- Description -->
|
|
36
36
|
wiliot-certificate is a Python library that provides tools for testing and certifying boards for compatibility with Wiliot’s ecosystem.
|
|
@@ -40,30 +40,27 @@ This python package includes the following tools:
|
|
|
40
40
|
- Tester Upgrade (`wlt-cert-tester-upgrade`)
|
|
41
41
|
- Registration Certificate (`wlt-cert-reg`)
|
|
42
42
|
|
|
43
|
-
#
|
|
44
|
-
wiliot-certificate versions 4.5.
|
|
43
|
+
# Versioning:
|
|
44
|
+
wiliot-certificate versions 4.5.x are compatible with firmware version >=4.5.0 (API VERSION: 13)
|
|
45
45
|
|
|
46
46
|
## Installing wiliot-certificate
|
|
47
|
-
Install wiliot-certificate:
|
|
48
47
|
````commandline
|
|
49
48
|
pip install wiliot-certificate
|
|
50
49
|
````
|
|
51
50
|
|
|
52
51
|
## Using wiliot-certificate
|
|
53
52
|
### Certification
|
|
54
|
-
In terminal, run:
|
|
55
53
|
````commandline
|
|
56
54
|
wlt-cert
|
|
57
55
|
````
|
|
58
56
|
This tool is the default to test and certify your device.
|
|
59
57
|
It runs a setup wizard that walks you through the initialization steps before running the tests.
|
|
60
|
-
You'll need a [validation schema](https://community.wiliot.com/customers/s/article/Validation-Schema), tester device and custom broker json file (
|
|
58
|
+
You'll need a [validation schema](https://community.wiliot.com/customers/s/article/Validation-Schema), tester device and custom broker json file (more info [here](https://community.wiliot.com/customers/s/article/Wiliot-Certification)).
|
|
61
59
|
Once set up it opens a terminal and tests your device.
|
|
62
60
|
|
|
63
61
|
|
|
64
62
|
|
|
65
63
|
### Certificate CLI
|
|
66
|
-
In terminal, run:
|
|
67
64
|
````commandline
|
|
68
65
|
wlt-cert-cli -h
|
|
69
66
|
````
|
|
@@ -71,7 +68,6 @@ CLI version of the certificate. Use -h for details on the different arguments.
|
|
|
71
68
|
|
|
72
69
|
|
|
73
70
|
### Tester Upgrade
|
|
74
|
-
In terminal, run:
|
|
75
71
|
````commandline
|
|
76
72
|
wlt-cert-tester-upgrade
|
|
77
73
|
````
|
|
@@ -79,13 +75,12 @@ Upgrades the firmware of the tester device to the version required for certifica
|
|
|
79
75
|
|
|
80
76
|
|
|
81
77
|
### Registration Certificate
|
|
82
|
-
In terminal, run:
|
|
83
78
|
````commandline
|
|
84
79
|
wlt-cert-reg
|
|
85
80
|
````
|
|
86
81
|
Certify the gateway registration process to Wiliot platform.
|
|
87
82
|
The gateway must use Wiliot production MQTT broker, and mustn't be registered to any account on Wiliot platform.
|
|
88
|
-
Use -h for details on the arguments
|
|
83
|
+
Use -h for details on the arguments (see [Registration](https://community.wiliot.com/customers/s/article/Wiliot-Certification) for more info).
|
|
89
84
|
|
|
90
85
|
|
|
91
86
|
## The following capabilities are not tested in this version
|