tests: Wrappers for purge commands

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2020-05-11 06:24:40 -04:00
parent 3b62e40a2e
commit c28babde8b
4 changed files with 30 additions and 0 deletions

View File

@@ -79,6 +79,20 @@ def try_add(core_device: Device, cache_id: int):
return Core(core_device.system_path, cache_id)
def purge_cache(cache_id: int):
output = TestRun.executor.run(script_purge_cache(str(cache_id)))
if output.exit_code != 0:
raise CmdException("Purge cache failed.", output)
return output
def purge_core(cache_id: int, core_id: int):
output = TestRun.executor.run(script_purge_core(str(cache_id), str(core_id)))
if output.exit_code != 0:
raise CmdException("Purge core failed.", output)
return output
def reset_counters(cache_id: int, core_id: int = None, shortcut: bool = False):
_core_id = None if core_id is None else str(core_id)
output = TestRun.executor.run(