Merge pull request #38 from Kamoppl/kamilg/fix_paths_type
test-framework: force TF to use linux path
This commit is contained in:
commit
ace1ff49d4
@ -1,13 +1,15 @@
|
|||||||
#
|
#
|
||||||
# Copyright(c) 2019-2022 Intel Corporation
|
# Copyright(c) 2019-2022 Intel Corporation
|
||||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
# Copyright(c) 2024-2025 Huawei Technologies Co., Ltd.
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import PurePosixPath
|
||||||
|
|
||||||
from core.test_run import TestRun
|
from core.test_run import TestRun
|
||||||
|
|
||||||
systemd_service_directory = Path("/usr/lib/systemd/system/")
|
systemd_service_directory = PurePosixPath("/usr/lib/systemd/system/")
|
||||||
|
|
||||||
|
|
||||||
def enable_service(name):
|
def enable_service(name):
|
||||||
TestRun.executor.run_expect_success(f"systemctl enable {name}")
|
TestRun.executor.run_expect_success(f"systemctl enable {name}")
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Copyright(c) 2022 Intel Corporation
|
# Copyright(c) 2022 Intel Corporation
|
||||||
|
# Copyright(c) 2025 Huawei Corporation
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from string import Template
|
from string import Template
|
||||||
from pathlib import Path
|
from pathlib import PurePosixPath
|
||||||
|
|
||||||
from test_tools.systemctl import enable_service, reload_daemon, systemd_service_directory
|
from test_tools.systemctl import enable_service, reload_daemon, systemd_service_directory
|
||||||
from test_tools.fs_tools import (
|
from test_tools.fs_tools import (
|
||||||
@ -17,7 +18,7 @@ from test_tools.fs_tools import (
|
|||||||
|
|
||||||
class EmergencyEscape:
|
class EmergencyEscape:
|
||||||
escape_marker = "EMERGENCY_ESCAPE"
|
escape_marker = "EMERGENCY_ESCAPE"
|
||||||
escape_service = Path("emergency-escape.service")
|
escape_service = PurePosixPath("emergency-escape.service")
|
||||||
escape_service_template = Template(
|
escape_service_template = Template(
|
||||||
dedent(
|
dedent(
|
||||||
f"""
|
f"""
|
||||||
@ -38,7 +39,7 @@ class EmergencyEscape:
|
|||||||
"""
|
"""
|
||||||
).strip()
|
).strip()
|
||||||
)
|
)
|
||||||
cleanup_service = Path("emergency-escape-cleanup.service")
|
cleanup_service = PurePosixPath("emergency-escape-cleanup.service")
|
||||||
cleanup_service_template = Template(
|
cleanup_service_template = Template(
|
||||||
dedent(
|
dedent(
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user