Disable webgl_robustness on slow boards.
Also add new labels for board_freq_mem and gpu_family.
This reverts commit 8aa9ada32ed347257034a26183ab013608110663.
TEST=ihf@ql:~/cros/src/third_party/autotest/files/contrib$ python print_host_labels.py chromeos2-row2-rack3-host1.cros
Labels:
['board:butterfly', 'board_freq_mem:butterfly_1.1GHz_2GB', 'bluetooth', 'gpu_family:sandybridge', 'graphics:gl', 'storage:ssd']
BUG=chromium:379397
Change-Id: I5f145eddb9eb80ac61bc1cc0a79507e0b91cfcad
Reviewed-on: https://chromium-review.googlesource.com/204455
Tested-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Ilja Friedel <ihf@chromium.org>
diff --git a/contrib/print_host_labels.py b/contrib/print_host_labels.py
index 6d83249..a595751 100755
--- a/contrib/print_host_labels.py
+++ b/contrib/print_host_labels.py
@@ -1,14 +1,18 @@
#!/usr/bin/env python
"""
-Usage: ./print_host_labels.py IP.or.hostname.here
+Usage: ./print_host_labels.py <IP.or.hostname>
"""
import sys
import common
from autotest_lib.server.hosts import factory
+if len(sys.argv) < 2:
+ print 'Usage: %s <IP.or.hostname>' % sys.argv[0]
+ exit(1)
+
host = factory.create_host(sys.argv[1])
labels = host.get_labels()
-print '\n\n\nLabels:\n'
+print 'Labels:'
print labels
diff --git a/server/hosts/cros_host.py b/server/hosts/cros_host.py
index 8b284b7..99715a4 100644
--- a/server/hosts/cros_host.py
+++ b/server/hosts/cros_host.py
@@ -1481,6 +1481,19 @@
self.rpc_disconnect(port)
+ def poor_mans_rpc(self, fun):
+ """
+ Calls a function from client utils on the host and returns a string.
+
+ @param fun function in client utils namespace.
+ @return output string from calling fun.
+ """
+ script = 'cd /usr/local/autotest/bin; '
+ script += 'python -c "import common; import utils;'
+ script += 'print utils.%s"' % fun
+ return script
+
+
def _ping_check_status(self, status):
"""Ping the host once, and return whether it has a given status.
@@ -1831,6 +1844,19 @@
return board_format_string % '-'.join(board.split('-')[0:2])
+ @label_decorator('board_freq_mem')
+ def get_board_with_frequency_and_memory(self):
+ """
+ Determines the board name with frequency and memory.
+
+ @returns a more detailed string representing the board. Examples are
+ butterfly_1.1GHz_2GB, link_1.8GHz_4GB, x86-zgb_1.7GHz_2GB
+ """
+ board = self.run(self.poor_mans_rpc(
+ 'get_board_with_frequency_and_memory()')).stdout
+ return 'board_freq_mem:%s' % str.strip(board)
+
+
@label_decorator('lightsensor')
def has_lightsensor(self):
"""Determine the correct board label for this host.
@@ -1869,6 +1895,18 @@
return None
+ @label_decorator('gpu_family')
+ def get_gpu_family(self):
+ """
+ Determine GPU family.
+
+ @returns a string representing the gpu family. Examples are mali, tegra,
+ pinetrail, sandybridge, ivybridge, haswell and baytrail.
+ """
+ gpu_family = self.run(self.poor_mans_rpc('get_gpu_family()')).stdout
+ return 'gpu_family:%s' % str.strip(gpu_family)
+
+
@label_decorator('graphics')
def get_graphics(self):
"""
diff --git a/server/site_tests/telemetry_GpuTests/control.webgl_robustness b/server/site_tests/telemetry_GpuTests/control.webgl_robustness
index cd69d2b..b7d6129 100644
--- a/server/site_tests/telemetry_GpuTests/control.webgl_robustness
+++ b/server/site_tests/telemetry_GpuTests/control.webgl_robustness
@@ -9,6 +9,9 @@
TEST_CATEGORY = 'Functional'
TEST_CLASS = 'gl'
TEST_TYPE = 'server'
+# TODO(ihf): Reevaluate this once crbug.com/379397 is fixed. For now don't
+# run on pinetrail boards.
+DEPENDENCIES = 'hw_video_acc_dec_h264'
DOC = """
This server control file executes the GPU telemetry test: webgl_robustness.