New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 856541 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug


Participants' hotlists:
Hotlist-Tast


Sign in to add a comment

Consolidate autotest screenshot logic to "screenshot" command

Project Member Reported by nya@chromium.org, Jun 26 2018

Issue description

For  Issue 856540 , we'll introduce "screenshot" command that takes a screenshot from command line.

Let us consolidate autotest screenshot logic around graphics_utils.py to use the screenshot command instead of calling into libdrm/libgbm with ctypes.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/1f2fa6a38c50a9008ac6d8addf0b73327a0fe7f5

commit 1f2fa6a38c50a9008ac6d8addf0b73327a0fe7f5
Author: Shuhei Takahashi <nya@chromium.org>
Date: Sun Jul 01 00:21:29 2018

screenshot: Add a tiny command to take a screenshot.

This is a simple command to take a screenshot in exactly the same
way as screenshot.py in autotest. This allows Tast to take
screenshots without dependency to autotest, and also is useful for
manual testing.

BUG= chromium:856540 
BUG= chromium:856541 
TEST=build and run on caroline

Change-Id: Ie6517fea8ccbecd3cde6af9e776dd24b6a71975d
Reviewed-on: https://chromium-review.googlesource.com/1107532
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[add] https://crrev.com/1f2fa6a38c50a9008ac6d8addf0b73327a0fe7f5/screenshot/screenshot.gyp
[add] https://crrev.com/1f2fa6a38c50a9008ac6d8addf0b73327a0fe7f5/screenshot/README.md
[modify] https://crrev.com/1f2fa6a38c50a9008ac6d8addf0b73327a0fe7f5/README.md
[add] https://crrev.com/1f2fa6a38c50a9008ac6d8addf0b73327a0fe7f5/screenshot/screenshot.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/9abea650739429e8fa8e1af92f6a9d59c512d549

commit 9abea650739429e8fa8e1af92f6a9d59c512d549
Author: Shuhei Takahashi <nya@chromium.org>
Date: Sun Jul 01 00:21:38 2018

autotest: Remove explicit extension.

extension= param in graphics_utils.take_screenshot() is being
removed in CL:1116213. They are all saved as PNG.

BUG= chromium:856541 
TEST=cq/precq

Change-Id: Ie9e37e113cff83a85cd6e7f168d752477baa2b2f
Reviewed-on: https://chromium-review.googlesource.com/1117732
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>

[modify] https://crrev.com/9abea650739429e8fa8e1af92f6a9d59c512d549/client/site_tests/platform_TabletMode/platform_TabletMode.py
[modify] https://crrev.com/9abea650739429e8fa8e1af92f6a9d59c512d549/client/site_tests/graphics_VTSwitch/graphics_VTSwitch.py
[modify] https://crrev.com/9abea650739429e8fa8e1af92f6a9d59c512d549/client/site_tests/graphics_Sanity/graphics_Sanity.py

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 1

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 2

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/autotest-cheets/+/2fec920e049bb0b6314ac738cc0ada803bb43ba3

commit 2fec920e049bb0b6314ac738cc0ada803bb43ba3
Author: Shuhei Takahashi <nya@google.com>
Date: Mon Jul 02 04:12:26 2018

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/8b9126d21752b4fd589bbb352298548e2e0aab9b

commit 8b9126d21752b4fd589bbb352298548e2e0aab9b
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Jul 04 05:31:06 2018

autotest: Replace screenshot.py with screenshot command.

BUG= chromium:856541 
TEST=CQ  # graphics_Sanity test runs on CQ
CQ-DEPEND=CL:1107534

Change-Id: I00a155c1c13524e1da69fac2afeff900a758e812
Reviewed-on: https://chromium-review.googlesource.com/1114570
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[delete] https://crrev.com/1ea28c6170d1d62a4c4df432be35d551e1493d09/client/bin/screenshot.py
[modify] https://crrev.com/8b9126d21752b4fd589bbb352298548e2e0aab9b/client/site_tests/graphics_Sanity/graphics_Sanity.py

Blocking: 860375
Blocking: -860375
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/2b1256c19d9675480d7a2300b1391d7e370e1707

commit 2b1256c19d9675480d7a2300b1391d7e370e1707
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Jul 17 09:26:15 2018

screenshot: Split to multiple files.

Preparing for upcoming enhancements. This should have no functional
change.

Mostly just moved the code to separate files. The only change is
introduction of Crtc class which encupsulates ScopedDrmModeCrtc and
base::File.

BUG= chromium:856540 
BUG= chromium:856541 
TEST=build and run
CQ-DEPEND=CL:1107532

Change-Id: I7314bb0c825e39ad62c6974a6f5f515ee8e76e4f
Reviewed-on: https://chromium-review.googlesource.com/1116207
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/png.h
[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/crtc.h
[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/capture.h
[modify] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/screenshot.gyp
[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/crtc.cc
[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/ptr_util.h
[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/main.cc
[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/capture.cc
[add] https://crrev.com/2b1256c19d9675480d7a2300b1391d7e370e1707/screenshot/png.cc
[delete] https://crrev.com/be206196f1258bedf0e4274815774e802012f338/screenshot/screenshot.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/d85ca2c44e35cef32cebcf5a4f464c8375164e0d

commit d85ca2c44e35cef32cebcf5a4f464c8375164e0d
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Jul 17 09:26:15 2018

screenshot: Support specifying a source display.

--internal/--external/--crtc-id flags are added to control the
source display.

To distinguish CRTCs connected to internal/external connectors,
we now scan connectors first and find connected CRTCs.

Also, Crtc class now encapsulates connector/encoder/fb associated
with CRTC.

BUG= chromium:856540 
BUG= chromium:856541 
TEST=build and run
CQ-DEPEND=CL:1116207

Change-Id: I3265fa97bc8691fd03482061c792acf9acf2540a
Reviewed-on: https://chromium-review.googlesource.com/1116208
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/d85ca2c44e35cef32cebcf5a4f464c8375164e0d/screenshot/capture.cc
[modify] https://crrev.com/d85ca2c44e35cef32cebcf5a4f464c8375164e0d/screenshot/ptr_util.h
[modify] https://crrev.com/d85ca2c44e35cef32cebcf5a4f464c8375164e0d/screenshot/crtc.cc
[modify] https://crrev.com/d85ca2c44e35cef32cebcf5a4f464c8375164e0d/screenshot/crtc.h
[modify] https://crrev.com/d85ca2c44e35cef32cebcf5a4f464c8375164e0d/screenshot/main.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/2eef9d32d109c4eebb800b9f4f0223d0f097911e

commit 2eef9d32d109c4eebb800b9f4f0223d0f097911e
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Jul 17 09:26:16 2018

screenshot: Support specifying subregion to capture.

This is far more efficient than cropping the saved PNG image since
we cap skip PNG compression.

BUG= chromium:856540 
BUG= chromium:856541 
TEST=build and run
CQ-DEPEND=CL:1116208

Change-Id: I2209b93706d89804b94b31d8095a0de502c2d56e
Reviewed-on: https://chromium-review.googlesource.com/1116619
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/2eef9d32d109c4eebb800b9f4f0223d0f097911e/screenshot/capture.cc
[modify] https://crrev.com/2eef9d32d109c4eebb800b9f4f0223d0f097911e/screenshot/capture.h
[modify] https://crrev.com/2eef9d32d109c4eebb800b9f4f0223d0f097911e/screenshot/main.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/0192b7747ff7f929dcac69f1528369de7f92c460

commit 0192b7747ff7f929dcac69f1528369de7f92c460
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Jul 18 04:53:36 2018

autotest: Remove calls of gbm.crtcScreenshot().

BUG= chromium:856541 
TEST=test_that caroline-DUT desktopui_MashLogin
CQ-DEPEND=CL:1107534

Change-Id: I12acfd93f136ac70acd4f8fa1a0cfad8e81707ba
Reviewed-on: https://chromium-review.googlesource.com/1114574
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/0192b7747ff7f929dcac69f1528369de7f92c460/client/common_lib/cros/arc.py
[modify] https://crrev.com/0192b7747ff7f929dcac69f1528369de7f92c460/client/site_tests/desktopui_MashLogin/desktopui_MashLogin.py

Project Member

Comment 13 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/autotest-cheets/+/09be5214988b8e9c021115bcce78dab3c527cbc5

commit 09be5214988b8e9c021115bcce78dab3c527cbc5
Author: Shuhei Takahashi <nya@google.com>
Date: Wed Jul 18 08:40:09 2018

Project Member

Comment 14 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/f2e818c88f240da22f8cd9aae005e35f39aa90fe

commit f2e818c88f240da22f8cd9aae005e35f39aa90fe
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Jul 18 08:40:03 2018

graphics_utils: Use screenshot command to take screenshots.

Also removed extension= parameter from take_screenshot(). All
uses of the parameter are removed in CL:1117732 and CL:*645932.

BUG= chromium:856541 
TEST=cq/precq
CQ-DEPEND=CL:1107534
CQ-DEPEND=CL:1116619
CQ-DEPEND=CL:1114569
CQ-DEPEND=CL:1117732
CQ-DEPEND=CL:*645932

Change-Id: I299b1742051a008c9d9a702941e31f163c7caaa4
Reviewed-on: https://chromium-review.googlesource.com/1116213
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/f2e818c88f240da22f8cd9aae005e35f39aa90fe/client/cros/graphics/graphics_utils.py

Project Member

Comment 15 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/autotest-cheets/+/93d94f9152833ddb2ec74ab7d7534578d1cb9907

commit 93d94f9152833ddb2ec74ab7d7534578d1cb9907
Author: Shuhei Takahashi <nya@google.com>
Date: Wed Jul 18 11:08:08 2018

Project Member

Comment 16 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/5431ca7c1b62a5579e3b897d0f82fd1bdb699a9e

commit 5431ca7c1b62a5579e3b897d0f82fd1bdb699a9e
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Jul 20 12:31:11 2018

graphics: Delete unused DRM/GBM codes.

They are no longer used after depending CLs are landed. This is the
final change for  crbug.com/856541 .

BUG= chromium:856541 
TEST=cq/precq
CQ-DEPEND=CL:1116213
CQ-DEPEND=CL:1114574
CQ-DEPEND=CL:1114570
CQ-DEPEND=CL:1114569
CQ-DEPEND=CL:*645557
CQ-DEPEND=CL:*645073

Change-Id: I80ac3b4166cf83c70d1e13f457c128ffdd73552a
Reviewed-on: https://chromium-review.googlesource.com/1116214
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[delete] https://crrev.com/cbe02d9bffa9894291a42613b260690df68cfc4e/client/cros/graphics/gbm.py
[delete] https://crrev.com/cbe02d9bffa9894291a42613b260690df68cfc4e/client/cros/graphics/drm.py

Status: Fixed (was: Started)

Sign in to add a comment