Merge lp:~om26er/mediaplayer-app/fix_test_vid into lp:mediaplayer-app

Proposed by Omer Akram
Status: Needs review
Proposed branch: lp:~om26er/mediaplayer-app/fix_test_vid
Merge into: lp:mediaplayer-app
Diff against target: 48 lines (+12/-2)
2 files modified
tests/autopilot/mediaplayer_app/tests/test_player_with_video.py (+11/-1)
tests/videos/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~om26er/mediaplayer-app/fix_test_vid
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+212731@code.launchpad.net

Commit message

.ogg file is not playing due to some reason, encode to mp4

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
212. By Omer Akram

fail the tests if the sample video is not played due to some reason

213. By Omer Akram

remove debug prints

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

213. By Omer Akram

remove debug prints

212. By Omer Akram

fail the tests if the sample video is not played due to some reason

211. By Omer Akram

encode the sample video to mp4 so that it plays on the device

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/mediaplayer_app/tests/test_player_with_video.py'
2--- tests/autopilot/mediaplayer_app/tests/test_player_with_video.py 2014-01-07 19:45:40 +0000
3+++ tests/autopilot/mediaplayer_app/tests/test_player_with_video.py 2014-03-25 22:53:17 +0000
4@@ -26,16 +26,26 @@
5 In the testfarm, the application may take some time to show up."""
6 def setUp(self):
7 super(TestPlayerWithVideo, self).setUp()
8- self.launch_app("small.ogg")
9+ self.launch_app("small.mp4")
10 self.assertThat(
11 self.main_window.get_qml_view().visible, Eventually(Equals(True)))
12 # wait video player start
13 player = self.main_window.get_player()
14 self.assertThat(player.playing, Eventually(Equals(True)))
15+ self._check_video_really_loaded()
16
17 def tearDown(self):
18 super(TestPlayerWithVideo, self).tearDown()
19
20+ def _check_video_really_loaded(self):
21+ slider = self.main_window.get_slider()
22+
23+ self.assertNotEquals(
24+ slider.maximumValue, 0.0,
25+ msg='The video under test seems to have 0 seconds length, are the '
26+ 'required codecs installed ?'
27+ )
28+
29 def show_controls(self):
30 video_area = self.main_window.get_video_area()
31 self.pointing_device.click_object(video_area)
32
33=== modified file 'tests/videos/CMakeLists.txt'
34--- tests/videos/CMakeLists.txt 2013-11-01 13:24:19 +0000
35+++ tests/videos/CMakeLists.txt 2014-03-25 22:53:17 +0000
36@@ -1,6 +1,6 @@
37 project(sample_videos)
38
39-set(MEDIAPLAYER_TEST_VIDEOS small.ogg)
40+set(MEDIAPLAYER_TEST_VIDEOS small.mp4)
41
42 install(FILES ${MEDIAPLAYER_TEST_VIDEOS}
43 DESTINATION ${CMAKE_INSTALL_DATADIR}/mediaplayer-app/videos
44
45=== added file 'tests/videos/small.mp4'
46Binary files tests/videos/small.mp4 1970-01-01 00:00:00 +0000 and tests/videos/small.mp4 2014-03-25 22:53:17 +0000 differ
47=== removed file 'tests/videos/small.ogg'
48Binary files tests/videos/small.ogg 2013-11-01 13:24:19 +0000 and tests/videos/small.ogg 1970-01-01 00:00:00 +0000 differ

Subscribers

People subscribed via source and target branches