微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

询问有关 Android VTS 的问题

如何解决询问有关 Android VTS 的问题

我询问有关 Android VTS 的问题。

我目前正在开发 ubuntu 18.04,目标设备正在开发 AVD。 首先,我设置的环境如下。

$ sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig

$ mkdir android && cd android
$ repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r28
$ repo sync -c  -j $(($(nproc) - 2)) --no-tags --no-clone-bundle           
$ repo start android-11.0.0_r28 --all   


$ . build/envsetup.sh
$ lunch sdk_phone_x86_64-userdebug
$ m

我已成功构建并确认模拟器运行良好。

$ emulator -no-window -writable-system
$ adb root remount
$ adb device
List of devices attached
emulator-5554   device

之后,我构建了以下vts来分析Android keymaster的行为。

$ cd hardware\interfaces\keymaster\3.0\vts\functional
$ mm

模块构建成功后,我运行模拟器并按如下方式推送二进制文件

$ emulator -no-window -writable-system
$ adb root remount
$ adb push out\soong\.intermediates\hardware\interfaces\keymaster\3.0\vts\functional\VtsHalKeymasterV3_0TargetTest\android_x86_64\VtsHalKeymasterV3_0TargetTest /data/tmp

我成功地完成了上面的操作,我运行了二进制文件,它看起来像这样:

$ adb shell /data/tmp/VtsHalKeymasterV3_0TargetTest

[==========] Running 12 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 12 tests from GoogleTestVerification
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<KeymasterVersionTest>
Paramaterized test suite KeymasterVersionTest is defined via TEST_P,but never instantiated. None of the test cases will run. Either no INSTANTIATE_TEST_SUITE_P is provided or the only ones provided expand to nothing.

Ideally,TEST_P deFinitions should only ever be included as part of binaries that intend to use them. (As opposed to,for example,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<KeymasterVersionTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<NewKeyGenerationTest>
Paramaterized test suite NewKeyGenerationTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<NewKeyGenerationTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<GetKeycharacteristicsTest>
Paramaterized test suite GetKeycharacteristicsTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<GetKeycharacteristicsTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<SigningOperationsTest>
Paramaterized test suite SigningOperationsTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<SigningOperationsTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<VerificationoperationsTest>
Paramaterized test suite VerificationoperationsTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<VerificationoperationsTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<ExportKeyTest>
Paramaterized test suite ExportKeyTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<ExportKeyTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<ImportKeyTest>
Paramaterized test suite ImportKeyTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<ImportKeyTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<EncryptionoperationsTest>
Paramaterized test suite EncryptionoperationsTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<EncryptionoperationsTest> (1 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<MaxOperationsTest>
Paramaterized test suite MaxOperationsTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<MaxOperationsTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<AddEntropyTest>
Paramaterized test suite AddEntropyTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<AddEntropyTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<AttestationTest>
Paramaterized test suite AttestationTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<AttestationTest> (0 ms)
[ RUN      ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<KeyDeletionTest>
Paramaterized test suite KeyDeletionTest is defined via TEST_P,being placed in a library that may be linked in to get other utilities.)
[       OK ] GoogleTestVerification.UninstantiatedParamaterizedTestSuite<KeyDeletionTest> (0 ms)
[----------] 12 tests from GoogleTestVerification (2 ms total)

[----------] Global test environment tear-down
[==========] 12 tests from 1 test suite ran. (3 ms total)
[  PASSED  ] 12 tests.

完成以下只用了3ms。 当我仔细检查时,测试本身似乎没有进行。 我没有对来源或其他细节进行任何额外的更改。 任何知道我还需要做什么才能运行 keymaster vts 的人将不胜感激。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。