summaryrefslogtreecommitdiff
path: root/test/180-native-default-method/build.py
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2022-11-17 10:44:39 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-11-17 13:21:53 +0000
commitfeed4af7209fdb365cfd1927a9e8263e0456521e (patch)
tree9da8aa9616177e1881c4859cd215bc1a40ea3719 /test/180-native-default-method/build.py
parentbf31c39402673dfb3cec5e34688cc06a6252c0fb (diff)
Run test build: Move some helpers up to the instance
Move some of the helper methods to the test instance so that they can be used from the per-test run scripts. Test: Build artifacts are identical. Change-Id: Ieebd40390c34a9a9bb123e54e0b2b6cd410735f1
Diffstat (limited to 'test/180-native-default-method/build.py')
-rw-r--r--test/180-native-default-method/build.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/180-native-default-method/build.py b/test/180-native-default-method/build.py
index dd86a1fcfd..62aac82103 100644
--- a/test/180-native-default-method/build.py
+++ b/test/180-native-default-method/build.py
@@ -13,9 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import subprocess, os
-
-
def build(ctx):
ctx.default_build()
if ctx.jvm:
@@ -25,9 +22,8 @@ def build(ctx):
assert f.read(8) == b"dex\n038\x00"
f.seek(0)
f.write(b"dex\n035\x00")
- os.remove(ctx.test_dir / "180-native-default-method.jar")
- cmd = [
- ctx.soong_zip, "-o", ctx.test_dir / "180-native-default-method.jar", "-j",
+ (ctx.test_dir / "180-native-default-method.jar").unlink()
+ ctx.soong_zip([
+ "-o", ctx.test_dir / "180-native-default-method.jar", "-j",
"-f", ctx.test_dir / "classes.dex"
- ]
- subprocess.run(cmd, check=True)
+ ])