check_serial_number¶
Source code: check_serial_number.py
Checks if serial number is set correctly on a device.
Description¶
Some tests, for example, RF graphyte, assume DUTs have MLB serial number available (in VPD and device data). And the test will fail if a DUT doesn’t have MLB SN (e.g. it skipped previous station).
This test gets serial number from different sources and check if they are equal.
Test Procedure¶
This is an automated test. It requires user interaction only if the test failed, or if the “manual_check” flag is turned on. This test will,
try to connect to device’s state server
the device must have device_id
get SN from state server
get SN from VPD
these two SN must match
Dependency¶
SSH connection (if we are checking remote device)
DUT is running factory software
Examples¶
This test is already defined as “CheckSerialNumber” in generic_common.test_list.json and “StationCheckSerialNumber” in station_based.test_list.json. This test is turned on by default in station based test list. You can disable it by setting constants.check_serial_number to false:
{
"constants": {
"check_serial_number": false
}
}
By default, this pytest checks mlb_serial_number. If you want to check serial number instead:
{
"pytest_name": "check_serial_number",
"args": {
"sn_name": "serial_number"
}
}
By default, this pytest passes if the serial numbers match. If you want additional manual confirmation (e.g. also match the serial number printed on the device):
{
"pytest_name": "check_serial_number",
"args": {
"manual_check": true
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
sn_name |
str |
(optional; default: |
manual_check |
bool |
(optional; default: |