@@ -101,11 +101,10 @@ def _codechecker_impl(ctx):
101101 ctx .actions .expand_template (
102102 template = ctx .file ._codechecker_script_template ,
103103 output = ctx .outputs .codechecker_script ,
104- is_executable = True ,
104+ is_executable = False ,
105105 substitutions = {
106106 "{Mode}" : "Run" ,
107107 "{Verbosity}" : "DEBUG" ,
108- #"{PythonPath}": python_path(ctx), # "/usr/bin/env python3",
109108 "{codechecker_bin}" : CODECHECKER_BIN_PATH ,
110109 "{compile_commands}" : ctx .outputs .codechecker_commands .path ,
111110 "{codechecker_skipfile}" : ctx .outputs .codechecker_skipfile .path ,
@@ -130,8 +129,6 @@ def _codechecker_impl(ctx):
130129 codechecker_files ,
131130 ctx .outputs .codechecker_log ,
132131 ],
133- #executable = ctx.outputs.codechecker_script,
134- #arguments = [],
135132 executable = python_path (ctx ),
136133 tools = python_interpreter_tool (ctx ),
137134 arguments = [ctx .outputs .codechecker_script .path ],
@@ -235,13 +232,12 @@ def _codechecker_test_impl(ctx):
235232 substitutions = {
236233 "{Mode}" : "Test" ,
237234 "{Verbosity}" : "INFO" ,
238- #"{PythonPath}": python_path(ctx), # "/usr/bin/env python3",
239235 "{codechecker_bin}" : CODECHECKER_BIN_PATH ,
240236 "{codechecker_files}" : codechecker_files .short_path ,
241237 "{Severities}" : " " .join (ctx .attr .severities ),
242238 },
243239 )
244- # For use in script the short path must be used
240+ # For use in script the short path must be used (or absolute path)
245241 # For use in executable the full path
246242 python_interpreter_path = python_path (ctx )
247243 if python_interpreter_tool (ctx ) != []:
@@ -259,13 +255,15 @@ def _codechecker_test_impl(ctx):
259255 )
260256
261257 # Return test script and all required files
262- run_files = default_runfiles + [ctx .outputs .codechecker_test_script , ctx .outputs .test_script_wrapper ] + python_interpreter_tool (ctx )
258+ run_files = default_runfiles + [
259+ ctx .outputs .codechecker_test_script ,
260+ ctx .outputs .test_script_wrapper ,
261+ ] + python_interpreter_tool (ctx )
263262
264263 return [
265264 DefaultInfo (
266265 files = depset (all_files ),
267266 runfiles = ctx .runfiles (files = run_files ),
268- #executable = ctx.outputs.codechecker_test_script,
269267 executable = ctx .outputs .test_script_wrapper ,
270268 ),
271269 ]
0 commit comments