Commit graph

2386 commits

Author SHA1 Message Date
Philipp Zabel
99eaad17e2 validate: fix pause duration handling
Commit 394242c224 ("validate:scenario: Enhance variable
implementation") caused the duration parameter to be stored
as a double instead of GstClockTime, which the _execute_pause
implementation expects. Fix the parameter type and use
gst_validate_action_get_clocktime to handle duration correctly.

https://gitlab.freedesktop.org/gstreamer/gst-devtools/merge_requests/73
2019-04-02 20:55:41 +00:00
Nicolas Dufresne
4262c23a9c debug-viewer: Use python.install_sources()
With current implementation we would try and install into the system
path regardless of the prefix. On top of that, we could install any left
over pyc file and would install the unit test also.

To fix this, we now list every files to be installed and use
python.install_sources(), leaving to meson the decision on where things
should be installed.
2019-04-02 12:13:06 -04:00
Nicolas Dufresne
40755c2d90 meson: validate: Fix linking error missing GstBaseTransform
There is a mockdecryptor that has been added into validate-sources and
this element is base on GstBaseTransform. This added a deps against
gstbase which was leading to linking errors when building with meson.
2019-04-01 14:51:31 -04:00
Jimmy Ohn
1858853bf2 codecanalyzer: Use glib variant of strcmp
safer, and avoids missing include
2019-04-01 21:49:37 +09:00
Jimmy Ohn
6754d4e9f2 validate: Print some log when environment variable is not set
print some log when environment variable is not set
2019-04-01 21:40:58 +09:00
Tim-Philipp Müller
9521fdbf88 meson: validate: actually pass extra arguments to gnome.generate_gir()
Especially the init section and the --quiet.

Remove the whole manual build/source dir include addition
to the g-ir-scanner args seeing that things worked fine
without the args being passed to the scanner at all.
2019-03-23 19:51:08 +00:00
Tim-Philipp Müller
d99994a849 validate: fix g-i warnings
gst-validate-utils.c:914: gst_validate_element_matches_target: unknown parameter 'structure' in documentation comment, should be 's'
gst-validate-override-registry.h:49: gst_validate_override_registry_get_override_list: return value: Missing (element-type) annotation
2019-03-23 19:47:24 +00:00
Tim-Philipp Müller
2d24674b6c g-i: pass --quiet to g-ir-scanner
This suppresses the annoying 'g-ir-scanner: link: cc ..' output
that we get even if everything works just fine.

We still get g-ir-scanner warnings and compiler warnings if
we pass this option.
2019-03-23 19:22:29 +00:00
Xavier Claessens
ad24cb1b77 Avoid C99 declaration in 'for' loop 2019-03-22 15:37:37 -04:00
Thibault Saunier
6310145a44 validate:launcher: Set CK_MULTIPLIER=10 in GstCheck tests when using valgrind
Fixes https://gitlab.freedesktop.org/gstreamer/gst-devtools/issues/39
2019-03-22 11:23:08 -03:00
Tim-Philipp Müller
bf12d56f14 meson: use new 'python' module instead of deprecated 'python3' one
https://github.com/mesonbuild/meson/pull/4169
2019-03-21 13:06:00 +00:00
Matthew Waters
f6ae425a1a validate: allow building a static overrides library 2019-03-18 01:07:05 +00:00
Charlie Turner
ab0be78469 validate: Add a mock decryptor element. 2019-03-15 22:18:29 +00:00
Alicia Boya García
e536b05e5a validateflow: Fail when a pad is not attached
Previously validateflow tests did not fail when the pad was not
attached.

This was a limitation caused by how the Validate API worked. Before, the
`notify::validate-runner` signal was not emitted until a monitor was
attached to the override. This made impossible to listen for the
runner's `stopping` signal.

This patch fixes the problem by setting `validate-runner` for all
existing overrides when the runner is initialized and adding checks in
validateflow to error in the case no pad was attached.
2019-03-15 17:38:15 +00:00
Thibault Saunier
773f2e456c validate:launcher: Move '_format_config_template' to the utilities
So it can be reused by GES tests
2019-03-11 18:14:23 -03:00
Thibault Saunier
c9eaf1fc02 validate: Check that position <= duration from the pipeline monitor
We should not require a scenario for that check to happen
2019-03-11 18:14:23 -03:00
Thibault Saunier
c32c3e82d6 validate:scenario: Cleanup spurious error message 2019-03-11 18:14:23 -03:00
Thibault Saunier
b61cb56e20 validate-flow: Add an ignored-event-fields configuration
It replaces `record-stream-id` as it is a more generic way of doing
the same thing.
2019-03-11 18:14:23 -03:00
Thibault Saunier
8f75606bf7 docs: Document the validateflow plugin 2019-03-11 18:11:38 -03:00
Edward Hervey
9772e0c1d2 validate: More usage of g_strcmp0 instead of strcmp 2019-03-06 10:15:21 +01:00
Edward Hervey
ec7cd5a092 validateflow: Use glib variant of strcmp
safer, and avoids missing include
2019-03-06 10:11:59 +01:00
Edward Hervey
a750e3b540 validate: Include config.h before anything else
To avoid double-defines (such as GST_LEVEL_DEFAULT)
2019-03-04 15:20:49 +01:00
Tim-Philipp Müller
4893d6d561 Back to development 2019-03-04 09:15:11 +00:00
Tim-Philipp Müller
3fface0275 Release 1.15.2 2019-02-26 19:44:21 +00:00
Tim-Philipp Müller
61f1289dcc scenarios: don't clobber scenarios in 'make install'
/usr/bin/install: will not overwrite just-created '_inst/share/gstreamer-1.0/validate/scenarios/default-seek-flags.scenario' with '../../../../data/scenarios/rtsp_overrides/includes/default-seek-flags.scenario'

https://gitlab.freedesktop.org/gstreamer/gst-devtools/merge_requests/44#note_123683
2019-02-26 19:44:21 +00:00
Tim-Philipp Müller
536a7dddb1 validate: add new API to exports file 2019-02-26 18:53:58 +00:00
Thibault Saunier
c7270b2d8a validate: Notice that issue summaries should be 'stable'
As they are used in the testsuite to define known issues
2019-02-24 00:44:57 +00:00
Alicia Boya García
f0abd316e2 gst-validate-scenario: Make waits optional in appsrc-push
While in many cases it's desirable to wait for a buffer to be pushed
downstream when using appsrc-push, in some cases this is not possible as
such pushing action is dependent on following actions that would not be
executed if we wait.

An example for this is prerolling:

    appsrc ! qtdemux ! video/x-h264 ! decodebin name=dec ! %(videosink)s

    description, seek=false, handles-states=true
    appsrc-push, target-element-name=appsrc0, file-name="raw_h264.0.mp4"
    set-state, state=playing
    appsrc-eos, target-element-name=appsrc0

In order for the preroll to occur, both the appsrc needs to push the
buffer and the state needs to reach PLAYING. But `set-state` cannot
finish if the buffer has not been pushed (the state transition does not
finish) and conversely pushing the buffer will not finish until the
state has reached.

Making appsrc-push not wait for the buffer solves this problem. This
patch makes appsrc-push aware of this issue by only waiting for the
buffer to be pushed if the pipeline is in a state that allows buffers to
flow.
2019-02-24 01:23:58 +01:00
Alicia Boya García
af205f63b7 gst-validate-scenario: Fix (another) race condition in EOS handling
Since gst_validate_action_set_done() is asynchronous, the bus EOS
handler may already be running before the action is actually finished.
This patch ensures that is not a problem.
2019-02-22 00:02:08 +01:00
Charlie Turner
a443b921a2 validateflow: interpolate folder directories into pipeline descriptions.
Allow 'pipeline' fields in validateflow to be interpolated with
directory keys like $(medias)s.
2019-02-21 13:57:17 +00:00
Guillaume Desmottes
b20f73099f validate: allow config to check for minimum buffer frequency on pads
This change allow tests to check performance of elements by checking the
frequency at which buffers are pushed on src pads.
I re-used most of the logic from fpsdisplaysink to compute the
frequency.

We can now uses something like:
  GST_VALIDATE_CONFIG='core,min-buffer-frequency=60,target-element-factory-name=v4l2src'

The 'buffer-frequency-start' optional field can be used to ignore the
frequency during the start of the pipeline. This is useful when testing live
pipelines where configuring and setting up elements can take some time slowing
down the first buffers.
2019-02-20 12:12:46 +01:00
Guillaume Desmottes
40f263e857 validate: factor out gst_validate_element_matches_target() 2019-02-20 12:12:46 +01:00
Charlie Turner
4602ee61c4 validateflow: Fix double-free on stdout 2019-02-18 11:05:26 +00:00
Thibault Saunier
34b5192b94 validate: report: Fix the way we print 'repeat' values 2019-02-15 14:19:03 +00:00
Thibault Saunier
53b2ca8f62 validate: Force LC_NUMERIC to C as it is required by our expression parser
And... add some expression parser unit tests
2019-02-15 14:19:03 +00:00
Thibault Saunier
394242c224 validate:scenario: Enhance variable implementation
- Stop arbitrarily consider params as ClockTime based on their names
  but add a convetion that the `.type` field of the ActionType should
  end by `(GstClockTime)` when it is a clock time.
2019-02-15 14:19:03 +00:00
Thibault Saunier
b7616e5fab validate:scenario: Make gst_validate_action_new public
Mainly so it can be used in unit tests.
2019-02-15 14:19:03 +00:00
Thibault Saunier
be854d4be8 validate:scenario: Allow using set-vars from numeric expressions
And require them to follow the `$varname` (can't be $(varname) as
parenthesis have another meaning in those expressions).

Still accept "duration" and "position" as varname for backward compat
but update our scenarios anyway.
2019-02-15 14:19:03 +00:00
Thibault Saunier
28e041b2cb validate: scenario: Parse playback times as we execute the scenario
This way we will be able to use 'set-vars' for it
2019-02-15 14:19:03 +00:00
Thibault Saunier
d24477d9e4 validate:scenario: Enforce a synthax $(varname) to reference variables
This way it is clear that you are using a variable reading the scenario
and we can verify that what the scenario writer intents is to use an
already set variable.
2019-02-15 14:19:03 +00:00
Guillaume Desmottes
3ebc26e265 validate: don't override max-latency if config contains multiple structs
gst_validate_utils_get_clocktime() is resetting the value if it's not
present in the struct so we were overriding it on the next iterations.
2019-02-12 02:21:14 +00:00
Guillaume Desmottes
da22878a5f validate: baseclasses: include env variable in logged command
We were missing the env variables in the command written to the log
file, making it impossible to re-run the test later from the logs.
2019-02-11 15:17:33 +00:00
Alicia Boya García
1d4801d679 gst-validate-scenario: Add GST_VALIDATE_SCENARIO_EOS_HANDLING_LOCK
There was a race in appsrc-push when the pushed buffer caused an EOS.
The EOS event could be handled by the main thread, finishing the test
while the action, executing in the streaming thread, has not finished
yet.

A mutex is now introduced to add mutual exclusion for the two threads so
that an EOS does not cause the termination of the test while the action
is still going.
2019-02-11 14:15:30 +00:00
Thibault Saunier
5a2e2d5001 validateflow: Print some indication that the flow checking is happening 2019-02-11 08:34:36 -03:00
Edward Hervey
4467c9925d validate: Add autotools support for flow plugin 2019-02-11 11:09:46 +01:00
Thibault Saunier
3d3264b342 Revert "validate:launcher: Cache the result of meson introspect"
This reverts commit 05ce6d3b92.

We can't do that as it breaks meson logic to set envvars
2019-02-10 01:25:52 -03:00
Thibault Saunier
5a6307f913 validate:launcher: Do not sort tests all the time
Do it once only once it is fully populated
2019-02-09 17:25:03 -03:00
Thibault Saunier
05ce6d3b92 validate:launcher: Cache the result of meson introspect
Running it takes quite some time and we can easily cache it.
2019-02-09 17:24:13 -03:00
Thibault Saunier
a88156a416 validate:launcher: Add a simple way to profile app 2019-02-09 17:23:28 -03:00
Guillaume Desmottes
0e03b38cc2 validate: scenario: not need to use an atomic to handle dropped count
It's all handled from the same thread.
2019-02-08 14:39:22 +01:00