test-framework: force using linux paths in TF

Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
Kamil Gierszewski 2025-04-01 13:50:23 +02:00
parent 1d7589644a
commit e6b4eaa6a3
No known key found for this signature in database
2 changed files with 9 additions and 6 deletions

View File

@ -1,13 +1,15 @@
#
# 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
#
from pathlib import Path
from pathlib import PurePosixPath
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):
TestRun.executor.run_expect_success(f"systemctl enable {name}")

View File

@ -1,11 +1,12 @@
#
# Copyright(c) 2022 Intel Corporation
# Copyright(c) 2025 Huawei Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
from textwrap import dedent
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.fs_tools import (
@ -17,7 +18,7 @@ from test_tools.fs_tools import (
class EmergencyEscape:
escape_marker = "EMERGENCY_ESCAPE"
escape_service = Path("emergency-escape.service")
escape_service = PurePosixPath("emergency-escape.service")
escape_service_template = Template(
dedent(
f"""
@ -38,7 +39,7 @@ class EmergencyEscape:
"""
).strip()
)
cleanup_service = Path("emergency-escape-cleanup.service")
cleanup_service = PurePosixPath("emergency-escape-cleanup.service")
cleanup_service_template = Template(
dedent(
"""