ectools temps should include units |
||||
Issue descriptionCurrently, 'ectool temps all' just prints "300". This may easily be mistakenly read as tenth of degree C (30.0 C), as the value appears to make sense (close to room temperature). However, the value is actually 300 K (27 C). Let's add the unit (K) in ectool output, and fix autotests that rely on the exact answer format.
,
Nov 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/bce7b5b4b69f5d397f6ee17b0400a31a4d385317 commit bce7b5b4b69f5d397f6ee17b0400a31a4d385317 Author: Nicolas Boichat <drinkcat@chromium.org> Date: Sat Nov 11 20:13:42 2017 ectool: Print temperature unit in ectool temps output Currently, 'ectool temps all|<n>' just prints "300". This may easily be mistakenly read as tenth of degree C (30.0 C), as the value appears to make sense (close to room temperature). However, the value is actually 300 K (27 C). CQ-DEPEND=CL:763578 BRANCH=none BUG= chromium:783845 TEST=ectool temps all shows temperature unit (K) Change-Id: I70f7f04d061cb1d4f741d59f8b48c7963dd8280f Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/763996 Reviewed-by: Shawn N <shawnn@chromium.org> [modify] https://crrev.com/bce7b5b4b69f5d397f6ee17b0400a31a4d385317/util/ectool.c
,
Nov 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/eebd1225a4b967e98ca417eb4e373ece67670f49 commit eebd1225a4b967e98ca417eb4e373ece67670f49 Author: Nicolas Boichat <drinkcat@google.com> Date: Sat Nov 11 20:13:42 2017 utils: Allow ectool temps all to show units To reduce potential confusion, ectool temps all now includes temperature unit. Adjust get_ec_temperatures to handle that. BUG= chromium:783845 TEST=python >>> pattern = re.compile('.*: (\d+)') >>> line='0: 300' >>> matched = pattern.match(line) >>> int(matched.group(1)) - 273 27 >>> line='0: 300 K' >>> matched = pattern.match(line) >>> int(matched.group(1)) - 273 27 Change-Id: Ia8bd34dbef18ccdc23d58729eb45b0ab4edd002b Reviewed-on: https://chromium-review.googlesource.com/763578 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> [modify] https://crrev.com/eebd1225a4b967e98ca417eb4e373ece67670f49/client/bin/utils.py
,
Nov 14 2017
,
Jan 22 2018
,
Jan 23 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by drinkcat@chromium.org
, Nov 10 2017