info: read serial number and mlb number from DUT [chromiumos/platform/factory : master]

61 views
Skip to first unread message

ChromeOS Commit Bot (Gerrit)

unread,
Apr 18, 2016, 2:20:17 AM4/18/16
to Shun-Hsing Ou, Hung-Te Lin, Joel Kitching, ChromeOS bot, Wei-Han Chen
ChromeOS Commit Bot has submitted this change and it was merged.

Change subject: info: read serial number and mlb number from DUT
......................................................................


info: read serial number and mlb number from DUT

Read serial number or mlb serial number form DUT if there is no data on
the station.

BUG=None
TEST=Manually test on Lucid.

CQ-DEPEND=CL:333861,CL:333860

Change-Id: If4914db5429ae74cee054f49bf994abe7399062e
Reviewed-on: https://chromium-review.googlesource.com/334173
Commit-Ready: Shun-Hsing Ou <shunh...@chromium.org>
Tested-by: Shun-Hsing Ou <shunh...@chromium.org>
Reviewed-by: Wei-Han Chen <sti...@chromium.org>
---
M py/test/dut/info.py
1 file changed, 7 insertions(+), 1 deletion(-)



diff --git a/py/test/dut/info.py b/py/test/dut/info.py
index 828fdff..a4d8f44 100755
--- a/py/test/dut/info.py
+++ b/py/test/dut/info.py
@@ -121,12 +121,18 @@
@InfoProperty
def mlb_serial_number(self):
"""Mother board serial number."""
+ if not test.shopfloor.GetDeviceData().get('mlb_serial_number'):
+ serial = self._dut.storage.LoadDict().get('mlb_serial_number')
+ test.shopfloor.UpdateDeviceData({'mlb_serial_number': serial})
return test.shopfloor.GetDeviceData()['mlb_serial_number']

@InfoProperty
def serial_number(self):
"""Device serial number (usually printed on device package)."""
- return test.shopfloor.get_serial_number()
+ if not test.shopfloor.GetDeviceData().get('serial_number'):
+ serial = self._dut.storage.LoadDict().get('serial_number')
+ test.shopfloor.UpdateDeviceData({'serial_number': serial})
+ return test.shopfloor.GetDeviceData()['serial_number']

@InfoProperty
def stage(self):

--
To view, visit https://chromium-review.googlesource.com/334173
To unsubscribe, visit https://chromium-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If4914db5429ae74cee054f49bf994abe7399062e
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/platform/factory
Gerrit-Branch: master
Gerrit-Owner: Shun-Hsing Ou <shunh...@chromium.org>
Gerrit-Reviewer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Gerrit-Reviewer: ChromeOS bot
<3su6n15k...@developer.gserviceaccount.com>
Gerrit-Reviewer: Hung-Te Lin <hun...@chromium.org>
Gerrit-Reviewer: Joel Kitching <kitc...@chromium.org>
Gerrit-Reviewer: Shun-Hsing Ou <shunh...@chromium.org>
Gerrit-Reviewer: Wei-Han Chen <sti...@chromium.org>
Reply all
Reply to author
Forward
0 new messages