Add support for AOSP/D8 tests on Golem.
Bug:
Change-Id: Ic90534440f6ffb080fa447892b661702b71805a2
diff --git a/scripts/run_d8_on_aosp_echo_code_size.sh b/scripts/run_d8_on_aosp_echo_code_size.sh
new file mode 100755
index 0000000..51d4200
--- /dev/null
+++ b/scripts/run_d8_on_aosp_echo_code_size.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Compile AOSP jars with D8 (CompatDX) and print the code size in bytes
+
+set -e
+
+readonly DX_REPLAY="third_party/android_cts_baseline/dx_replay"
+
+"${DX_REPLAY}/replay_script.py" \
+ java -jar "build/libs/compatdx.jar" >/dev/null
+
+codesize=$(du -b -d 0 "third_party/android_cts_baseline/dx_replay/out" \
+ | grep -Eo "^[0-9]+")
+
+echo "Aosp(CodeSize): $codesize"
+
+