blob: 5ed545fc017d42c617224825ff28d6db23cceb17 [file] [log] [blame]
Eric Lie0493a42010-11-15 13:05:43 -08001AUTHOR = "Autotest Team <autotest@test.kernel.org>"
2TIME = "SHORT"
3NAME = "Sample - More profilers"
4TEST_TYPE = "client"
5TEST_CLASS = "Kernel"
6TEST_CATEGORY = "Functional"
7
8DOC = """
9Runs sleeptest with differnt profilers present in the autotest tree. Also,
10it shows the convenience logging methods, such as logging.info and
11logging.error.
12"""
13
14import logging
15
16for profiler in ('readprofile', 'oprofile', 'catprofile', 'lockmeter'):
17 try:
18 logging.info("Testing profiler %s", profiler)
19 job.profilers.add(profiler)
20 job.run_test('sleeptest', seconds=5, tag=profiler)
21 job.profilers.delete(profiler)
22 except:
23 logging.error("Test of profiler %s failed", profiler)
24 raise