aboutsummaryrefslogtreecommitdiff
path: root/tests/test_wa_sysfs_extractor.py
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2015-06-15 16:09:45 +0100
committerJavi Merino <javi.merino@arm.com>2015-08-13 18:59:56 +0100
commitb97695d7d3b59a7a7e82296d9149a8792e079b1d (patch)
treecad004342583b1257d94ed8f88b400fd51934c63 /tests/test_wa_sysfs_extractor.py
parent348fe16998eeaa82d45ca41b0003c69c9070b3d5 (diff)
downloadtrappy-b97695d7d3b59a7a7e82296d9149a8792e079b1d.tar.gz
sysfs_extractor: learn to print the parameters in a table
Change-Id: I4ab668309dc332c79ad660b1338e997534ed75e1
Diffstat (limited to 'tests/test_wa_sysfs_extractor.py')
-rw-r--r--tests/test_wa_sysfs_extractor.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_wa_sysfs_extractor.py b/tests/test_wa_sysfs_extractor.py
index ec644bb..7f2f12a 100644
--- a/tests/test_wa_sysfs_extractor.py
+++ b/tests/test_wa_sysfs_extractor.py
@@ -18,6 +18,8 @@ import subprocess
import utils_tests
+import cr2.wa
+
class TestWASysfsExtractor(utils_tests.SetupDirectory):
"""Test the WA specific interface to get parameters from a sysfs extractor"""
def __init__(self, *args, **kwargs):
@@ -33,11 +35,14 @@ class TestWASysfsExtractor(utils_tests.SetupDirectory):
def test_get_parameters(self):
"""Test that we can get the parameters of a sysfs extractor output"""
- from cr2.wa.sysfs_extractor import SysfsExtractor
-
os.chdir("..")
- thermal_params = SysfsExtractor(self.out_dir).get_parameters()
+ thermal_params = cr2.wa.SysfsExtractor(self.out_dir).get_parameters()
self.assertEquals(thermal_params["cdev0_weight"], 1024)
self.assertEquals(thermal_params["cdev1_weight"], 768)
self.assertEquals(thermal_params["trip_point_0_temp"], 72000)
self.assertEquals(thermal_params["policy"], "power_allocator")
+
+ def test_print_thermal_params(self):
+ """Test that printing the thermal params doesn't bomb"""
+
+ cr2.wa.SysfsExtractor(".").pretty_print_in_ipython()