Mattisalmi (Talk | contribs) (→Executing tests) |
|||
| Line 2: | Line 2: | ||
The X Window System (commonly X or X11) is a computer software system and network protocol that provides a graphical user interface (GUI). Base X Window System is extended by X Extension libraries (mainly from freedesktop.org and XFree86 projects). | The X Window System (commonly X or X11) is a computer software system and network protocol that provides a graphical user interface (GUI). Base X Window System is extended by X Extension libraries (mainly from freedesktop.org and XFree86 projects). | ||
| - | The blts-xvideo test driver includes functional and performance tests specifically for XVideo extension. | + | The blts-xvideo test driver (0.0.7) includes functional and performance tests specifically for XVideo extension. |
== Test Coverage == | == Test Coverage == | ||
| Line 23: | Line 23: | ||
== Running the tests == | == Running the tests == | ||
| - | === | + | === Hardware setup and test environment === |
| - | + | The test environment must have following packages installed: | |
| - | < | + | ;*libbltscommon1 |
| - | The test | + | ;*libbltspixelformat1 |
| + | ;*libX11 | ||
| + | ;*libXv | ||
| + | |||
| + | === Building packages === | ||
| + | |||
| + | The xvideo test package comes with a packaging script that can be used to build tarball out of the sources, RPM package or Debian package. To build RPM package, in the root directory execute command: | ||
| + | |||
| + | <pre> | ||
| + | ./pack.sh -r | ||
| + | </pre> | ||
| + | |||
| + | To get packaging script help, execute command: | ||
| + | |||
| + | <pre> | ||
| + | ./pack.sh -h | ||
| + | </pre> | ||
| + | |||
| + | The building environment requires the following RPM packages installed: | ||
| + | ;*libbltscommon-devel | ||
| + | ;*libbltspixelformat-devel | ||
| + | ;*libX11-devel | ||
| + | ;*libXv-devel | ||
| + | |||
| + | === Configuration package === | ||
| + | |||
| + | The blts-xvideo-tests package is dependent on blts-xvideo-tests-config configuration file package. The packaging script pack.sh creates RPM package blts-xvideo-tests-config-example_{version}.rpm and it must be installed first. The configuration file /etc/blts/blts-xvideo-tests.cnf is copied in the test device during RPM installation. | ||
| + | |||
| + | The configuration file package can be installed in the device by executing the command: | ||
| + | |||
| + | <pre> | ||
| + | rpm -ivh blts-xvideo-tests-config-example_{version}.rpm | ||
| + | </pre> | ||
| + | |||
| + | === Test asset specific instructions === | ||
| + | |||
| + | The test package can be installed in the device by executing the command: | ||
| + | |||
| + | <pre> | ||
| + | rpm -ivh blts-xvideo-tests_{version}.rpm | ||
| + | </pre> | ||
=== Test case arguments === | === Test case arguments === | ||
| Line 38: | Line 78: | ||
|- | |- | ||
| - | || -l || Used log file, Used log file, default | + | || -l || Used log file, Used log file, default blts_v4l2_log.txt |
|- | |- | ||
|| -e || Execute single or multiple selected tests, for example -e 1,4,5. | || -e || Execute single or multiple selected tests, for example -e 1,4,5. | ||
| Line 46: | Line 86: | ||
|| -s || Show list of all tests | || -s || Show list of all tests | ||
|- | |- | ||
| - | || -C || | + | || -C || Used configuration file and path, for example /etc/blts/blts-bluetooth-tests.cnf |
|- | |- | ||
|| -? || Help message | || -? || Help message | ||
|- | |- | ||
| - | || - | + | || -xml, -axml || Create result XML. -axml appends results to an existing XML file. |
| + | |- | ||
| + | || -auto || Silent logging for test automation. Only the results are printed to stdout. | ||
| + | |- | ||
| + | || -v || Verbose logging (default) | ||
| + | |- | ||
| + | || -vv || Even more verbose logging | ||
|} | |} | ||
| + | |||
| + | Test cases must be run with root privileges. | ||
=== Test cases === | === Test cases === | ||
| Line 59: | Line 107: | ||
!|Notice | !|Notice | ||
|- | |- | ||
| - | || XVideo - Presence check || | + | || XVideo - Presence check || verified components are listed in file blts-xvideo-req-files.cfg |
|- | |- | ||
|| XVideo - Enumerate adapters || | || XVideo - Enumerate adapters || | ||
| Line 72: | Line 120: | ||
|} | |} | ||
| - | === Configuration file === | + | |
| - | Configuration file contains used parameters for benchmarks: | + | '''Test case descriptions and execution commands:''' |
| + | |||
| + | ;* XVideo - Presence check | ||
| + | : * Simple XVideo extension presence check | ||
| + | : * <code>$ blts-xvideo-tests -en "XVideo - Presence check"</code> | ||
| + | |||
| + | ;* XVideo - Enumerate adapters | ||
| + | : * List all information from all XVideo adapters | ||
| + | : * <code>$ blts-xvideo-tests -en "XVideo - Enumerate adapters"</code> | ||
| + | |||
| + | ;* XVideo - XvPutImage benchmark | ||
| + | : * Tests XvPutImage performance and functionality. | ||
| + | : * Uses various resolutions, pixel formats and port attributes depending on configuration file. | ||
| + | : * <code>$ blts-xvideo-tests -en "XVideo - XvPutImage benchmark"</code> | ||
| + | |||
| + | ;* XVideo - XvShmPutImage benchmark | ||
| + | : * Tests XvShmPutImage performance and functionality. | ||
| + | : * Uses various resolutions, pixel formats and port attributes depending on configuration file. | ||
| + | : * <code>$ blts-xvideo-tests -en "XVideo - XvShmPutImage benchmark"</code> | ||
| + | |||
| + | ;* XVideo - PutImage with QueryBestSize | ||
| + | : * Functional test for QueryBestImage. | ||
| + | : * Queries best size with different input and output resolutions and tries to display images with the returned size. | ||
| + | : * <code>$ blts-xvideo-tests -en "XVideo - PutImage with QueryBestSize"</code> | ||
| + | |||
| + | ;* XVideo - Notify events | ||
| + | : * Functional test for XvPortNotify/XvVideoNotify. Requests events and tries to trigger events from a different process. | ||
| + | : * <code>$ blts-xvideo-tests -en "XVideo - Notify events"</code> | ||
| + | |||
| + | |||
| + | === Configuration file examples === | ||
| + | Configuration file contains used parameters for benchmarks. To run test case with variable data you need to specify where configuration file is located or if no configuration file is given, test driver tries to use default /etc/blts/blts-xvideo-tests.cnf | ||
| + | |||
| + | To run "X11-XVideo PutImage with QueryBestSize" case you can use: | ||
| + | <code>blts-xvideo-tests -l /var/log/tests/X11-XVideo_PutImage_with_QueryBestSize.log -en "X11-XVideo PutImage with QueryBestSize" -C example-blts-xvideo.cnf</code> | ||
<pre> | <pre> | ||
| Line 152: | Line 234: | ||
== Module Design and Architecture == | == Module Design and Architecture == | ||
| - | The test module can be compiled to | + | The test module can be compiled to self-sufficient command line program. Both Debian and RPM packaging is also provided. |
=== Architecture diagram === | === Architecture diagram === | ||
| Line 176: | Line 258: | ||
|- | |- | ||
|| 0.1 || 22-sep-2010 || [mailto:ext-iekku.huttunen@nokia.com Iekku Huttunen] || Draft || Page created | || 0.1 || 22-sep-2010 || [mailto:ext-iekku.huttunen@nokia.com Iekku Huttunen] || Draft || Page created | ||
| + | |- | ||
| + | || 0.2 || 8-Dec-2010 || [mailto:aki.nyman@digia.com Aki Nyman] || Draft || Documentation updated to refer blts-xvideo test package 0.0.7 | ||
|} | |} | ||
Contents |
The X Window System (commonly X or X11) is a computer software system and network protocol that provides a graphical user interface (GUI). Base X Window System is extended by X Extension libraries (mainly from freedesktop.org and XFree86 projects).
The blts-xvideo test driver (0.0.7) includes functional and performance tests specifically for XVideo extension.
The test driver currently covers X11 XVideo extension:
Current coverage for tests:
Mainly display devices (and GPU).
The test environment must have following packages installed:
The xvideo test package comes with a packaging script that can be used to build tarball out of the sources, RPM package or Debian package. To build RPM package, in the root directory execute command:
./pack.sh -r
To get packaging script help, execute command:
./pack.sh -h
The building environment requires the following RPM packages installed:
The blts-xvideo-tests package is dependent on blts-xvideo-tests-config configuration file package. The packaging script pack.sh creates RPM package blts-xvideo-tests-config-example_{version}.rpm and it must be installed first. The configuration file /etc/blts/blts-xvideo-tests.cnf is copied in the test device during RPM installation.
The configuration file package can be installed in the device by executing the command:
rpm -ivh blts-xvideo-tests-config-example_{version}.rpm
The test package can be installed in the device by executing the command:
rpm -ivh blts-xvideo-tests_{version}.rpm
Arguments:
| Switch | Function |
|---|---|
| -l | Used log file, Used log file, default blts_v4l2_log.txt |
| -e | Execute single or multiple selected tests, for example -e 1,4,5. |
| -en | Execute test by name, for example -en "My test X" |
| -s | Show list of all tests |
| -C | Used configuration file and path, for example /etc/blts/blts-bluetooth-tests.cnf |
| -? | Help message |
| -xml, -axml | Create result XML. -axml appends results to an existing XML file. |
| -auto | Silent logging for test automation. Only the results are printed to stdout. |
| -v | Verbose logging (default) |
| -vv | Even more verbose logging |
Test cases must be run with root privileges.
Test case execution notices:
| Case name | Notice |
|---|---|
| XVideo - Presence check | verified components are listed in file blts-xvideo-req-files.cfg |
| XVideo - Enumerate adapters | |
| XVideo - XvPutImage benchmark | |
| XVideo - XvShmPutImage benchmark | |
| XVideo - PutImage with QueryBestSize | |
| XVideo - Notify events |
Test case descriptions and execution commands:
$ blts-xvideo-tests -en "XVideo - Presence check"
$ blts-xvideo-tests -en "XVideo - Enumerate adapters"
$ blts-xvideo-tests -en "XVideo - XvPutImage benchmark"
$ blts-xvideo-tests -en "XVideo - XvShmPutImage benchmark"
$ blts-xvideo-tests -en "XVideo - PutImage with QueryBestSize"
$ blts-xvideo-tests -en "XVideo - Notify events"
Configuration file contains used parameters for benchmarks. To run test case with variable data you need to specify where configuration file is located or if no configuration file is given, test driver tries to use default /etc/blts/blts-xvideo-tests.cnf
To run "X11-XVideo PutImage with QueryBestSize" case you can use:
blts-xvideo-tests -l /var/log/tests/X11-XVideo_PutImage_with_QueryBestSize.log -en "X11-XVideo PutImage with QueryBestSize" -C example-blts-xvideo.cnf
###################### # General parameters # ###################### # defines generated video material resolution [parameter] name input_resolution const "800x600" "1600x1200" [end_parameter] # if output resolution is 0x0, resolution will be root window's size [parameter] name output_resolution const "0x0" "1600x1200" [end_parameter] # duration of tests [parameter] name duration const 5 [end_parameter] # used X screen(s) [parameter] name screen const 0 [end_parameter] # used XVideo adaptor(s) [parameter] name adaptor const 0 [end_parameter] # Possible choices for test images: # random: three frames of random pixels # vh_lines: two frames, horizontal and vertical lines # checkerboard: two frames, b/w checkerboard # moving_arrow: white arrow moving from left to right and pointing up # fps_check: two frames, blocks change between black and white # colorgradient: red, green and blue gradients # graygradient: full screen grayscale, from black (left) to right # colorgradient_scroll: red, green and blue gradients, moves from left to right # graygradient_scroll: full screen grayscale, moves from left to right [parameter] name test_images const "colorgradient_scroll" [end_parameter] # used pixel formats (fourcc) [parameter] name format const "YUY2" "YV12" "I420" "UYVY" [end_parameter] # used port attributes for XVideo adaptor [parameter] name port_attributes const "XV_VSYNC 0 XV_BRIGHTNESS 0 XV_CONTRAST 0" [end_parameter] # These are for QueryBestSize and Notify events -tests [parameter] name fute_format const "YUY2" [end_parameter] [parameter] name fute_port_attributes const "XV_VSYNC 0" [end_parameter]
The test module can be compiled to self-sufficient command line program. Both Debian and RPM packaging is also provided.
| X11 | X11 home page |
| freedesktop.org | freedesktop.org home page |
| XFree86 | XFree86 home page |
| Version | Date | Handled By | Status | Comments |
|---|---|---|---|---|
| 0.1 | 22-sep-2010 | Iekku Huttunen | Draft | Page created |
| 0.2 | 8-Dec-2010 | Aki Nyman | Draft | Documentation updated to refer blts-xvideo test package 0.0.7 |