Skip to content

Commit 1a9a825

Browse files
committed
Make it a test local variable
1 parent a9089be commit 1a9a825

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

test/unit/plist_res/test_path_resolution.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@
2424
from common.base import TestBase
2525
from src.codechecker_script import fix_path_with_regex
2626

27-
PATH_RESOLUTION: Dict[str, str] = {
28-
# {Remote execution absolute path}: {project relative path}
29-
"/worker/build/5d2c60d87885b089/root/test/unit/legacy/src/lib.cc": "test/unit/legacy/src/lib.cc",
30-
"/worker/build/a0ed5e04f7c3b444/root/test/unit/legacy/src/ctu.cc": "test/unit/legacy/src/ctu.cc",
31-
"/worker/build/a0ed5e04f7c3b444/root/test/unit/legacy/src/fail.cc": "test/unit/legacy/src/fail.cc",
32-
# This resolution is impossible, because "test_inc" => "inc" cannot be resolved
33-
# "/worker/build/28e82627f5078a2d/root/bazel-out/k8-fastbuild/bin/test/unit/virtual_include/_virtual_includes/test_inc/zeroDiv.h": "test/unit/virtual_include/inc/zeroDiv.h"
34-
}
35-
3627

3728
class TestPathResolve(TestBase):
3829
"""Test regex resolution of remote execution paths"""
@@ -52,7 +43,15 @@ def test_remote_worker_path_resolution(self):
5243
Test: Resolve absolute path of remote worker
5344
to a relative path of the original project
5445
"""
55-
test_on : Dict[str, str] = PATH_RESOLUTION.copy()
46+
test_path_collection: Dict[str, str] = {
47+
# {Remote execution absolute path}: {project relative path}
48+
"/worker/build/5d2c60d87885b089/root/test/unit/legacy/src/lib.cc": "test/unit/legacy/src/lib.cc",
49+
"/worker/build/a0ed5e04f7c3b444/root/test/unit/legacy/src/ctu.cc": "test/unit/legacy/src/ctu.cc",
50+
"/worker/build/a0ed5e04f7c3b444/root/test/unit/legacy/src/fail.cc": "test/unit/legacy/src/fail.cc",
51+
# This resolution is impossible, because "test_inc" => "inc" cannot be resolved
52+
# "/worker/build/28e82627f5078a2d/root/bazel-out/k8-fastbuild/bin/test/unit/virtual_include/_virtual_includes/test_inc/zeroDiv.h": "test/unit/virtual_include/inc/zeroDiv.h"
53+
}
54+
test_on: Dict[str, str] = test_path_collection.copy()
5655
for before, res in test_on.items():
5756
after: str = fix_path_with_regex(before[:])
5857
# FIXME: change to assertEqual

0 commit comments

Comments
 (0)