summaryrefslogtreecommitdiff
path: root/tools/bit/main.cpp
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-08-31 21:21:38 -0700
committerXin Li <delphij@google.com>2020-08-31 21:21:38 -0700
commit628590d7ec80e10a3fc24b1c18a1afb55cca10a8 (patch)
tree4b1c3f52d86d7fb53afbe9e9438468588fa489f8 /tools/bit/main.cpp
parentb11b8ec3aec8bb42f2c07e1c5ac7942da293baa8 (diff)
parentd2d3a20624d968199353ccf6ddbae6f3ac39c9af (diff)
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507 Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27 Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
Diffstat (limited to 'tools/bit/main.cpp')
-rw-r--r--tools/bit/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/bit/main.cpp b/tools/bit/main.cpp
index d80c2e742fae..fd184f50091a 100644
--- a/tools/bit/main.cpp
+++ b/tools/bit/main.cpp
@@ -708,10 +708,12 @@ run_phases(vector<Target*> targets, const Options& options)
}
}
+
// Figure out whether we need to sync the system and which apks to install
string deviceTargetPath = buildOut + "/target/product/" + buildDevice;
string systemPath = deviceTargetPath + "/system/";
string dataPath = deviceTargetPath + "/data/";
+ string testPath = deviceTargetPath + "/testcases/";
bool syncSystem = false;
bool alwaysSyncSystem = false;
vector<string> systemFiles;
@@ -734,7 +736,8 @@ run_phases(vector<Target*> targets, const Options& options)
continue;
}
// Apk in the data partition
- if (starts_with(file, dataPath) && ends_with(file, ".apk")) {
+ if (ends_with(file, ".apk")
+ && (starts_with(file, dataPath) || starts_with(file, testPath))) {
// Always install it if we didn't build it because otherwise
// it will never have changed.
installApks.push_back(InstallApk(file, !target->build));
@@ -966,8 +969,9 @@ run_phases(vector<Target*> targets, const Options& options)
for (size_t j=0; j<target->module.installed.size(); j++) {
string filename = target->module.installed[j];
- // Apk in the data partition
- if (!starts_with(filename, dataPath) || !ends_with(filename, ".apk")) {
+ // Skip of not apk in the data partition or test
+ if (!(ends_with(filename, ".apk")
+ && (starts_with(filename, dataPath) || starts_with(filename, testPath)))) {
continue;
}