| <!DOCTYPE html> |
| <!-- |
| Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| |
| <link rel="import" href="/core/test_utils.html"> |
| <link rel="import" href="/extras/importer/linux_perf/linux_perf_importer.html"> |
| |
| <script> |
| 'use strict'; |
| |
| tv.b.unittest.testSuite(function() { |
| test('regulatorImport', function() { |
| var lines = [ |
| ' kworker/0:2H-14312 [000] ...1 143713.787749: ' + |
| 'regulator_set_voltage: name=krait0 (810000-1100000)', |
| ' kworker/0:2H-14312 [000] ...1 143713.787778: ' + |
| 'regulator_set_voltage_complete: name=krait0, val=810000', |
| ' kworker/0:2H-14312 [000] ...1 143714.037871: ' + |
| 'regulator_set_voltage: name=krait0 (800000-1100000)', |
| ' kworker/0:2H-14312 [000] ...1 143714.037895: ' + |
| 'regulator_set_voltage_complete: name=krait0, val=800000', |
| 'kworker/0:1-30321 [000] ...1 144568.624596: ' + |
| 'regulator_enable: name=8941_smbb_boost', |
| 'kworker/0:1-30321 [000] ...1 144568.624715: ' + |
| 'regulator_enable_delay: name=8941_smbb_boost', |
| 'kworker/0:1-30321 [000] ...1 144568.624723: ' + |
| 'regulator_enable_complete: name=8941_smbb_boost', |
| 'kworker/0:1-30321 [000] ...1 144568.653546: ' + |
| 'regulator_disable: name=8941_smbb_boost', |
| 'kworker/0:1-30321 [000] ...1 144568.654785: ' + |
| 'regulator_disable_complete: name=8941_smbb_boost' |
| ]; |
| var m = new tv.c.TraceModel(lines.join('\n'), false); |
| console.log(m.importWarnings); |
| assert.isFalse(m.hasImportWarnings); |
| |
| assert.property(m.kernel.counters, 'null.vreg krait0 voltage'); |
| assert.property(m.kernel.counters, 'null.vreg 8941_smbb_boost enabled'); |
| }); |
| }); |
| </script> |