You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
718 B

AUTHOR = "Autotest Team <autotest@test.kernel.org>"
TIME = "SHORT"
NAME = "Sample - More profilers"
TEST_TYPE = "client"
TEST_CLASS = "Kernel"
TEST_CATEGORY = "Functional"
DOC = """
Runs sleeptest with differnt profilers present in the autotest tree. Also,
it shows the convenience logging methods, such as logging.info and
logging.error.
"""
import logging
for profiler in ('readprofile', 'oprofile', 'catprofile', 'lockmeter'):
try:
logging.info("Testing profiler %s", profiler)
job.profilers.add(profiler)
job.run_test('sleeptest', seconds=5, tag=profiler)
job.profilers.delete(profiler)
except:
logging.error("Test of profiler %s failed", profiler)
raise