|
|
@ -69,8 +69,11 @@ def parse_bazel_rule(elem, package): |
|
|
|
|
|
|
|
|
|
|
|
def read_bazel_build(package): |
|
|
|
def read_bazel_build(package): |
|
|
|
"""Runs bazel query on given package file and returns all cc rules.""" |
|
|
|
"""Runs bazel query on given package file and returns all cc rules.""" |
|
|
|
|
|
|
|
# Use a wrapper version of bazel in gRPC not to use system-wide bazel |
|
|
|
|
|
|
|
# to avoid bazel conflict when running on Kokoro. |
|
|
|
|
|
|
|
BAZEL_BIN = "../../tools/bazel" |
|
|
|
result = subprocess.check_output( |
|
|
|
result = subprocess.check_output( |
|
|
|
["bazel", "query", package + ":all", "--output", "xml"]) |
|
|
|
[BAZEL_BIN, "query", package + ":all", "--output", "xml"]) |
|
|
|
root = ET.fromstring(result) |
|
|
|
root = ET.fromstring(result) |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
parse_bazel_rule(elem, package) |
|
|
|
parse_bazel_rule(elem, package) |
|
|
|