Rename systemd to systemctl and move it to tools

Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
Katarzyna Treder
2024-12-10 14:46:04 +01:00
parent a6848ed825
commit ae9b036b47
3 changed files with 6 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ from textwrap import dedent
from string import Template
from pathlib import Path
from .systemd import enable_service, reload_daemon, systemd_service_directory, disable_service
from test_tools.systemctl import enable_service, reload_daemon, systemd_service_directory
from test_tools.fs_utils import (
create_file,
write_file,

View File

@@ -1,25 +0,0 @@
#
# 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}")