Remove RBE toolchain_inputs bug work-around
Bug: 227376947
Test: m art-run-test-{host,target,jvm}-data
Change-Id: I944258dd5ed7aab9762e141749bc99cf5585b1a9
diff --git a/test/art_build_rules.py b/test/art_build_rules.py
index 9d2da64..765289d 100644
--- a/test/art_build_rules.py
+++ b/test/art_build_rules.py
@@ -31,6 +31,7 @@
import zipfile
from shutil import rmtree
from os import remove
+from re import match
USE_RBE_FOR_JAVAC = 100 # Percentage of tests that can use RBE (between 0 and 100)
USE_RBE_FOR_D8 = 100 # Percentage of tests that can use RBE (between 0 and 100)
@@ -129,6 +130,7 @@
if p.returncode != 0:
raise Exception("Command failed with exit code {}\n$ {}\n{}".format(
p.returncode, " ".join(cmd), p.stdout))
+ return p
# Helper functions to execute tools.
@@ -141,6 +143,10 @@
hiddenapi = functools.partial(run, os.environ["HIDDENAPI"])
if "RBE_server_address" in os.environ:
+ version = match(r"Version: (\d*)\.(\d*)\.(\d*)", run(RBE_rewrapper, ["--version"]).stdout)
+ assert version, "Could not parse RBE version"
+ assert tuple(map(int, version.groups())) >= (0, 76, 0), "Please update " + RBE_rewrapper
+
def rbe_wrap(args, inputs=set()):
with tempfile.NamedTemporaryFile(mode="w+t", dir=RBE_exec_root) as input_list:
for arg in args:
@@ -166,9 +172,7 @@
output = path.relpath(path.join(CWD, args[args.index("--output") + 1]), RBE_exec_root)
return rbe_wrap([
"--output_files" if output.endswith(".jar") else "--output_directories", output,
- "--toolchain_inputs=prebuilts/jdk/jdk11/linux-x86/bin/java"
- # TODO(dsrbecky): Work around bug b/227376947 ; Remove this when it is fixed.
- + ",../../../../../../../../prebuilts/jdk/jdk11/linux-x86/bin/java",
+ "--toolchain_inputs=prebuilts/jdk/jdk11/linux-x86/bin/java",
os.path.relpath(os.environ["D8"], CWD)] + args, inputs)
# If wrapper script exists, use it instead of the default javac.