Refactor individual run-test build scripts
Follow the same convention as run-test run scripts.
The python files shall export build function,
rather than doing the work when the script is loaded.
This has the advantage that we now pass context/arguments
to the function (rather than using environment variables).
Test: the generated build artefacts are identical
Change-Id: I90e0ef0d2e31b27813042d51d07b5ae132e1e704
diff --git a/test/714-invoke-custom-lambda-metafactory/build.py b/test/714-invoke-custom-lambda-metafactory/build.py
index 7563062..a792b73 100644
--- a/test/714-invoke-custom-lambda-metafactory/build.py
+++ b/test/714-invoke-custom-lambda-metafactory/build.py
@@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from art_build_rules import build_run_test
-build_run_test(use_desugar=False, experimental="method-handles")
+def build(ctx):
+ ctx.default_build(use_desugar=False, experimental="method-handles")