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/065-mismatched-implements/build.py b/test/065-mismatched-implements/build.py
index 4284d83..bc346b0 100644
--- a/test/065-mismatched-implements/build.py
+++ b/test/065-mismatched-implements/build.py
@@ -13,11 +13,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from art_build_rules import build_run_test
 
 # Don't use desugar because the build fails when it encounters ICCE.
 #
 # Exception in thread "main" java.lang.IllegalArgumentException
 #  at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
 #  at com.google.devtools.build.android.desugar.DefaultMethodClassFixer$DefaultMethodFinder.visit(DefaultMethodClassFixer.java:295)
-build_run_test(use_desugar=False)
+def build(ctx):
+  ctx.default_build(use_desugar=False)