summaryrefslogtreecommitdiff
path: root/test/968-default-partial-compile-gen
diff options
context:
space:
mode:
Diffstat (limited to 'test/968-default-partial-compile-gen')
-rw-r--r--test/968-default-partial-compile-gen/build.py23
-rw-r--r--test/968-default-partial-compile-gen/expected-stdout.txt2
-rwxr-xr-xtest/968-default-partial-compile-gen/generate-sources (renamed from test/968-default-partial-compile-gen/build)2
-rwxr-xr-xtest/968-default-partial-compile-gen/util-src/generate_java.py3
4 files changed, 24 insertions, 6 deletions
diff --git a/test/968-default-partial-compile-gen/build.py b/test/968-default-partial-compile-gen/build.py
new file mode 100644
index 0000000000..435be542a6
--- /dev/null
+++ b/test/968-default-partial-compile-gen/build.py
@@ -0,0 +1,23 @@
+#
+# 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.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+
+
+def build(ctx):
+ ctx.bash("./generate-sources --" + ctx.mode)
+ if ctx.jvm:
+ return
+ ctx.default_build(api_level="default-methods")
diff --git a/test/968-default-partial-compile-gen/expected-stdout.txt b/test/968-default-partial-compile-gen/expected-stdout.txt
index 1ddd65d177..c146358669 100644
--- a/test/968-default-partial-compile-gen/expected-stdout.txt
+++ b/test/968-default-partial-compile-gen/expected-stdout.txt
@@ -1 +1 @@
-This file is generated by util-src/generate_smali.py do not directly modify!
+[DO_NOT_UPDATE] This file is generated by util-src/generate_smali.py do not directly modify!
diff --git a/test/968-default-partial-compile-gen/build b/test/968-default-partial-compile-gen/generate-sources
index 04532b0ffc..83aad655d7 100755
--- a/test/968-default-partial-compile-gen/build
+++ b/test/968-default-partial-compile-gen/generate-sources
@@ -31,6 +31,4 @@ else
mkdir -p ./smali
# Generate the smali files and expected-stdout.txt or fail
./util-src/generate_smali.py ./smali ./expected-stdout.txt
- # Use the default build script
- ./default-build "$@" --experimental default-methods
fi
diff --git a/test/968-default-partial-compile-gen/util-src/generate_java.py b/test/968-default-partial-compile-gen/util-src/generate_java.py
index a4a4a4dce0..6027df9ba9 100755
--- a/test/968-default-partial-compile-gen/util-src/generate_java.py
+++ b/test/968-default-partial-compile-gen/util-src/generate_java.py
@@ -69,7 +69,6 @@ class Compiler:
files = list(map(str, files))
cmd = ['sh', '-a', '-e', '--', str(self.javac)] + args + sorted(files)
subprocess.check_call(cmd)
- print("Compiled {} files".format(len(files)))
def execute(self):
"""
@@ -104,7 +103,6 @@ class Compiler:
self.compile_files("-d {outdir} -cp {outdir}".format(outdir = self.classes_dir), files)
# Remove these from the set of interfaces to be compiled.
ifaces -= tops
- print("Finished compiling all files.")
return
def main(argv):
@@ -125,7 +123,6 @@ def main(argv):
with expected_txt.open('w') as out:
print(mainclass.get_expected(), file=out)
- print("Wrote expected output")
Compiler(all_files, javac_exec, temp_dir, classes_dir).execute()