Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 730654811
  • Loading branch information
DeviceInfra authored and copybara-github committed Feb 25, 2025
1 parent f87f298 commit eca6204
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
import com.google.devtools.mobileharness.shared.constant.hostmanagement.HostPropertyConstants.HostPropertyKey;
import com.google.devtools.mobileharness.shared.labinfo.LabInfoProvider;
import com.google.devtools.mobileharness.shared.labinfo.LocalLabInfoProvider;
import com.google.devtools.mobileharness.shared.util.base.StrUtil;
import com.google.devtools.mobileharness.shared.util.comm.filetransfer.cloud.rpc.service.CloudFileTransferServiceGrpcImpl;
import com.google.devtools.mobileharness.shared.util.comm.filetransfer.cloud.rpc.service.CloudFileTransferServiceImpl;
import com.google.devtools.mobileharness.shared.util.comm.filetransfer.common.TaggedFileHandler;
Expand All @@ -89,7 +88,6 @@
import com.google.wireless.qa.mobileharness.shared.constant.Dimension.Value;
import com.google.wireless.qa.mobileharness.shared.constant.DirCommon;
import com.google.wireless.qa.mobileharness.shared.constant.ExitCode;
import com.google.wireless.qa.mobileharness.shared.util.DeviceUtil;
import com.google.wireless.qa.mobileharness.shared.util.NetUtil;
import io.grpc.BindableService;
import io.grpc.netty.NettyServerBuilder;
Expand Down Expand Up @@ -419,14 +417,6 @@ private HostProperties initHostLevelDeviceDimensionsAndHostProperties()

HostProperties.Builder hostProperties = HostProperties.newBuilder();

// Required dimensions
// Adds "pool:shared" to lab required dimensions for m&m labs.
if (DeviceUtil.inSharedLab()) {
LabDimensionManager.getInstance()
.getRequiredLocalDimensions()
.add(Name.POOL, Value.POOL_SHARED);
}

// Supported dimensions
if (systemUtil.isOnLinux()) {
// By default, all newly upgraded Linux labs will support container-mode tests.
Expand Down Expand Up @@ -510,28 +500,9 @@ private HostProperties initHostLevelDeviceDimensionsAndHostProperties()
.setValue(Ascii.toLowerCase(locationType))
.build());

addExtraHostProperties(hostProperties);

return hostProperties.build();
}

private void addExtraHostProperties(HostProperties.Builder hostProperties)
throws InterruptedException {
// Java version
hostProperties.addHostProperty(
HostProperty.newBuilder()
.setKey(Ascii.toLowerCase(HostPropertyKey.JAVA_VERSION.name()))
.setValue(systemUtil.getJavaVersion())
.build());

// Host total memory
hostProperties.addHostProperty(
HostProperty.newBuilder()
.setKey(Ascii.toLowerCase(HostPropertyKey.TOTAL_MEM.name()))
.setValue(StrUtil.getHumanReadableSize(systemUtil.getTotalMemory()))
.build());
}

/** Test services created by lab server. */
@AutoValue
@VisibleForTesting()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public enum Name {
GMSCORE_SIGNATURE,
/** The lab location of the device. */
LAB_LOCATION,
/** The location type of the device. */
/** The type of the lab: Satellite/SLaaS/Core */
LAB_TYPE,
/** The type of the lab. */
/** The location type of the lab. */
LOCATION_TYPE,
/** A customized dimension to make devices easier to identify on device list page of FE. */
LABEL,
Expand Down

0 comments on commit eca6204

Please sign in to comment.