diff options
-rw-r--r-- | Android.bp | 13 | ||||
-rw-r--r-- | abi/Android.bp | 19 | ||||
-rw-r--r-- | abi/AndroidTest.xml | 26 | ||||
-rw-r--r-- | abi/OWNERS | 2 | ||||
-rw-r--r-- | dependency/Android.bp | 19 | ||||
-rw-r--r-- | dependency/AndroidTest.xml | 27 | ||||
-rw-r--r-- | dependency/OWNERS | 2 | ||||
-rw-r--r-- | dependency/vts_vndk_dependency_test.py | 2 | ||||
-rw-r--r-- | dependency/vts_vndk_dependency_test.xml | 2 | ||||
-rw-r--r-- | files/Android.bp | 19 | ||||
-rw-r--r-- | files/AndroidTest.xml | 28 | ||||
-rw-r--r-- | files/OWNERS | 2 | ||||
-rw-r--r-- | golden/Android.bp | 10 | ||||
-rwxr-xr-x | golden/extract_lsdump.py | 33 | ||||
-rw-r--r-- | golden/vndk_data.py | 4 | ||||
-rw-r--r-- | hidl/bufferpool/V1_0/target/Android.bp | 19 | ||||
-rw-r--r-- | hidl/bufferpool/V1_0/target/AndroidTest.xml | 32 | ||||
-rw-r--r-- | hidl/bufferpool/V2_0/target/Android.bp | 19 | ||||
-rw-r--r-- | hidl/bufferpool/V2_0/target/AndroidTest.xml | 32 | ||||
-rw-r--r-- | utils.py | 2 |
20 files changed, 48 insertions, 264 deletions
@@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + python_library_host { name: "vts_vndk_utils", pkg_path: "vts/testcases/vndk", @@ -64,6 +68,9 @@ python_test_host { "vts", ], test_config: "abi/vts_vndk_abi_test.xml", + test_options: { + unit_test: false, + }, } python_test_host { @@ -77,6 +84,9 @@ python_test_host { "vts", ], test_config: "dependency/vts_vndk_dependency_test.xml", + test_options: { + unit_test: false, + }, } python_test_host { @@ -90,4 +100,7 @@ python_test_host { "vts", ], test_config: "files/vts_vndk_files_test.xml", + test_options: { + unit_test: false, + }, } diff --git a/abi/Android.bp b/abi/Android.bp deleted file mode 100644 index 9479d3e..0000000 --- a/abi/Android.bp +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (C) 2017 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. -// - -vts_config { - name: "VtsVndkAbi", -} diff --git a/abi/AndroidTest.xml b/abi/AndroidTest.xml deleted file mode 100644 index cf220a6..0000000 --- a/abi/AndroidTest.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2017 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. ---> -<configuration description="Config for VTS VNDK ABI test cases"> - <option name="config-descriptor:metadata" key="plan" value="vts-vndk" /> - <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher"> - <option name="push-group" value="HostDrivenTest.push" /> - </target_preparer> - <test class="com.android.tradefed.testtype.VtsMultiDeviceTest"> - <option name="test-module-name" value="VtsVndkAbi" /> - <option name="test-case-path" value="vts/testcases/vndk/abi/VtsVndkAbiTest" /> - </test> -</configuration> - diff --git a/abi/OWNERS b/abi/OWNERS new file mode 100644 index 0000000..c8244dd --- /dev/null +++ b/abi/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 170896 +hsinyichen@google.com diff --git a/dependency/Android.bp b/dependency/Android.bp deleted file mode 100644 index d9715a1..0000000 --- a/dependency/Android.bp +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (C) 2017 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. -// - -vts_config { - name: "VtsVndkDependency", -} diff --git a/dependency/AndroidTest.xml b/dependency/AndroidTest.xml deleted file mode 100644 index 70c3138..0000000 --- a/dependency/AndroidTest.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2017 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. ---> -<configuration description="Config for VTS VNDK dependency test cases"> - <option name="config-descriptor:metadata" key="plan" value="vts-vndk" /> - <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher"> - <option name="push-group" value="HostDrivenTest.push" /> - </target_preparer> - <test class="com.android.tradefed.testtype.VtsMultiDeviceTest"> - <option name="test-module-name" value="VtsVndkDependency" /> - <option name="test-case-path" value="vts/testcases/vndk/dependency/VtsVndkDependencyTest" /> - <option name="test-timeout" value="6m" /> - </test> -</configuration> - diff --git a/dependency/OWNERS b/dependency/OWNERS new file mode 100644 index 0000000..c8244dd --- /dev/null +++ b/dependency/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 170896 +hsinyichen@google.com diff --git a/dependency/vts_vndk_dependency_test.py b/dependency/vts_vndk_dependency_test.py index 3152ad3..ff62885 100644 --- a/dependency/vts_vndk_dependency_test.py +++ b/dependency/vts_vndk_dependency_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2020 The Android Open Source Project # diff --git a/dependency/vts_vndk_dependency_test.xml b/dependency/vts_vndk_dependency_test.xml index f0f37c7..0a15678 100644 --- a/dependency/vts_vndk_dependency_test.xml +++ b/dependency/vts_vndk_dependency_test.xml @@ -17,7 +17,7 @@ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" /> <test class="com.android.tradefed.testtype.python.PythonBinaryHostTest"> <option name="par-file-name" value="vts_vndk_dependency_test" /> - <option name="test-timeout" value="6m" /> + <option name="test-timeout" value="10m" /> </test> </configuration> diff --git a/files/Android.bp b/files/Android.bp deleted file mode 100644 index f2ff97c..0000000 --- a/files/Android.bp +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (C) 2017 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. -// - -vts_config { - name: "VtsVndkFiles", -} diff --git a/files/AndroidTest.xml b/files/AndroidTest.xml deleted file mode 100644 index b422922..0000000 --- a/files/AndroidTest.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2017 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. ---> -<configuration description="Config for VTS VNDK files test cases"> - <option name="config-descriptor:metadata" key="plan" value="vts-vndk" /> - <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher"> - <option name="push-group" value="HostDrivenTest.push" /> - </target_preparer> - <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"> - </multi_target_preparer> - <test class="com.android.tradefed.testtype.VtsMultiDeviceTest"> - <option name="test-module-name" value="VtsVndkFiles" /> - <option name="test-case-path" value="vts/testcases/vndk/files/VtsVndkFilesTest" /> - </test> -</configuration> - diff --git a/files/OWNERS b/files/OWNERS new file mode 100644 index 0000000..c8244dd --- /dev/null +++ b/files/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 170896 +hsinyichen@google.com diff --git a/golden/Android.bp b/golden/Android.bp index c9abdaa..61ea604 100644 --- a/golden/Android.bp +++ b/golden/Android.bp @@ -12,17 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + python_binary_host { name: "extract_lsdump", main: "extract_lsdump.py", srcs: ["extract_lsdump.py"], version: { py2: { - enabled: true, - embedded_launcher: true, + enabled: false, }, py3: { - enabled: false, + enabled: true, + embedded_launcher: true, }, } } diff --git a/golden/extract_lsdump.py b/golden/extract_lsdump.py index fd42be6..8849d48 100755 --- a/golden/extract_lsdump.py +++ b/golden/extract_lsdump.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2018 The Android Open Source Project # @@ -19,6 +19,7 @@ import argparse import gzip import json import os +import sys import zipfile @@ -45,27 +46,27 @@ class AttrDict(dict): def _GetTypeSymbol(record_type): """Gets the mangled name of a record type. - Before Android R, unique_id was mangled name starting with "_ZTS". + Before Android R, unique_id was mangled name starting with '_ZTS'. linker_set_key was unmangled. Since Android R, unique_id has been removed, and linker_set_key has - been changed to mangled name starting with "_ZTI". + been changed to mangled name starting with '_ZTI'. Args: record_type: An AttrDict, a record type in lsdump. Returns: - A string, the mangled name starting with "_ZTI". + A string, the mangled name starting with '_ZTI'. """ - if "unique_id" in record_type: - return record_type["unique_id"].replace("_ZTS", "_ZTI", 1) - return record_type["linker_set_key"] + if 'unique_id' in record_type: + return record_type['unique_id'].replace('_ZTS', '_ZTI', 1) + return record_type['linker_set_key'] def _OpenFileOrGzipped(file_name): """Opens a file that is either in gzip or uncompressed format. - If file_name ends with '.gz' then return gzip.open(file_name, 'rb'), - else return open(file_name, 'rb'). + If file_name ends with '.gz' then an opened gzip text file, else return an + opened text file. Args: file_name: The file name to open. @@ -77,8 +78,8 @@ def _OpenFileOrGzipped(file_name): IOError if fails to open. """ if file_name.endswith('.gz'): - return gzip.open(file_name, 'rb') - return open(file_name, 'rb') + return gzip.open(file_name, 'rt') + return open(file_name, 'r') def _ConsumeOffset(tok, beg=0): @@ -235,8 +236,8 @@ def _ParseLsdumpFileObject(lsdump_file): def _ParseLsdumpZipFile(lsdump_zip, output_zip): """Converts zipped lsdump files to the dump files for ABI test.""" for name in lsdump_zip.namelist(): - if name.endswith(".lsdump"): - with lsdump_zip.open(name, mode="r") as lsdump_file: + if name.endswith('.lsdump'): + with lsdump_zip.open(name, mode='r') as lsdump_file: output_dump = _ParseLsdumpFileObject(lsdump_file) output_str = json.dumps(output_dump, indent=1, separators=(',', ':')) @@ -262,7 +263,7 @@ def ParseLsdumpFile(input_path, output_path): with _OpenFileOrGzipped(input_path) as lsdump_file: output_dump = _ParseLsdumpFileObject(lsdump_file) - with open(output_path, 'wb') as output_file: + with open(output_path, 'w') as output_file: json.dump(output_dump, output_file, indent=1, separators=(',', ':')) except (IOError, OSError) as e: @@ -288,13 +289,13 @@ def main(): with zipfile.ZipFile(args.output_path, mode='w', compression=zipfile.ZIP_STORED) as output_zip: _ParseLsdumpZipFile(input_zip, output_zip) - exit(0) + sys.exit(0) try: ParseLsdumpFile(args.input_path, args.output_path) except LsdumpError as e: print(e) - exit(1) + sys.exit(1) if __name__ == '__main__': diff --git a/golden/vndk_data.py b/golden/vndk_data.py index 5e971aa..56ed5d4 100644 --- a/golden/vndk_data.py +++ b/golden/vndk_data.py @@ -52,8 +52,8 @@ _ABI_LIST = ( ("arm64", 64, "arm64_armv8-a"), ("arm64", 32, "arm_armv8-a"), ("arm", 32, "arm_armv7-a-neon"), - ("x86_64", 64, "x86_x86_64"), - ("x86_64", 32, "x86_64"), + ("x86_64", 64, "x86_64"), + ("x86_64", 32, "x86_x86_64"), ("x86", 32, "x86"), ) diff --git a/hidl/bufferpool/V1_0/target/Android.bp b/hidl/bufferpool/V1_0/target/Android.bp deleted file mode 100644 index f4f798f..0000000 --- a/hidl/bufferpool/V1_0/target/Android.bp +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (C) 2018 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. -// - -vts_config { - name: "VtsVndkHidlBufferpoolV1_0Target", -} diff --git a/hidl/bufferpool/V1_0/target/AndroidTest.xml b/hidl/bufferpool/V1_0/target/AndroidTest.xml deleted file mode 100644 index b1c11d0..0000000 --- a/hidl/bufferpool/V1_0/target/AndroidTest.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2018 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. ---> -<configuration description="Config for VTS VtsVndkHidlBufferpoolV1_0Target test cases"> - <option name="config-descriptor:metadata" key="plan" value="vts-library" /> - <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher"> - <option name="abort-on-push-failure" value="false"/> - <option name="push-group" value="HostDrivenTest.push"/> - </target_preparer> - <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" /> - <test class="com.android.tradefed.testtype.VtsMultiDeviceTest"> - <option name="test-module-name" value="VtsVndkHidlBufferpoolV1_0Target"/> - <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsVndkHidlBufferpoolV1_0TargetSingleTest/VtsVndkHidlBufferpoolV1_0TargetSingleTest"/> - <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsVndkHidlBufferpoolV1_0TargetSingleTest/VtsVndkHidlBufferpoolV1_0TargetSingleTest"/> - <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsVndkHidlBufferpoolV1_0TargetMultiTest/VtsVndkHidlBufferpoolV1_0TargetMultiTest"/> - <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsVndkHidlBufferpoolV1_0TargetMultiTest/VtsVndkHidlBufferpoolV1_0TargetMultiTest"/> - <option name="binary-test-type" value="gtest_binary_test"/> - <option name="test-timeout" value="1m"/> - </test> -</configuration> diff --git a/hidl/bufferpool/V2_0/target/Android.bp b/hidl/bufferpool/V2_0/target/Android.bp deleted file mode 100644 index 9533bab..0000000 --- a/hidl/bufferpool/V2_0/target/Android.bp +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (C) 2018 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. -// - -vts_config { - name: "VtsVndkHidlBufferpoolV2_0Target", -} diff --git a/hidl/bufferpool/V2_0/target/AndroidTest.xml b/hidl/bufferpool/V2_0/target/AndroidTest.xml deleted file mode 100644 index d3241e9..0000000 --- a/hidl/bufferpool/V2_0/target/AndroidTest.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2018 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. ---> -<configuration description="Config for VTS VtsVndkHidlBufferpoolV2_0Target test cases"> - <option name="config-descriptor:metadata" key="plan" value="vts-library" /> - <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher"> - <option name="abort-on-push-failure" value="false"/> - <option name="push-group" value="HostDrivenTest.push"/> - </target_preparer> - <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" /> - <test class="com.android.tradefed.testtype.VtsMultiDeviceTest"> - <option name="test-module-name" value="VtsVndkHidlBufferpoolV2_0Target"/> - <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsVndkHidlBufferpoolV2_0TargetSingleTest/VtsVndkHidlBufferpoolV2_0TargetSingleTest"/> - <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsVndkHidlBufferpoolV2_0TargetSingleTest/VtsVndkHidlBufferpoolV2_0TargetSingleTest"/> - <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsVndkHidlBufferpoolV2_0TargetMultiTest/VtsVndkHidlBufferpoolV2_0TargetMultiTest"/> - <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsVndkHidlBufferpoolV2_0TargetMultiTest/VtsVndkHidlBufferpoolV2_0TargetMultiTest"/> - <option name="binary-test-type" value="gtest_binary_test"/> - <option name="test-timeout" value="1m"/> - </test> -</configuration> @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2020 The Android Open Source Project # |