Skip to content

Commit c005288

Browse files
committed
tests: check_selftest: fix running the helper scripts
Signed-off-by: Jakub Kicinski <[email protected]>
1 parent af02b9f commit c005288

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/patch/check_selftest/test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def check_new_files_gitignore(tree, new_files, log):
8484

8585

8686
def _check_file_fmt(tree, path, script, result_dir, ident):
87-
cmd = [script, os.path.join(tree.path, path)]
87+
cmd = [os.path.join(LOCAL_DIR, script), os.path.join(tree.path, path)]
8888

8989
result = subprocess.run(cmd, cwd=LOCAL_DIR, capture_output=True,
9090
text=True, check=False)
@@ -106,12 +106,13 @@ def check_file_formats(tree, file_list, log, result_dir):
106106
script = "validate_config_format.py"
107107
fmt = f"fmt-gitignore-{i}"
108108
elif path.endswith("/Makefile"):
109-
script = "validate_Makefile_format.py"
109+
script = "validate_makefile_format.py"
110110
fmt = f"fmt-makefile-{i}"
111111
else:
112112
log.append("format check ignoring " + path)
113113
continue
114114

115+
i += 1
115116
if _check_file_fmt(tree, path, script, result_dir, fmt):
116117
ret = ret_merge(ret, (1, "Bad format: " + path))
117118

0 commit comments

Comments
 (0)