summaryrefslogtreecommitdiff
path: root/test/817-hiddenapi/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/817-hiddenapi/build.py')
-rw-r--r--test/817-hiddenapi/build.py31
1 files changed, 16 insertions, 15 deletions
diff --git a/test/817-hiddenapi/build.py b/test/817-hiddenapi/build.py
index 1de286ab26..df00bb8354 100644
--- a/test/817-hiddenapi/build.py
+++ b/test/817-hiddenapi/build.py
@@ -13,24 +13,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from art_build_rules import build_run_test, rm
import os
-# Build the jars twice. First with applying hiddenapi, creating a boot jar, then
-# a second time without to create a normal jar. We need to do this because we
-# want to load the jar once as an app module and once as a member of the boot
-# class path. The DexFileVerifier would fail on the former as it does not allow
-# hidden API access flags in dex files. DexFileVerifier is not invoked on boot
-# class path dex files, so the boot jar loads fine in the latter case.
-build_run_test(use_hiddenapi=True)
+def build(ctx):
+ # Build the jars twice. First with applying hiddenapi, creating a boot jar, then
+ # a second time without to create a normal jar. We need to do this because we
+ # want to load the jar once as an app module and once as a member of the boot
+ # class path. The DexFileVerifier would fail on the former as it does not allow
+ # hidden API access flags in dex files. DexFileVerifier is not invoked on boot
+ # class path dex files, so the boot jar loads fine in the latter case.
-# Move the jar file into the resource folder to be bundled with the test.
-os.mkdir("res")
-os.rename("817-hiddenapi.jar", "res/boot.jar")
+ ctx.default_build(use_hiddenapi=True)
-# Clear all intermediate files otherwise default-build would either skip
-# compilation or fail rebuilding.
-rm("classes*")
+ # Move the jar file into the resource folder to be bundled with the test.
+ os.mkdir("res")
+ os.rename("817-hiddenapi.jar", "res/boot.jar")
-build_run_test(use_hiddenapi=False)
+ # Clear all intermediate files otherwise default-build would either skip
+ # compilation or fail rebuilding.
+ ctx.bash("rm -rf classes*")
+
+ ctx.default_build(use_hiddenapi=False)