diff options
author | Ruben Rodriguez Buchillon <coconutruben@chromium.org> | 2022-04-12 18:45:29 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-27 03:31:31 +0000 |
commit | 4e8f548ee747a40d21b69c5aa88b5f28886de3b7 (patch) | |
tree | 8b615620bf161042082ca78b0df41a8172a61a10 | |
parent | 669d28ca0994aa8f7734d3c94fd831bb18011abf (diff) | |
download | autotest-4e8f548ee747a40d21b69c5aa88b5f28886de3b7.tar.gz |
power_VideoPlayback: add .arc and .noarc
This change adds to control files to make sure we have a clean A/B test
with ARC and no ARC on video playback.
BUG=b:229032007
TEST=test_that --autotest_dir $(realpath .) localhost:10000 \
power_VideoPlayback.arc power_VideoPlayback.noarc
Change-Id: I96e90d615568077fa66c559bb0bc1952d3a0ee97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3584885
Auto-Submit: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Commit-Queue: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
-rw-r--r-- | client/cros/power/power_videotest.py | 7 | ||||
-rw-r--r-- | client/site_tests/power_VideoPlayback/control.arc | 29 | ||||
-rw-r--r-- | client/site_tests/power_VideoPlayback/control.noarc | 29 |
3 files changed, 62 insertions, 3 deletions
diff --git a/client/cros/power/power_videotest.py b/client/cros/power/power_videotest.py index 1a49348d49..85dd887ebd 100644 --- a/client/cros/power/power_videotest.py +++ b/client/cros/power/power_videotest.py @@ -32,11 +32,11 @@ class power_VideoTest(power_test.power_Test): def initialize(self, seconds_period=3, pdash_note='', - force_discharge=False): + force_discharge=False, run_arc=True): """Create and mount ram disk to download video.""" super(power_VideoTest, self).initialize( seconds_period=seconds_period, pdash_note=pdash_note, - force_discharge=force_discharge) + force_discharge=force_discharge, run_arc=run_arc) utils.run('mkdir -p %s' % self._RAMDISK) # Don't throw an exception on errors. result = utils.run('mount -t ramfs -o context=u:object_r:tmpfs:s0 ' @@ -114,7 +114,8 @@ class power_VideoTest(power_test.power_Test): extra_browser_args.append(self._DISABLE_HW_VIDEO_DECODE_ARGS) with chrome.Chrome(extra_browser_args=extra_browser_args, - init_network_controller=True) as self.cr: + init_network_controller=True, + arc_mode=self._arc_mode) as self.cr: # Chrome always starts with an empty tab, so we just use that one. tab = self.cr.browser.tabs[0] tab.Activate() diff --git a/client/site_tests/power_VideoPlayback/control.arc b/client/site_tests/power_VideoPlayback/control.arc new file mode 100644 index 0000000000..37dfc6e4e9 --- /dev/null +++ b/client/site_tests/power_VideoPlayback/control.arc @@ -0,0 +1,29 @@ +AUTHOR = "Chrome OS Team" +NAME = "power_VideoPlayback.arc" +PURPOSE = "Measure video playback power usage." + +CRITERIA = "This test is a benchmark." +TIME = "LENGTHY" +TEST_CATEGORY = "Benchmark" +TEST_CLASS = "power" +TEST_TYPE = "client" +PY_VERSION = 3 + +ATTRIBUTES = "" +DOC = """ +Test video decode for +- h264 1080p 30fps +- vp9 1080 30fps +for 10min each with ARC enabled. + +This test is called just arc to use it to distinguish between ARC vs no ARC +on the DUT. The details of video encoding and length aren't relevant other +than `arc` and `noarc` should be identical. +""" + +args_dict = utils.args_to_dict(args) +pdash_note = args_dict.get('pdash_note', '') +job.run_test('power_VideoPlayback', tag=NAME.split('.')[1], + videos=[('h264_1080_30fps', ''), ('vp9_1080_30fps','')], + secs_per_video=600, pdash_note=pdash_note, seconds_period=20, + run_arc=True) diff --git a/client/site_tests/power_VideoPlayback/control.noarc b/client/site_tests/power_VideoPlayback/control.noarc new file mode 100644 index 0000000000..e618e39682 --- /dev/null +++ b/client/site_tests/power_VideoPlayback/control.noarc @@ -0,0 +1,29 @@ +AUTHOR = "Chrome OS Team" +NAME = "power_VideoPlayback.noarc" +PURPOSE = "Measure video playback power usage." + +CRITERIA = "This test is a benchmark." +TIME = "LENGTHY" +TEST_CATEGORY = "Benchmark" +TEST_CLASS = "power" +TEST_TYPE = "client" +PY_VERSION = 3 + +ATTRIBUTES = "" +DOC = """ +Test video decode for +- h264 1080p 30fps +- vp9 1080 30fps +for 10min each with ARC disabled. + +This test is called just noarc to use it to distinguish between ARC vs no ARC +on the DUT. The details of video encoding and length aren't relevant other +than `arc` and `noarc` should be identical. +""" + +args_dict = utils.args_to_dict(args) +pdash_note = args_dict.get('pdash_note', '') +job.run_test('power_VideoPlayback', tag=NAME.split('.')[1], + videos=[('h264_1080_30fps', ''), ('vp9_1080_30fps','')], + secs_per_video=600, pdash_note=pdash_note, seconds_period=20, + run_arc=False) |