Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/engineering-tests:media-hub-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 7fd65aec53cbbf387a33b5e29c8f11c8f7f5d8e3
Merged at revision: 4bc86d6f319e7acdacfea969b07d150ebf9a7ff1
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/engineering-tests:media-hub-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 143 lines (+89/-0)
5 files modified
.gitignore (+4/-0)
README.md (+4/-0)
media-hub/manage.py (+10/-0)
media-hub/units/media-hub.pxu (+65/-0)
snapcraft.yaml (+6/-0)
Reviewer Review Type Date Requested Status
Simon Fels continuous-integration Approve
System Enablement Bot continuous-integration Needs Fixing
Konrad Zapałowicz (community) code Approve
Matteo Croce (community) Approve
Review via email: mp+317454@code.launchpad.net

Commit message

Add manual video playing test cases for media-hub.

This is mostly a draft as things are not properly snapified yet for video playing.

Description of the change

Add manual video playing test cases for media-hub.

This is mostly a draft as things are not properly snapified yet for video playing.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Matteo Croce (teknoraver) :
review: Approve
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Ack

review: Approve (code)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM, one minor comment inline.

Thanks for adding the .gitignore file!

review: Needs Fixing
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Branch refreshed after addressing comments

Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
Simon Fels (morphis) wrote :

Approving for CI

review: Approve (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

Approving for CI again.

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2new file mode 100644
3index 0000000..37354e6
4--- /dev/null
5+++ b/.gitignore
6@@ -0,0 +1,4 @@
7+canonical-se-engineering-tests_*.snap
8+parts/
9+prime/
10+stage/
11diff --git a/README.md b/README.md
12index 599bbfe..84799b1 100644
13--- a/README.md
14+++ b/README.md
15@@ -27,6 +27,9 @@ running the tests:
16
17 $ sudo snap install bluez modem-manager network-manager
18
19+TODO The media-hub framework is not yet snapified. Instructions need to
20+be added here when that happens.
21+
22 Afterwards you have new commands available in /snap/bin you
23 can use to run all available test cases. The first command
24 runs all of the tests and the other ones run individual test
25@@ -38,6 +41,7 @@ categories related to the command's name.
26 $ /snap/bin/canonical-se-engineering-tests.network-manager
27 $ /snap/bin/canonical-se-engineering-tests.tpm1-2
28 $ /snap/bin/canonical-se-engineering-tests.wifi-ap
29+ $ /snap/bin/canonical-se-engineering-tests.media-hub
30
31 ## How can I contribute new tests?
32
33diff --git a/media-hub/manage.py b/media-hub/manage.py
34new file mode 100755
35index 0000000..81b22c3
36--- /dev/null
37+++ b/media-hub/manage.py
38@@ -0,0 +1,10 @@
39+#!/usr/bin/env python3
40+from plainbox.provider_manager import setup, N_
41+
42+setup(
43+ name='plainbox-provider-media-hub',
44+ namespace='2017.com.canonical.media-hub',
45+ version="1.0",
46+ description=N_("Plainbox provider for the media-hub snap"),
47+ gettext_domain="2017_com_canonical_media_hub",
48+)
49diff --git a/media-hub/units/media-hub.pxu b/media-hub/units/media-hub.pxu
50new file mode 100644
51index 0000000..bdeec69
52--- /dev/null
53+++ b/media-hub/units/media-hub.pxu
54@@ -0,0 +1,65 @@
55+# Copyright 2017 Canonical Ltd.
56+# All rights reserved.
57+#
58+# Written by:
59+# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
60+
61+unit: category
62+id: media_hub
63+_name: media-hub
64+
65+id: media_hub/video/play_h264
66+category_id: media_hub
67+plugin: manual
68+_summary: H.264 videos play as expected
69+_purpose:
70+ Check if media-hub plays properly H.264 videos
71+_steps:
72+ 1. Download H.264 video
73+ .
74+ $ wget https://download.blender.org/durian/trailer/sintel_trailer-720p.mp4
75+ .
76+ 2. Start media-hub-server
77+ .
78+ $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
79+ .
80+ 3. Start to play the video
81+ .
82+ $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 sintel_trailer-720p.mp4
83+ .
84+ 4. Let the video play until the end
85+ 5. Re-start after the video finishes
86+ 6. Pause, then press play again a few times
87+ 7. While the video is playing, move the slider back and forth in time
88+ 8. Pause the video, then move the slider again
89+ 9. Re-size, maximize, then minimize the window several times
90+_verification:
91+ Verify that in all cases the video is played as expected.
92+
93+id: media_hub/video/play_mpeg4
94+category_id: media_hub
95+plugin: manual
96+_summary: MPEG4 videos play as expected
97+_purpose:
98+ Check if media-hub plays properly MPEG4 videos
99+_steps:
100+ 1. Download H.264 video
101+ .
102+ $ wget https://download.blender.org/durian/trailer/Sintel_Trailer.480p.DivX_Home_Theater.divx
103+ .
104+ 2. Start media-hub-server
105+ .
106+ $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
107+ .
108+ 3. Start to play the video
109+ .
110+ $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 Sintel_Trailer.480p.DivX_Home_Theater.divx
111+ .
112+ 4. Let the video play until the end
113+ 5. Re-start after the video finishes
114+ 6. Pause, then press play again a few times
115+ 7. While the video is playing, move the slider back and forth in time
116+ 8. Pause the video, then move the slider again
117+ 9. Re-size, maximize, then minimize the window several times
118+_verification:
119+ Verify that in all cases the video is played as expected.
120diff --git a/snapcraft.yaml b/snapcraft.yaml
121index 60867c4..622f9cb 100644
122--- a/snapcraft.yaml
123+++ b/snapcraft.yaml
124@@ -35,6 +35,8 @@ apps:
125 command: bin/run-udisks2-tests
126 alsa-utils:
127 command: bin/plainbox-wrapper run -i '2017.com.canonical.alsa-utils::alsa_utils.*'
128+ media-hub:
129+ command: bin/plainbox-wrapper run -i '2017.com.canonical.media-hub::media_hub.*'
130
131 parts:
132 common:
133@@ -95,6 +97,10 @@ parts:
134 source-branch: master
135 source-subdir: tests/manual
136 after: [plainbox-local]
137+ media-hub:
138+ plugin: plainbox-provider
139+ source: ./media-hub
140+ after: [plainbox-local]
141 launchers:
142 plugin: dump
143 source: .

Subscribers

People subscribed via source and target branches