Work around RBE regression: Disable some RBE for some uses of D8.
RBE produces the wrong output (different to local run).
Bug: 307932183
Test: Local build output matches again.
Change-Id: Ifefc62ad644abd4c872bee5d875742e82ed38db2
diff --git a/test/run_test_build.py b/test/run_test_build.py
index 3037c82..e1f6e73 100755
--- a/test/run_test_build.py
+++ b/test/run_test_build.py
@@ -88,7 +88,11 @@
if "RBE_server_address" in os.environ and USE_RBE > (hash(self.test_name) % 100):
self.rbe_exec_root = os.environ.get("RBE_exec_root")
self.rbe_rewrapper = self.android_build_top / "prebuilts/remoteexecution-client/live/rewrapper"
- if self.test_name not in RBE_D8_DISABLED_FOR:
+
+ # TODO(b/307932183) Regression: RBE produces wrong output for D8 in ART
+ disable_d8 = any((self.test_dir / n).exists() for n in ["classes", "src2", "src-art"])
+
+ if self.test_name not in RBE_D8_DISABLED_FOR and not disable_d8:
self.d8 = functools.partial(self.rbe_d8, args.d8.absolute())
self.javac = functools.partial(self.rbe_javac, self.javac_path)
self.smali = functools.partial(self.rbe_smali, args.smali.absolute())