summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Campbell <ryanjcampbell@google.com>2017-07-14 08:19:40 -0700
committerRyan Campbell <ryanjcampbell@google.com>2017-07-14 08:19:40 -0700
commit647698c50ef047cc31089e2e734fadbca854a036 (patch)
tree23d658620d1ba21ba23b68db5cec2cdfc7da97a4
parentb3e595b1c8750bb8e81468327ebae5d09d1dc3da (diff)
downloaddashboard-647698c50ef047cc31089e2e734fadbca854a036.tar.gz
Fix bug in device querying for plan runs.
Update where the device information is queried from to fix a bitness display bug (i.e. all test module runs showing up as the same bitness). This patch moves querying to the individual test runs instead of at the parent test plan run where they cannot be distinguished. Test: staging Bug: 63696719 Change-Id: Id002c4c96dac99801a09491efe0205f1df20f0e9
-rw-r--r--src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java b/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java
index 97ef09d..16beb9a 100644
--- a/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java
+++ b/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java
@@ -108,18 +108,17 @@ public class ShowPlanRunServlet extends BaseServlet {
endTime = testPlanRun.endTimestamp;
moduleCount = testPlanRun.testRuns.size();
- List<DeviceInfoEntity> devices = new ArrayList<>();
- Query deviceQuery = new Query(DeviceInfoEntity.KIND).setAncestor(planRunKey);
- for (Entity device : datastore.prepare(deviceQuery).asIterable()) {
- DeviceInfoEntity deviceEntity = DeviceInfoEntity.fromEntity(device);
- if (deviceEntity == null) continue;
- devices.add(deviceEntity);
- }
-
for (Key key : testPlanRun.testRuns) {
if (!testRuns.containsKey(key)) continue;
TestRunEntity testRunEntity = TestRunEntity.fromEntity(testRuns.get(key));
if (testRunEntity == null) continue;
+ Query deviceInfoQuery = new Query(DeviceInfoEntity.KIND).setAncestor(key);
+ List<DeviceInfoEntity> devices = new ArrayList<>();
+ for (Entity device : datastore.prepare(deviceInfoQuery).asIterable()) {
+ DeviceInfoEntity deviceEntity = DeviceInfoEntity.fromEntity(device);
+ if (deviceEntity == null) continue;
+ devices.add(deviceEntity);
+ }
TestRunMetadata metadata =
new TestRunMetadata(key.getParent().getName(), testRunEntity, devices);
testRunMetadata.add(metadata);