Skip to content

Commit

Permalink
Removed unused screenshot tests (BugFix) (#997)
Browse files Browse the repository at this point in the history
Removed unused screenshot tests

`camera_test.py` was called with a device that does not exist and outputs a non-informative error.
  • Loading branch information
fernando79513 authored Feb 19, 2024
1 parent 23aa911 commit abaa974
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 193 deletions.
59 changes: 0 additions & 59 deletions providers/base/units/graphics/jobs.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -382,56 +382,6 @@ estimated_duration: 50.000
_description: Move a 3D window around the screen on the {vendor} {product} video card
_summary: Test 3D window movement for {vendor} {product}

unit: template
template-resource: graphics_card
plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_{product_slug}
requires: package.name == 'fswebcam'
command: set -o pipefail; camera_test.py still --device=/dev/external_webcam -f "$PLAINBOX_SESSION_SHARE"/screenshot_{index}.jpg -q 2>&1 | ansi_parser.py
_summary: Test grabbing a screenshot for {vendor} {product}
_description:
PURPOSE:
Take a screengrab of the current screen (logged on Unity desktop) as produced by the {vendor} {product} graphics card
STEPS:
1. Take picture using USB webcam
VERIFICATION:
Review attachment manually later

unit: template
template-resource: graphics_card
plugin: attachment
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_{product_slug}.jpg
depends: graphics/{index}_screenshot_{product_slug}
command: cat "$PLAINBOX_SESSION_SHARE"/screenshot_{index}.jpg
_description: Attaches the screenshot captured in graphics/screenshot for the {vendor} {product} graphics card.
_summary: Attach results of screenshot test for {vendor} {product}

unit: template
template-resource: graphics_card
plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_fullscreen_video_{product_slug}
requires: package.name == 'fswebcam'
command:
[ -f "$PLAINBOX_PROVIDER_DATA"/video/Ogg_Theora_Video.ogv ] || {{ echo "Video file not found"; exit 1; }}
gsettings set org.gnome.totem repeat true
totem --fullscreen "$PLAINBOX_PROVIDER_DATA"/video/Ogg_Theora_Video.ogv 2>/dev/null &
set -o pipefail
sleep 15 && camera_test.py still --device=/dev/external_webcam -f "$PLAINBOX_SESSION_SHARE"/screenshot_fullscreen_video_{index}.jpg -q 2>&1 | ansi_parser.py
sleep 5 && pkill totem
gsettings set org.gnome.totem repeat false
_summary: Test FSV screenshot for {vendor} {product}
_description:
PURPOSE:
Take a screengrab of the current screen during fullscreen video playback using the {vendor} {product} graphics card
STEPS:
1. Start a fullscreen video playback
2. Take picture using USB webcam after a few seconds
VERIFICATION:
Review attachment manually later

unit: template
template-resource: graphics_card
plugin: manual
Expand Down Expand Up @@ -475,15 +425,6 @@ _steps:
_verification:
Is the system using the {vendor} {product} card now?

unit: template
template-resource: graphics_card
plugin: attachment
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_fullscreen_video_{product_slug}.jpg
depends: graphics/{index}_screenshot_fullscreen_video_{product_slug}
command: cat "$PLAINBOX_SESSION_SHARE"/screenshot_fullscreen_video_{index}.jpg
_summary: Attach results of FSV screenshot test for {vendor} {product}
_description: Attaches the screenshot captured in graphics/screenshot_fullscreen_video for the {vendor} {product} graphics card

plugin: shell
category_id: com.canonical.plainbox::graphics
Expand Down
52 changes: 0 additions & 52 deletions providers/base/units/graphics/legacy.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -210,55 +210,3 @@ command: window_test.py -t move
estimated_duration: 50.000
_description: Move a 3D window around the screen
_summary: Test 3D window movement

plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/screenshot
requires: package.name == 'fswebcam'
command: set -o pipefail; camera_test.py still --device=/dev/external_webcam -f "${PLAINBOX_SESSION_SHARE}"/screenshot.jpg -q 2>&1 | ansi_parser.py
_summary: Test grabbing a screenshot
_description:
PURPOSE:
Take a screengrab of the current screen (logged on Unity desktop)
STEPS:
1. Take picture using USB webcam
VERIFICATION:
Review attachment manually later

plugin: attachment
category_id: com.canonical.plainbox::graphics
id: screenshot.jpg
depends: graphics/screenshot
command: cat "${PLAINBOX_SESSION_SHARE}"/screenshot.jpg
_description: Attaches the screenshot captured in graphics/screenshot.
_summary: Attach results of screenshot test

plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/screenshot_fullscreen_video
requires: package.name == 'fswebcam'
command:
[ -f "${PLAINBOX_PROVIDER_DATA}"/video/Ogg_Theora_Video.ogv ] || { echo "Video file not found"; exit 1; }
gsettings set org.gnome.totem repeat true
totem --fullscreen "${PLAINBOX_PROVIDER_DATA}"/video/Ogg_Theora_Video.ogv 2>/dev/null &
set -o pipefail
sleep 15 && camera_test.py still --device=/dev/external_webcam -f "${PLAINBOX_SESSION_SHARE}"/screenshot_fullscreen_video.jpg -q 2>&1 | ansi_parser.py
sleep 5 && totem --quit 2>/dev/null
gsettings set org.gnome.totem repeat false
_summary: Test FSV screenshot
_description:
PURPOSE:
Take a screengrab of the current screen during fullscreen video playback
STEPS:
1. Start a fullscreen video playback
2. Take picture using USB webcam after a few seconds
VERIFICATION:
Review attachment manually later

plugin: attachment
category_id: com.canonical.plainbox::graphics
id: screenshot_fullscreen_video.jpg
depends: graphics/screenshot_fullscreen_video
command: cat "${PLAINBOX_SESSION_SHARE}"/screenshot_fullscreen_video.jpg
_description: Attaches the screenshot captured in graphics/screenshot_fullscreen_video.
_summary: Attach results of FSV screenshot test
22 changes: 0 additions & 22 deletions providers/base/units/suspend/suspend.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -1220,28 +1220,6 @@ command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_auto_single_log ] && cat "$PLAIN
_description:
Attaches the log from the single suspend/resume test to the results

plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/screenshot_after_suspend
estimated_duration: 10.0
depends: suspend/suspend_advanced_auto
requires: package.name == 'fswebcam'
command: set -o pipefail; camera_test.py still --device=/dev/external_webcam -f "${PLAINBOX_SESSION_SHARE}"/screenshot_after_suspend.jpg -q 2>&1 | ansi_parser.py
_description:
PURPOSE:
Take a screengrab of the current screen after suspend (logged on Unity desktop)
STEPS:
1. Take picture using USB webcam
VERIFICATION:
Review attachment manually later

plugin: attachment
category_id: com.canonical.plainbox::suspend
id: screenshot_after_suspend.jpg
depends: suspend/screenshot_after_suspend
command: cat "${PLAINBOX_SESSION_SHARE}"/screenshot_after_suspend.jpg
_description: Attaches the screenshot captured in graphics/screenshot.

plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/gpu_lockup_after_suspend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ include:
graphics/1_cycle_resolution_.*
graphics/1_screen-capture-internal_.*
graphics/1_screen-capture-internal_.*png
graphics/1_screenshot_.*
1_screenshot_.*
graphics/screen-capture-internal
screen-capture-internal.png
graphics/2_switch_card_.* certification-status=blocker
Expand Down
31 changes: 0 additions & 31 deletions providers/sru/units/sru-ubuntucore.pxu
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
# plugin: shell
# category_id: com.canonical.plainbox::graphics
# id: graphics/screenshot_opencv_validation
# requires: package.name == 'python-opencv'
# environ: EXTERNAL_WEBCAM_DEVICE
# command:
# screenshot_validation \
# ${PLAINBOX_PROVIDER_DATA}/images/logo_Ubuntu_stacked_black.png \
# --device=${EXTERNAL_WEBCAM_DEVICE:-/dev/external_webcam} \
# -o ${PLAINBOX_SESSION_SHARE}/screenshot_opencv_validation.jpg
# _summary: Test that a screenshot is valid, automatically
# _description:
# Take a screengrab of the screen displaying a black and white Ubuntu logo.
# Check that the screenshot matches the original file using OpenCV ORB detection.

# plugin: attachment
# category_id: com.canonical.plainbox::graphics
# id: screenshot_opencv_validation.jpg
# after: graphics/screenshot_opencv_validation
# command: [ -f ${PLAINBOX_SESSION_SHARE}/screenshot_opencv_validation.jpg ] && cat ${PLAINBOX_SESSION_SHARE}/screenshot_opencv_validation.jpg
# _description: Attaches the screenshot captured in graphics/screenshot_opencv_validation.
# _summary: Attach the screenshot captured for the automatically validated screenshot test

id: sru-ubuntucore
_name: All SRU Tests (Ubuntu Core)
unit: test plan
Expand Down Expand Up @@ -56,12 +33,6 @@ include:
# graphics/1_compiz_check_.*
# graphics/xorg-failsafe
# graphics/xorg-process
# graphics/1_screenshot_.*
# 1_screenshot_.*.jpg
# graphics/1_screenshot_fullscreen_video_.*
# 1_screenshot_fullscreen_video_.*.jpg
# graphics/screenshot_opencv_validation
# screenshot_opencv_validation.jpg
# install/apt-get-gets-updates
mediacard/sd-preinserted
memory/info
Expand Down Expand Up @@ -105,8 +76,6 @@ include:
after-suspend-wireless/wireless_connection_wpa_ac_nm_.*
after-suspend-wireless/wireless_connection_open_ac_nm_.*
# suspend/gpu_lockup_after_suspend
# suspend/screenshot_after_suspend
# screenshot_after_suspend.jpg
bootstrap_include:
device
graphics_card
Expand Down
27 changes: 0 additions & 27 deletions providers/sru/units/sru.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,6 @@ _description:
Secondly, scan APT system update log to see any build error messages.
This test is mainly used for pre-installed images which use DKMS modules.

plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/screenshot_opencv_validation
requires: package.name == 'python-opencv'
environ: EXTERNAL_WEBCAM_DEVICE
command:
screenshot_validation \
"${PLAINBOX_PROVIDER_DATA}"/images/logo_Ubuntu_stacked_black.png \
--device="${EXTERNAL_WEBCAM_DEVICE:-/dev/external_webcam}" \
-o "${PLAINBOX_SESSION_SHARE}"/screenshot_opencv_validation.jpg
_summary: Test that a screenshot is valid, automatically
_description:
Take a screengrab of the screen displaying a black and white Ubuntu logo.
Check that the screenshot matches the original file using OpenCV ORB detection.

plugin: attachment
category_id: com.canonical.plainbox::graphics
id: screenshot_opencv_validation.jpg
after: graphics/screenshot_opencv_validation
command: [ -f "${PLAINBOX_SESSION_SHARE}"/screenshot_opencv_validation.jpg ] && cat "${PLAINBOX_SESSION_SHARE}"/screenshot_opencv_validation.jpg
_description: Attaches the screenshot captured in graphics/screenshot_opencv_validation.
_summary: Attach the screenshot captured for the automatically validated screenshot test

id: sru-server
_name: All SRU Tests (Ubuntu Server)
unit: test plan
Expand Down Expand Up @@ -135,10 +112,6 @@ include:
graphics/1_compiz_check_.*
graphics/xorg-failsafe
graphics/xorg-process
graphics/1_screenshot_.*
1_screenshot_.*.jpg
graphics/1_screenshot_fullscreen_video_.*
1_screenshot_fullscreen_video_.*.jpg
install/apt-get-gets-updates
miscellanea/dkms_build_validation
networking/http
Expand Down

0 comments on commit abaa974

Please sign in to comment.