如何在使用 mm 构建时禁用构建和运行 AOSP 测试?

问题描述 投票:0回答:1

在 Android 13 中,当我使用

mm
构建特定模块(例如
packages/apps/Settings
)时,构建系统正在构建测试并运行 robolectric 以执行主机端测试以及构建应用程序本身。

我只想构建模块(在本例中为设置)而不运行测试,因为这会增加开发过程的考虑时间。使用

mm
时如何跳过运行robolectric测试?

此外,在使用

mm
的设置的情况下,还将一个名为
SettingsRoboTestStub.apk
的应用程序安装到 system.img 中,现在由于权限错误,系统将无法启动。我必须手动删除
SettingsRoboTestStub.apk
并重建
system.img
以使其启动,这很不方便所以除了不运行测试之外我也不想构建任何测试。

android-source
1个回答
0
投票

以下命令禁用运行 robolectric 测试,并指定要构建的指定目录中的特定模块,从而避免构建测试模块。

mmm DISABLE_ROBO_RUN_TESTS=true packages/apps/Settings:Settings

我无法使用

mm
指定单个模块,但使用
mmm
就可以了。跑的时候提到这个
hmm

- mm:         Builds and installs all of the modules in the current directory, and their
              dependencies.
- mmm:        Builds and installs all of the modules in the supplied directories, and
              their dependencies.
              To limit the modules being built use the syntax: mmm dir/:target1,target2.
© www.soinside.com 2019 - 2024. All rights reserved.