Commit graph

337 commits

Author SHA1 Message Date
Thibault Saunier
35003bc25b validate:launcher: Do not print passing tests if not running in a tty 2019-01-31 23:47:11 -03:00
Thibault Saunier
78781de913 validate:launcher:punittest: Raise an exception if a testsuite can't be loaded 2019-01-30 15:57:13 -03:00
Mathieu Duponchelle
d5e3f4d31c TestsManager: stop displaying blacklisted tests on stdout
It's basically spam, better suited to the debug logs
2019-01-30 00:27:32 +00:00
Thibault Saunier
440055214a validate:launcher: Never print lines larger than the terminal 2019-01-29 16:09:30 -03:00
Jordan Petridis
31164cf0a6 validate: Report the full test name in the xunit file
Looks like gitlab prefers this way of representing tests as it
displays only the name field in its junit reports.

Close #32
2019-01-26 16:55:23 +00:00
Thibault Saunier
2551e8750e validate:launcher: Make baseclasses.py pep8 compliant 2019-01-26 15:54:00 +00:00
Thibault Saunier
9b69bcad08 validate:launcher: Handle launching launching a sub launcher
If you use validate-launcher in a meson testsuite, those test now
gets integrated as one unique testsuite (with a pretty long namespace).
2019-01-26 15:54:00 +00:00
Thibault Saunier
6665652cff validate:launcher: Refactor the "main" function
- Move the parser code into a `LauncherConfig.create_parser()` method
- Remove the need to pass libsdir to the _TestsLauncher object
- Extract out a `setup_launcher_from_args` function
2019-01-26 15:54:00 +00:00
Thibault Saunier
1b3867b82d launcher: Move http serveur and xvfb server to the main test runner object
No good reason for it to be in the main function
2019-01-26 15:54:00 +00:00
Thibault Saunier
3f4f815500 launcher: Cleanup the way we find python test command line
By setting it before the test base class adds the current testsuite name in the classname
2019-01-26 15:54:00 +00:00
Thibault Saunier
9cf213dee0 launcher: Fix test listing in meson VS gstcheck tests
You might select tests that match Meson but not gstcheck in which
case the 'meson only' variant is exposed but those should never exist.
2019-01-26 15:54:00 +00:00
Thibault Saunier
a3bab7c66e validate:launcher: Add %(config_path)s in the pipeline desc vars
When defining pipelines_descriptions to run test on in a `.json` file, you might
need to point to paths in the testsuite directory (for media files URIs
for example), you can now do

 `"pipeline": "filesrc location="$(config_path)s/../medias/some/file.mkv...`
2019-01-26 10:11:24 -03:00
Thibault Saunier
7befe3d033 validate:launcher: Display unix nickname of signals leading to test failure 2019-01-15 16:55:32 -03:00
Thibault Saunier
5692f8d74d validate:launcher: Fix error message about 'crashed' test 2019-01-15 16:05:41 -03:00
Guillaume Desmottes
b1f22e7130 validate: fix crash if timeout when media_descriptor is None
Some tests may not have any media_descriptor. If those were failing to
shutdown after EOS we were calling get_protocol() on None.
2018-12-17 10:34:43 +01:00
Alexandru Băluț
9a04ba5000 validate:launcher: Fix error message 2018-12-14 12:00:18 +01:00
Alexandru Băluț
b280850718 validate:launcher: Fix discovery of commands 2018-12-14 11:17:41 +01:00
Thibault Saunier
b0c0c2d846 validate:launcher: Do not CK_FORK on our test
Otherwise the process can't cleanly quit on assertion because of the way libcheck runner is implemented
2018-12-07 09:06:50 -03:00
Thibault Saunier
72995d5bbe validate: launcher: Add a way to retrieve trace without coredumpctl
Simply spnning on segfaults (like gst-launch) and catch that in
the launcher to transform the timeout into a segfault and grab a gdb
backtrace
2018-12-07 09:06:50 -03:00
Thibault Saunier
21e23c72fc validate:launcher: Do not take CK_DEFAULT_TIMEOUT into account to set the timeout
The timeout is what is set in the meson build definition otherwise we will not behave as 'meson test' which we should avoid
2018-12-06 23:17:29 -03:00
Thibault Saunier
5767d553a6 validate:launcher: Make failure as <failure> in our xunit reporter
I think it was a mistake to call them <error> as the two notions are
different (we marked failed test as "failures" in the <testuite> node).

Should make gitlab happy with our file!
2018-12-06 15:51:43 -03:00
Thibault Saunier
1c51d3499e validate:launcher: Add a GST_VALIDATE_LAUNCHER_MAIN_DIR env variable
This is generally usefull so we do not have to pass -M every time we launch the launcher

And it adds support for nesting launcher calls always respecting the provided main directory

+ Fix some new pep8 errors
2018-11-30 11:00:10 -03:00
Thibault Saunier
ec9464dd90 validate:launcher: Don't about unexisting tests when filtering tests
It was wrong
2018-11-28 10:19:52 -03:00
Thibault Saunier
b971a7cd23 validate:launcher: Fix setting meson tests as "parallel" 2018-11-28 10:11:00 -03:00
Thibault Saunier
9ab1d3b6fb validate:launcher: Avoid using not yet set variables
And make the file pep8 compliant with latest pep8 checker.
2018-11-26 10:16:12 -03:00
Thibault Saunier
4bb2648154 validate: launcher: Add a way to load pipeline tests from a scenario 2018-11-25 12:01:12 -03:00
Thibault Saunier
a28ce1b0c9 validate: Update default testsuite git repository 2018-11-22 21:06:36 -03:00
Thibault Saunier
64afff0c3e launcher:scenario: Fix the way we compute scenario path/name when paths supplied
We were just iterating over the list without any check and could end
up with a patch that was not corresponding to the actual scenario.
2018-09-08 11:13:19 -03:00
Thibault Saunier
1623f7111c validate:launcher: Just wait for a while before considering Xvfb is ready if xset is not present
This is what xvfb-run so let's consider it good enough
2018-09-07 16:19:50 -03:00
Thibault Saunier
f0cfdf9d14 validate:launcher: Use fakevideosink everywhere it makes sense. 2018-09-07 16:19:40 -03:00
Alicia Boya García
5ff299f4e7 gst-validate-launcher: Print copypaste-friendlier commands
This patch removes the quotes surrounding the command shown by
gst-validate to reproduce the issues -- which were troublesome when
copying and pasting.

It also introduces escaping for the arguments, so that the command line
can be copied and pasted in the terminal without further changes.

https://bugzilla.gnome.org/show_bug.cgi?id=796897
2018-07-30 16:13:25 -04:00
Thibault Saunier
615a372274 validate: launcher: Print some ERROR log when inspecting scenario fails 2018-07-21 11:43:40 -04:00
Thibault Saunier
4f009f4098 validate:launcher: Minor output string message 2018-07-12 19:13:21 -04:00
Edward Hervey
e0f683dde9 validate: Use 'skipped' keyword in xunit xml
It was always meant to be 'skipped' to be 100% compatible with xunit
xsl.

Makes jenkins happy again
2018-07-10 13:23:46 +02:00
Thibault Saunier
29ef55c469 validate:launcher: Stop spamming envvars in unit tests command printing.
We used to print the whole environment, making it ugly and hard to
read.
2018-07-08 17:04:25 -04:00
Thibault Saunier
69ec48feef validate:launcher: Allow retrieving coredumps from within flatpak 2018-07-01 12:55:06 -04:00
Thibault Saunier
acb3a276c8 validate:launcher: Fix the --forever switch
It was not stopping on error.

https://bugzilla.gnome.org/show_bug.cgi?id=796608
2018-06-17 08:45:23 -04:00
Thibault Saunier
d80fb50c4b validate:launcher: Add a TestManager to run python tests
Add a stupid simple testsuite made to be configured from the outside
2018-06-15 17:57:24 -04:00
Thibault Saunier
58c90448ca validate: launcher: Add support for running tests with a pushfile source
Introducing the `.media_info.push` media info extension, which is meant
to let the launcher know that those file should run with the "pushfile://"
protocol.

And allow symlinking "normal" `.media_info` to their `.pushfile` variant
so that both can share the exact same content.
2018-06-15 12:05:14 -04:00
Thibault Saunier
b2e71e1404 validate: media-check: Add a way to skip pluggin parsers
This is useful when you want to check only the demuxer output.

- Keep the information in the media file so that we can launch media-check
  with the proper arguments in the launcher. Update it accordingly.
- Refactor compare_streams to simplify it, which in the end leads to
  reporting all the issues instead of exiting on the first one.
2018-06-15 12:05:14 -04:00
Alicia Boya García
40dfb7174e gst-validate-launcher: let gdb handle SIGINT itself
Otherwise both gdb and gst-validate-launcher will react to ^C at the
same time, gdb will be killed by SIGHUP (because gst-validate-launcher
quitted in consequence of the ^C) and the terminal state will be left
garbled because readline inside gdb had disabled echo.

https://bugzilla.gnome.org/show_bug.cgi?id=796396
2018-05-25 12:59:41 +02:00
Alicia Boya García
bfa143caa9 gst-validate-launcher: disable timeouts when debugging in gdb interactively
An interactive debugging session can be going for a long time, we don't
want any timeouts in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796397
2018-05-25 12:59:40 +02:00
Alicia Boya García
2c32ccd7a7 gst-validate-launcher: Stop in --gdb by default, add --gdb-non-stop
This patch modifies the default behavior of --gdb to not run and quit
automatically the test, but rather wait for user input. This is
usually much more convenient to debug all kinds of bugs.

The automatic run behavior has been moved to a new command switch:
--gdb-non-stop

https://bugzilla.gnome.org/show_bug.cgi?id=796389
2018-05-25 12:59:38 +02:00
Thibault Saunier
bb71fd9944 validate:launcher: Error out loudly if the testlist changes
When --fail-on-testlist-change is set.
2018-05-15 14:45:54 -04:00
Thibault Saunier
1055540d55 validate:launcher: Do not print time spent if the testsuite never started 2018-05-15 14:45:52 -04:00
Thibault Saunier
2dc7dd1257 validate: launcher: Make sure testsuites are used/configured once only 2018-05-13 19:10:59 -04:00
Thibault Saunier
ef9ff93405 validate:launcher: Add a way to check if a gst feature is present
And make sure iqa is present to run IQA tests.
2018-05-13 16:35:41 -04:00
Thibault Saunier
b00ab02254 validate:launcher: Cleanup the way we find where -validate tools are 2018-05-13 09:44:17 -04:00
Thibault Saunier
c1f89b4acb validate: launcher: Add a way to simply run SSIM checks on rendered files
We will run a simple pipeline with the IQA element to run ssim (dssim)
tests on the rendered files, comparing it with a reference file.

For now we use the very empiric 1.0 value as a ssim error threshold and
the goal is basically to detect completely broken renderings.
2018-05-13 09:44:17 -04:00
Thibault Saunier
c93f1704f8 validate: Add support for the new testbin protocol 2018-05-13 09:44:17 -04:00