Commit graph

60 commits

Author SHA1 Message Date
Guillaume Desmottes 8c2684c9a7 validate: add gstvalidate.supp valgrind suppression file
Differential Revision: http://phabricator.freedesktop.org/D115
2015-04-20 15:29:28 +02:00
Thibault Saunier adbe811175 validate:launcher: Pass GST_VALIDATE_SCENARIO to the subprocess env only
Summary:
And make sure to remove it from the env if the user has it in its main
environment.

Without that commit we ended up passing scenarios from previous tests
to the following ones where None were specified.

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D98
2015-04-16 12:41:25 +02:00
Guillaume Desmottes 8a6494ddf8 validate: set GST_GL_XINITTHREADS
This ensure that XInitThreads is called and so gl contexts are properly
initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=747840

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2015-04-14 12:56:32 +02:00
Thibault Saunier 2cf082c4be validate:launcher: Set more env variable in the launcher command desc
Summary:
Adding if present:
  * LD_PRELOAD
  * DISPLAY
  * GST_VALIDATE_CONFIG
  * GST_VALIDATE_OVERRIDE

+  enhance the add_env_variable method to more easily set envvar from
current value

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D78
2015-04-10 16:53:41 +02:00
Thibault Saunier bbd04eef4c validate:launcher: Use GST_VALIDATE_SCENARIO envvar to set scenarios
Summary:
Instead of concidering all apps will have a --set-scenario argument
which is not going to be the case as soon as we run the tests through
LD_PRELOAD

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D70
2015-04-10 16:53:40 +02:00
Thibault Saunier 2fe03f1993 validate:launcher: Move get_current_position from GstValidatePipelineTest to GstValidateTest
This is where it belongs

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D69
2015-04-10 16:53:40 +02:00
Young Han Lee 4725f4ec09 validate:launcher: Show timeout seconds for timeout result message
Current timeout message doesn't show how many seconds a test took and
it is timeouted by normal timeout or hard timeout.

This patch changes the message like following.

1. normal timeout
old : validate.http.playback.reverse_playback.raw_video_mov: Timeout (Application timed out)
new : validate.http.playback.reverse_playback.raw_video_mov: Timeout (Application timed out: 120 secs)

2. hard timeout
old : validate.http.playback.reverse_playback.raw_video_mov: Timeout (Application timed out)
new : validate.http.playback.reverse_playback.raw_video_mov: Timeout (Hard timeout reached: 600 secs)

https://bugzilla.gnome.org/show_bug.cgi?id=746957
2015-03-30 13:32:57 +02:00
Young Han Lee 4c7ec6b8b1 validate:launcher: Fix wrong test number with -j option
When '-j n' option is given, first n tests print test number 0.
This is caused by test_num part of 919db98605.

https://bugzilla.gnome.org/show_bug.cgi?id=747006
2015-03-30 13:02:39 +02:00
Thibault Saunier ba6d209b3f validate:launcher: Avoid depending on PyGObject
Summary:
And rely on our knowledge of the configuration to figure out where the
suppression file has been installed

Reviewers: gdesmott

Differential Revision: http://phabricator.freedesktop.org/D61
2015-03-28 23:35:07 +01:00
Guillaume Desmottes 4f805422a7 validate: check VALGRIND_ERROR_CODE in Test as well
We were doing it only in GstValidateTest which was overriding the default
implementation.
2015-03-26 13:59:30 +01:00
Guillaume Desmottes 9ad79ffcbc validate: don't increase hard_timeout is if it's None
Some tests, like the media check ones, have None as hard_timeout.
2015-03-26 13:57:34 +01:00
Guillaume Desmottes daaa32676c validate: increase VALGRIND_TIMEOUT_FACTOR
5 wasn't enough for my poor laptop.
2015-03-26 11:29:26 +01:00
Guillaume Desmottes 66a675cde8 validate: increase the normal timeout as well when using valgrind 2015-03-26 11:29:06 +01:00
Guillaume Desmottes f1985bc738 validate: raise an error if valgrind detected issues
Differential Revision: http://phabricator.freedesktop.org/D53
2015-03-26 09:18:27 +01:00
Guillaume Desmottes c23bac2912 validate: store valgrind logs to its own file 2015-03-23 13:41:03 +01:00
Guillaume Desmottes cb8348c7b1 launcher: try using gst.supp as valgrind suppressions file
https://bugzilla.gnome.org/show_bug.cgi?id=746465
2015-03-20 10:34:49 +01:00
Guillaume Desmottes 271f9f3c8e launcher: add valgrind support
Add a --valgrind option to gst-validate-launcher to run the tests inside
Valgrind and tune GLib's memory allocator accordingly.

Fix https://bugzilla.gnome.org/show_bug.cgi?id=746465
2015-03-20 10:34:49 +01:00
Thibault Saunier e9da098e33 validate:launcher: Fix test number printing 2015-03-18 17:05:57 +01:00
Thibault Saunier 7079d1910d validate:launcher Rename _other_testsuite_for_tester
To _check_tester_has_other_testsuite
2015-03-17 12:41:26 +01:00
Thibault Saunier 919db98605 validate:launcher: Cache all the tests in the runner
This way we do not have to re ask all the test managers
what tests should be run.
2015-03-17 12:41:26 +01:00
Thibault Saunier d1411cfc6a validate:launcher: Add a way to simply run validate default tests on uris
Summary:
This allows us to easily run all the scenarios on a particular file doing:

  $ gst-validate-launcher validate --validate-check-uri file:///some/media/file.webm

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D36
2015-03-13 18:04:42 +00:00
Thibault Saunier 08d8e01f21 validate:launcher: Make sure TIMEOUTs do not get converted to ERROR
This was a regression introduced in c0e3d2e4f1
2015-03-09 18:41:54 +01:00
Thibault Saunier a17c214dba validate:launcher: Better handle GST debug log outputs redirection 2015-03-04 17:57:21 +01:00
Thibault Saunier c0e3d2e4f1 validate:launcher: First rely on the presence of criticals to set tests result
In the case of external applications they might not set their exist
code bases on the result of validate so we should rely on what
validates as to say first.
2015-03-04 17:30:41 +01:00
Thibault Saunier c5393f79f3 validate:launcher: Fix typo s/FILE_EXTENDION/FILE_EXTENSION/g 2015-02-19 13:57:30 +01:00
Ramiro Polla 2d5ad1ac62 validate: launcher: Use cElementTree for XML parsing
Using cElementTree instead of ElementTree speeds up parsing of media
descriptor files.

The total time spent parsing XML files drops from ~0.64 s to ~0.24 s,
leading to faster initialisation times for gst-validate-launcher.

https://bugzilla.gnome.org/show_bug.cgi?id=743293
2015-02-17 17:27:40 +01:00
Thibault Saunier be20eb015c validate:launcher:baseclasses: Avoid raising axception when all getting scenarios
https://bugzilla.gnome.org/show_bug.cgi?id=743994
2015-02-14 16:32:10 +01:00
Thibault Saunier a85ace1783 validate: launcher: Allow discovering scenario from full path
https://bugzilla.gnome.org/show_bug.cgi?id=743994
2015-02-14 16:32:10 +01:00
Thibault Saunier eac25a3ad6 validate:launcher: Implement a FakeMediaDescriptor
This allows us to more cleanly implement Simple pipeline test
generation

https://bugzilla.gnome.org/show_bug.cgi?id=743994
2015-02-14 16:32:08 +01:00
Ramiro Polla d833a51134 validate: launcher: Print test name in Result
https://bugzilla.gnome.org/show_bug.cgi?id=743063
2015-02-05 15:18:39 +01:00
Ramiro Polla c0cefecd23 validate: launcher: Add option to run tests in parallel
Patch 4/4 to implement parallel test execution.

https://bugzilla.gnome.org/show_bug.cgi?id=743063
2015-02-05 15:18:39 +01:00
Ramiro Polla 1f981762c2 validate: launcher: Print test number on result
With parallel test execution, it will be hard to track which result
relates to which test. Therefore, the test number should be printed
along with the results as well.

Patch 3/4 to implement parallel test execution.

https://bugzilla.gnome.org/show_bug.cgi?id=743063
2015-02-05 15:18:39 +01:00
Ramiro Polla a9a366427e validate: launcher: Use jobs list to take track of tests running
Currently the tests are still run serially.

Patch 2/4 to implement parallel test execution.

https://bugzilla.gnome.org/show_bug.cgi?id=743063
2015-02-05 15:18:38 +01:00
Ramiro Polla d9097f8bf7 validate: launcher: Use test index instead of counting test numbers
Patch 1/4 to implement parallel test execution.

https://bugzilla.gnome.org/show_bug.cgi?id=743063
2015-02-05 15:18:38 +01:00
Ramiro Polla ef246a497c validate: launcher: Make TestManager handle waiting for processes
Patch 4/4 to make TestManager handle waiting for processes instead of
expecting each Test to do it.

https://bugzilla.gnome.org/show_bug.cgi?id=743063
2015-02-05 15:18:38 +01:00
Ramiro Polla 0026c2804f validate: launcher: Use a Queue to test for test completion
TestManager will use a Queue to track progress for all tests. This
commit implements a queue inside Test to simplify the transition.

Patch 3/4 to make TestManager handle waiting for processes instead of
expecting each Test to do it.

https://bugzilla.gnome.org/show_bug.cgi?id=743063
2015-02-05 15:18:38 +01:00
Ramiro Polla bd4c221141 validate: launcher: Initialize Test start time outside of wait_process
wait_process will be moved to TestManager, so the values used to track
process update must remain inside Test.

Patch 2/4 to make TestManager handle waiting for processes instead of
expecting each Test to do it.
2015-02-05 15:18:38 +01:00
Ramiro Polla 498f7002f3 validate: launcher: Split process_update() out of wait_process()
Patch 1/4 to make TestManager handle waiting for processes instead of
expecting each Test to do it.
2015-02-05 15:18:37 +01:00
Ramiro Polla d12f55daf4 validate: launcher: Move logfile handling out of Reporter and into Test
This makes each Test handle its own logfile, allowing the Reporter to
work on multiple tests at the same time.

Patch 5/5 to move logfile handling out of Reporter and into Test.
2015-02-05 15:18:37 +01:00
Ramiro Polla 177eee728f validate: launcher: Split test log file handling in Reporter
Patch 3/5 to move logfile handling out of Reporter and into Test.
2015-02-05 15:18:37 +01:00
Ramiro Polla b9357e3b17 validate: launcher: Separate Reporter from current Test
Instead of saving the current Test in Reporter for every test, use
function parameters to achieve the same goal.

Patch 2/5 to move logfile handling out of Reporter and into Test.
2015-02-05 15:18:37 +01:00
Ramiro Polla 39a4092434 validate: launcher: Initialize reporter timer before starting all tests
Patch 1/5 to move logfile handling out of Reporter and into Test.
2015-02-05 15:18:37 +01:00
Ramiro Polla bdedd7abb9 validate: launcher: Don't wait for processes longer than necessary 2015-02-05 15:18:36 +01:00
Ramiro Polla b29f378296 validate: launcher: Fix test log header output
Write log file header before running tests, instead of overwriting the
file afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=742966
2015-01-16 16:24:16 +01:00
Ramiro Polla 9c3606a867 validate: launcher: Always create log files
Create log files even when stdout redirection is enabled.
This commit partially reverts 20c28de.

https://bugzilla.gnome.org/show_bug.cgi?id=742973
2015-01-16 16:24:13 +01:00
Ramiro Polla 4e0388c631 validate: launcher: Introduce new parameter for log file redirecting
Allow log file redirection through the new --redirect-logs parameter.
Keep the old --logs-dir stdout/stderr parameter, but reset to the
default logs directory in that case, and set redirect_logs internally.
This also prevents the creation of an stdout/stderr directory for
writing xunit.xml.

https://bugzilla.gnome.org/show_bug.cgi?id=742973
2015-01-16 16:24:13 +01:00
Thibault Saunier 1e39db18ad validate: launcher: Take the timeout as ref timeout to compute hard_timeout
when it is provided.
2014-12-08 18:38:46 +01:00
Thibault Saunier 5beaf5dfa8 validate: launcher: Set a hard timeout on GstValidate tests if we know the duration 2014-12-08 16:34:48 +01:00
Thibault Saunier a2abf628dc validate: launcher: Force kill subprocess when done with them
Making sure that we do not end up having spurious subprocess around
2014-12-08 16:19:20 +01:00
Thiago Santos d25fb034fa launcher: baseclass: add missing parameter
Fixes "NameError: global name 'options' is not defined"
2014-12-08 08:43:57 -03:00