aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2014-04-02 16:23:23 +0100
committerJavi Merino <javi.merino@arm.com>2014-04-02 16:24:54 +0100
commit0af472170ef7121f15a45fe11671533078d25e97 (patch)
tree40c475f1dea9fbcf21d42747bc47aa733d3ccea2 /tests
parent1b74ef16b8da1476769fb4bc4dc32b8717b32bd9 (diff)
downloadtrappy-0af472170ef7121f15a45fe11671533078d25e97.tar.gz
thermal: don't depend on a trailing space in the trace
The test data we had had one for the trace_printk, but not for the other functions. That's wrong so fix the code and test cases.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_power.py1
-rw-r--r--tests/test_thermal.py6
-rw-r--r--tests/trace.datbin3162112 -> 3657728 bytes
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_power.py b/tests/test_power.py
index eb097f2..8c952d1 100644
--- a/tests/test_power.py
+++ b/tests/test_power.py
@@ -13,4 +13,5 @@ class TestPower(TestThermalBase):
df = power.Power().get_data_frame()
self.assertEquals(df["freq"][0], 800000)
+ self.assertEquals(df["power"][0], 0)
self.assertTrue("cdev_state" in df.columns)
diff --git a/tests/test_thermal.py b/tests/test_thermal.py
index bed4825..d366db7 100644
--- a/tests/test_thermal.py
+++ b/tests/test_thermal.py
@@ -39,11 +39,11 @@ class TestThermal(TestThermalBase):
def test_get_thermal_csv(self):
thermal.Thermal().write_thermal_csv()
- first_data_line = "267.525370,0,1244,144,1388,0,0,0,0,50000,7000\n"
+ first_data_line = "164.990777,0,1244,143,1387,0,0,0,0,50000,7000\n"
with open("thermal.csv") as f:
first_line = f.readline()
- self.assertTrue(first_line.startswith("time,Pa7_in"))
+ self.assertTrue(first_line.startswith("time,Pgpu_in"))
second_line = f.readline()
self.assertEquals(second_line, first_data_line)
@@ -54,7 +54,7 @@ class TestThermal(TestThermalBase):
self.assertEquals(df["currT"][0], 50000)
self.assertTrue("Ptot_out" in df.columns)
self.assertFalse("time" in df.columns)
- self.assertEquals(len(df), 3)
+ self.assertEquals(len(df), 5)
def test_plot_temp(self):
"""Test plot_temp()
diff --git a/tests/trace.dat b/tests/trace.dat
index cd00b6f..870cec7 100644
--- a/tests/trace.dat
+++ b/tests/trace.dat
Binary files differ