diff options
Diffstat (limited to 'test/004-JniTest')
| -rw-r--r--[-rwxr-xr-x] | test/004-JniTest/build.py (renamed from test/004-JniTest/build) | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/004-JniTest/build b/test/004-JniTest/build.py index 460f2db5f8..b701d5afb3 100755..100644 --- a/test/004-JniTest/build +++ b/test/004-JniTest/build.py @@ -1,6 +1,5 @@ -#!/bin/bash # -# Copyright 2017 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,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import shutil, os + # # Perform a mostly normal build. # Since this test imports 'dalvik.annotation.optimization.FastNative' (and CriticalNative), @@ -25,12 +26,13 @@ # has a different ABI and cannot be tested on RI. # -# Stop on failure. -set -e # Use release mode to check optimizations do not break JNI. -export D8_FLAGS=--release -./default-build "$@" +def build(ctx): + ctx.default_build(d8_flags=["--release"]) -# Remove the *-aotex build artifacts (but keep src-aotex) with dalvik.* annotations. -rm -rf classes-aotex classes-aotex.jar $TEST_NAME-aotex.jar + # Remove the *-aotex build artifacts (but keep src-aotex) with dalvik.* annotations. + shutil.rmtree(ctx.test_dir / "classes-aotex") + if not ctx.jvm: + os.remove(ctx.test_dir / "classes-aotex.jar") + os.remove(ctx.test_dir / "004-JniTest-aotex.jar") |