Index: client/common_lib/site_power_status.py |
diff --git a/client/common_lib/site_power_status.py b/client/common_lib/site_power_status.py |
index aa4c0e127e3f5455dda22b97e72703c635f9928b..488aa562cc7f4e47643a5433c2c05bcf03818aa5 100644 |
--- a/client/common_lib/site_power_status.py |
+++ b/client/common_lib/site_power_status.py |
@@ -90,6 +90,10 @@ class BatteryStat(DevStat): |
self.voltage_min_design = self.voltage_min_design / 1000000 |
self.voltage_now = self.voltage_now / 1000000 |
+ if self.charge_full > (self.charge_full_design * 1.5): |
+ raise error.TestError('Unreasonable charge_full value') |
+ if self.charge_now > (self.charge_full_design * 1.5): |
+ raise error.TestError('Unreasonable charge_now value') |
self.energy = self.voltage_now * self.charge_now |
self.energy_full = self.voltage_now * self.charge_full |
self.energy_full_design = self.voltage_now * self.charge_full_design |