diff options
-rw-r--r-- | lib/oeqa/runtime/cases/thermald.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/oeqa/runtime/cases/thermald.py b/lib/oeqa/runtime/cases/thermald.py index b0efecd8..a0b6a92b 100644 --- a/lib/oeqa/runtime/cases/thermald.py +++ b/lib/oeqa/runtime/cases/thermald.py | |||
@@ -19,7 +19,7 @@ class ThermaldTest(OERuntimeTestCase): | |||
19 | def run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process(self, run_args): | 19 | def run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process(self, run_args): |
20 | time.sleep(2) | 20 | time.sleep(2) |
21 | self.target.run('echo 106000 > /sys/class/thermal/thermal_zone%s/emul_temp' % run_args) | 21 | self.target.run('echo 106000 > /sys/class/thermal/thermal_zone%s/emul_temp' % run_args) |
22 | time.sleep(2) | 22 | time.sleep(5) |
23 | __, output = self.target.run('pidof thermald') | 23 | __, output = self.target.run('pidof thermald') |
24 | self.target.run('kill -9 %s' % output) | 24 | self.target.run('kill -9 %s' % output) |
25 | 25 | ||
@@ -27,7 +27,8 @@ class ThermaldTest(OERuntimeTestCase): | |||
27 | # Thermald test depend on thermal emulation, where CONFIG_THERMAL_EMULATION=y was required | 27 | # Thermald test depend on thermal emulation, where CONFIG_THERMAL_EMULATION=y was required |
28 | # To enable thermal emulation, refer to https://github.com/intel/thermal_daemon/blob/master/test/readme_test.txt | 28 | # To enable thermal emulation, refer to https://github.com/intel/thermal_daemon/blob/master/test/readme_test.txt |
29 | (status, output) = self.target.run('gzip -dc /proc/config.gz | grep CONFIG_THERMAL_EMULATION=y') | 29 | (status, output) = self.target.run('gzip -dc /proc/config.gz | grep CONFIG_THERMAL_EMULATION=y') |
30 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | 30 | if status: |
31 | self.skipTest("CONFIG_THERMAL_EMULATION is not set") | ||
31 | 32 | ||
32 | @OEHasPackage(['thermald']) | 33 | @OEHasPackage(['thermald']) |
33 | @OETestDepends(['thermald.ThermaldTest.test_thermald_emulation_mode']) | 34 | @OETestDepends(['thermald.ThermaldTest.test_thermald_emulation_mode']) |
@@ -38,7 +39,8 @@ class ThermaldTest(OERuntimeTestCase): | |||
38 | td_thread = threading.Thread(target=self.run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process, | 39 | td_thread = threading.Thread(target=self.run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process, |
39 | args=(x86_thermal_zone_index,)) | 40 | args=(x86_thermal_zone_index,)) |
40 | td_thread.start() | 41 | td_thread.start() |
41 | status, output = self.target.run('thermald --no-daemon --loglevel=info') | 42 | td_thread.join() |
43 | status, output = self.target.run('timeout 3s thermald --no-daemon --loglevel=info') | ||
42 | regex_search = ".*thd_cdev_set_state.*106000" | 44 | regex_search = ".*thd_cdev_set_state.*106000" |
43 | regex_comp = re.compile(regex_search) | 45 | regex_comp = re.compile(regex_search) |
44 | m = regex_comp.search(output) | 46 | m = regex_comp.search(output) |