Move test-framework to its own repository

Signed-off-by: Robert Baldyga <baldyga.r@gmail.com>
This commit is contained in:
Robert Baldyga
2023-05-01 18:55:34 +02:00
commit 40f08a369a
89 changed files with 9914 additions and 0 deletions

25
test_utils/systemd.py Normal file
View File

@@ -0,0 +1,25 @@
#
# Copyright(c) 2019-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
from pathlib import Path
from core.test_run import TestRun
systemd_service_directory = Path("/usr/lib/systemd/system/")
def enable_service(name):
TestRun.executor.run_expect_success(f"systemctl enable {name}")
def disable_service(name):
TestRun.executor.run_expect_success(f"systemctl disable {name}")
def reload_daemon():
TestRun.executor.run_expect_success("systemctl daemon-reload")
def restart_service(name):
TestRun.executor.run_expect_success(f"systemctl restart {name}")