Convert run-test bash build scripts to python.
Tests use the build script for two distinct purposes:
* Some tests generate their source code before completion.
Keep this code in bash for now and rename it "generate-sources".
* To customize arguments passed to the default compilation script.
Since the default compilation script is in python, make this
a normal python call, and add any customization as arguments.
This speeds up the run-test compilation. There was small cost to
pay due to the switching from python to bash to python.
This added up for the thousands of run-test compilations that we do.
It also removes the need for argument parser in the default script.
We could also remove the data passing via environment (to-do later).
It moves the definition to more build-system-like look and feel.
Test: The outputs are bit-for-bit identical as before.
Change-Id: Idca4181a4676036f06aae0a8f6eea3a3c30d390e
diff --git a/test/715-clinit-implicit-parameter-annotations/build b/test/715-clinit-implicit-parameter-annotations/build.py
similarity index 77%
rename from test/715-clinit-implicit-parameter-annotations/build
rename to test/715-clinit-implicit-parameter-annotations/build.py
index 2b5f92c..19c759c 100644
--- a/test/715-clinit-implicit-parameter-annotations/build
+++ b/test/715-clinit-implicit-parameter-annotations/build.py
@@ -1,6 +1,5 @@
-#!/bin/bash
#
-# Copyright 2018 The Android Open Source Project
+# Copyright (C) 2022 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Make us exit on a failure
-set -e
+from art_build_rules import build_run_test
-./default-build "$@" --experimental parameter-annotations
+build_run_test(experimental="parameter-annotations")