=== modified file 'doc/changes.rst'
@@ -6,6 +6,8 @@
Version 0.7 (UNRELEASED)
========================
+* Add perf test
+
.. _version_0_6:
Version 0.6
=== modified file 'lava_test/test_definitions/perf.py'
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2011 Linaro
+# Copyright (c) 2010-2012 Linaro
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-A simple test for the perf performance counters subsystem in Linux. This
-currently just runs 'perf test' sanity tests built into the perf tool
+A simple test for the perf performance counters subsystem in Linux. This
+currently executes various perf commands built into the perf tool
-**URL:** None
+**URL:** https://code.launchpad.net/~linaro-maintainers/lava-test/lava-test-perf
**Default options:** None
"""
@@ -28,20 +28,18 @@
from lava_test.core.tests import Test
DEFAULT_OPTIONS = ""
-DEPS = ["linux-tools"]
-
-RUNSTEPS = [
- ("export PERFBIN=`find /usr/bin/ -name perf_*"
- " | sort -r"
- " | head -n 1"
- " | xargs basename`;"
- " $PERFBIN test 2>&1 $(OPTIONS)")]
-
-PATTERN = "^ \d+:\s+(?P<test_case_id>[\w\s]+):\W+(?P<message>\w+)"
-
-installer = TestInstaller(deps=DEPS)
+DEPS = ["linux-tools", "stress"]
+INSTALLSTEPS = ["bzr branch lp:~linaro-maintainers/lava-test/lava-test-perf"]
+RUNSTEPS = ["cp lava-test-perf/run-perf-test.sh .; sudo bash ./run-perf-test.sh"]
+PATTERN = "^(?P<test_case_id>[\w\s-]+)\s+:\s+(?P<result>\w+)"
+FIXUPS = {
+ "PASS": "pass",
+ "FAIL": "fail"
+}
+
+installer = TestInstaller(INSTALLSTEPS, deps=DEPS)
runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS)
-parser = TestParser(PATTERN, appendall={"result": "pass"})
+parser = TestParser(PATTERN, fixupdict=FIXUPS)
testobj = Test(
test_id="perf",