Skip to content

Commit 6a8ef77

Browse files
committed
Change regex for remote jobs
1 parent da32a04 commit 6a8ef77

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/codechecker_script.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@
2727
CODECHECKER_ENV = "{codechecker_env}"
2828
COMPILE_COMMANDS = "{compile_commands}"
2929

30-
START_PATH = r"\/(?:(?!\.\s+)\S)+"
3130
BAZEL_PATHS = {
32-
r"\/sandbox\/processwrapper-sandbox\/\S*\/execroot\/": "/execroot/",
33-
START_PATH + r"\/worker\/build\/[0-9a-fA-F]{16}\/root\/": "",
34-
START_PATH + r"\/[0-9a-fA-F]{32}\/execroot\/": "",
35-
# Running bazel with --spawn_strategy=processwrapper-sandbox
36-
# results in its path being wrongly replaced!
37-
# In that case the 1st then 3rd regex will match and leave the path in a
38-
# half baked state, this regex just finishes the job
39-
r"<string>bazel_codechecker\/": "<string>",
31+
# Running with Build Barn produces path output like:
32+
# /worker/build/b301eed7f2bf2fd8/root/local_path.cc
33+
# By removing the part until bin we have resolved the path to a local file
34+
r"\/worker\/build\/[a-z0-9]{16}\/root\/": "",
35+
# Sometimes the previous part is followed by this, before the local_path:
36+
r"bazel-out\/k8-fastbuild\/bin\/": "",
37+
# Virtual includes seems to be just a folder between the package and the
38+
# folder containing the header files, like this:
39+
# /path/to/package/_virtual_include/folder_with_headers/header.h
40+
r"\/_virtual_includes\/" : "/",
4041
}
4142

4243

0 commit comments

Comments
 (0)