Skip to content

Commit 51cce81

Browse files
committed
Fix run-integ-test script to filter out non-java file changes
1 parent 503fae3 commit 51cce81

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

scripts/run-integ-test

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,30 @@ def check_diffs():
2020
"""
2121
Retrieve the changed files
2222
"""
23-
ret = Popen(["git", "diff", "HEAD^", "--name-only"], stdout=PIPE)
23+
process = Popen(["git", "diff", "HEAD^", "--name-only"], stdout=PIPE)
2424

25-
diff, stderr = ret.communicate()
25+
diff, stderr = process.communicate()
26+
27+
if process.returncode !=0:
28+
raise Exception("Unable to do git diff")
2629
return diff.splitlines(False)
2730

2831
def get_modules(file_path):
2932
"""
3033
Parse the changed file path and get the respective module names
3134
"""
3235
path = file_path.split('/')
36+
37+
# filter out non-java file
38+
if not path[-1].endswith(".java"):
39+
return
40+
3341
top_directory = path[0]
3442

3543
if top_directory in ["core", "codegen"]:
3644
return core_modules_to_test
3745
if top_directory in ["http-clients"]:
38-
return http_modules_to_test[path[1]]
46+
return http_modules_to_test.get(path[1])
3947
elif top_directory== "services":
4048
return path[1]
4149

0 commit comments

Comments
 (0)