Commit graph

1991 commits

Author SHA1 Message Date
Thibault Saunier
39d6c7760e validateflow: Add a logged-event-fields configuration 2020-02-13 00:11:45 +00:00
Thibault Saunier
27fc0d45a2 validate:scenario: Stop rounding up clocktime values
This doesn't make any sense in that context
2020-02-11 15:57:56 -03:00
Thibault Saunier
d3c6611b76 validate:launcher: Fix defining several scenario with a same config
When generating tests from dictionary the dict format allows passing
several scenario for a same config and pipelines, but this was breaking
the case where expected flow is different with each config, instead we
should generate one config per scenario, fixing the expectation files
generated.
2020-02-06 14:33:56 -03:00
Thibault Saunier
600c5a27ed validate:launcher: Print the duration of the test run in the logs 2020-02-04 16:09:36 -03:00
Thibault Saunier
5b82274f17 validate:flow: Add a way to set the types of events to log/ignore
Added two properties to the plugin:
     * ignored-event-types: A list of event types to be ignored when logging events
     * logged-event-types: A list of event types to be logged when logging events

This commits also moves the "ignored-event-fields" property to using a proper
GstValueList for the list of event fields to be taken into account, instead
of the home grown separated by comas list of string, making the API more
uniform.

This also adds a simple helper method: `gst_validate_utils_get_strv`
2020-02-04 16:09:36 -03:00
Stéphane Cerveau
a2e926ff0a gst-validate-launcher: separate known error from passed tests
Introduce known_error in statistics to keep in mind the expected
error result.
2020-01-24 14:52:49 +00:00
Stéphane Cerveau
2581fef684 gst-validate-launcher: update documentation
Use the new api to create your custom testsuite.
Fix some broken links and enhance the logging system.
2020-01-24 14:52:49 +00:00
Nicolas Dufresne
1bc8e92efc launcher: Allow partionning the tests
This introduce new command line options, --parts and --part-index. When
--parts is set to a value larger then 1, the tests will be split in the
same number of group. The group number identified by --part-index will
be executed.

This is being added in orther to support gliblab CI parallel feature.
2020-01-15 10:04:11 -05:00
Thibault Saunier
e4ca67938e validate:launcher: Try to dump logs with bat if avalaible
We got to many issues with mdv, it seems not to be maintained
bat is a very good replacement.
2020-01-06 13:14:59 +00:00
Brady J. Garvin
06822b519b validate:launcher: Support mixed str/bytes control sequences.
It is not safe for `_preformat_levels` to assume that all of the fields in a
`TerminalController` have the same type; at least in my environment, some of
these fields are populated with `bytes` while others remain strings.

This change conditionally applies decoding to each control sequence separately
using a helper function `_as_string`.  As a side-effect, it also eliminates some
code repetition in `_preformat_levels`.

Closes #50.
2020-01-05 14:09:07 -06:00
Thibault Saunier
195d3a3edc validate:launcher: Enhance progress reporting using a progress bar
This also allows us to properly report progress on the CI
2019-12-30 16:52:22 +00:00
Thibault Saunier
d543375948 validate:launcher: Take our timeout factor into account for gstcheck 2019-12-30 15:56:02 +00:00
Thibault Saunier
0b3ce37eea validate:scenario: fix some typos 2019-12-30 10:25:55 -03:00
Thibault Saunier
bba35fccf2 validate:scenario: Implement an action to check property value 2019-12-30 10:25:55 -03:00
Mathieu Duponchelle
27677d4e10 check: unblacklist removed systemclock tests
See https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/348
2019-12-23 10:27:11 +01:00
Mathieu Duponchelle
48faa5944b check: unblacklist gstreamer.pipelines_parse_launch.delayed_link
It should not be flaky anymore after
https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/343
2019-12-14 10:45:30 +01:00
Thibault Saunier
1f67876928 validate:launcher: Use python dict for pipeline description 2019-12-10 13:02:16 +00:00
Edward Hervey
43815541d8 validate-scenario: Initialize variable
We could end up using it uninitialized

CID: 1444920
2019-11-27 15:33:14 +01:00
Thibault Saunier
562750213f validate: launcher: Make encoding extra check use common code path
Reusing the reporting infrastructure instead of shurtcuting it
2019-11-20 18:07:48 -03:00
Thibault Saunier
8a6ee4841b validate: Add vp9 transcoding tests
Making sure to encode small frames as vp9enc is slow.
2019-11-20 18:07:47 -03:00
Edward Hervey
4f0bfcc7bb validate: Fix memory leaks
Various structures were being leaked.
2019-11-20 10:19:00 +01:00
Thibault Saunier
80de180cc7 validate:launcher: Avoid clashes when importing testsuite
This introduce an hard dependency on python >= 3.5, same as meson
2019-11-11 18:57:27 -03:00
Jordan Petridis
6b907ba036
check: blacklist gst-plugins-good.elements_splitmux.test_splitmuxsink$
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/626
2019-11-11 14:25:16 +01:00
Stéphane Cerveau
998185acbc gstvalidate: fix GstValidateRTSPMediaDescriptor typo 2019-11-06 18:21:11 +01:00
Alicia Boya García
56d82af7b1 gst-validate-bin-monitor: Remove unused field. 2019-11-02 17:07:02 +01:00
Alicia Boya García
deca1f9cbf validateflow: Don't use colon in file names
The colon character commonly used to separate the element name and the
pad name is reserved in Windows filesystems, so it's better to use
something safer.

This patch replaces it with '-'. Please update
gst-integration-testsuites too where another commit has renamed all the
files.
2019-10-25 13:23:52 +00:00
Víctor Manuel Jáquez Leal
37a0dbfebf validate: blacklist gstreamer-vaapi checks
They still can be checked by running the tests explicitly.
2019-10-25 12:26:58 +02:00
Tim-Philipp Müller
280321dee1 validate: remove autotools build 2019-10-15 00:24:00 +01:00
Thibault Saunier
2153d82f34 validate:launcher: Fix the 'can-happen-several-times' known issue field 2019-10-02 19:22:31 +00:00
Thibault Saunier
1f68027942 validate: Check that pull_range is called from the streaming thread
`gst_pad_pull_range` should always be called from the streaming thread,
we now check that when pull_range is called, and if the sinkpad calling
the function has a GstTask with a running thread, the function is called
from that thread.
2019-10-02 19:22:31 +00:00
Nicolas Dufresne
50971aa2c6 validate-scanario: Fix crash when using installed validate
When installed, the lookup path will endup on the very last try, but the
scenario_file was left unset, which lead to a crash.
2019-09-27 16:52:51 -04:00
Matthew Waters
e3f4d51771 validate: fix build with newer gcc
In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../validate/gst/validate/gst-validate-scenario.c:45:
../validate/gst/validate/gst-validate-scenario.c: In function ‘gst_validate_scenario_load’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1067:26: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1067 | #define GST_ERROR(...)   GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~
../validate/gst/validate/gst-validate-scenario.c:3615:5: note: in expansion of macro ‘GST_ERROR’
 3615 |     GST_ERROR ("Invalid name for scenario '%s'", scenario_name);
      |     ^~~~~~~~~
../validate/gst/validate/gst-validate-scenario.c:3615:44: note: format string is defined here
 3615 |     GST_ERROR ("Invalid name for scenario '%s'", scenario_name);
      |                                            ^~
2019-09-24 11:45:34 +10:00
Thibault Saunier
461e479802 validate:launcher: Do not hardcode pathsep 2019-08-28 15:34:31 -04:00
Matthew Waters
993b752816 validate/flow: fix werror build with android clang
../validate/plugins/flow/gstvalidateflow.c:75:3: error: redefinition of typedef 'ValidateFlowOverride' is a C11 feature [-Werror,-Wtypedef-redefinition]
} ValidateFlowOverride;
  ^
../validate/plugins/flow/gstvalidateflow.h:31:23: note: previous definition is here
G_DECLARE_FINAL_TYPE (ValidateFlowOverride, validate_flow_override,
                      ^
2019-08-28 18:33:32 +10:00
Matthew Waters
9249f60b70 validate: fix -Werror=unused-function with clang
[3623/4053] Compiling C object 'subprojects/gst-devtools/validate/plugins/flow/697521d@@gstvalidateflow@sha/gstvalidateflow.c.o'.
../subprojects/gst-devtools/validate/plugins/flow/gstvalidateflow.c:85:1: warning: unused function 'VALIDATE_IS_FLOW_OVERRIDE' [-Wunused-function]
G_DECLARE_FINAL_TYPE (ValidateFlowOverride, validate_flow_override,
^
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                         ^
<scratch space>:129:1: note: expanded from here
VALIDATE_IS_FLOW_OVERRIDE
^
2019-08-26 12:14:47 +00:00
Matthew Waters
cca6ae3fdb validate: fix -Werror=format-nonliteral build with clang
[3470/4053] Compiling C object 'subprojects/gst-devtools/validate/gst/validate/28db7b6@@gstvalidatetracer@sha/gst-validate-reporter.c.o'.
../subprojects/gst-devtools/validate/gst/validate/gst-validate-reporter.c:186:31: warning: format string is not a string literal [-Wformat-nonliteral]
  message = g_strdup_vprintf (format, vacopy);
                              ^~~~~~
[3487/4053] Compiling C object 'subprojects/gst-devtools/validate/gst/validate/28db7b6@@gstvalidatetracer@sha/gst-validate-report.c.o'.
../subprojects/gst-devtools/validate/gst/validate/gst-validate-report.c:1007:34: warning: format string is not a string literal [-Wformat-nonliteral]
  tmp = gst_info_strdup_vprintf (format, args);
                                 ^~~~~~
[76/151] Compiling C object 'subprojects/gst-devtools/validate/plugins/flow/697521d@@gstvalidateflow@sha/gstvalidateflow.c.o'.
../subprojects/gst-devtools/validate/plugins/flow/gstvalidateflow.c:125:65: warning: format string is not a string literal [-Wformat-nonliteral]
  if (!flow->error_writing_file && vfprintf (flow->output_file, format, ap) < 0) {
                                                                ^~~~~~
2019-08-26 12:14:47 +00:00
Philippe Normand
b0778d80c6 validate: Add a scenario for 5 seconds playback use-cases 2019-08-21 14:12:57 +00:00
Philippe Normand
83320610b2 validate/ssim: Clean-up temporary directory
When no output-dir is specified in the plugin config, a temporary directory is
created, so it needs to be removed when no-longer needed.
2019-08-21 11:50:03 +00:00
Philippe Normand
3351807107 validate/launcher: Ensure the HTTP server is started when a pipeline needs it
Pipelines declared in gst-integration-testsuites can rely on the validate HTTP
server, so when an URI pointing to it is detected, advertise the server as
needed before starting the test.

For this to work the test scenario should explicitely declare the pipeline uri,
as shown in this example:

    "some_playbin3":
    {
        "pipeline": "playbin3 uri=%(uri)s video-sink=%(videosink)s",
        "config": [
            "%(validateflow)s, pad=sink:sink"
        ],
        "scenarios": ["play_15s"],
        "uri": "http://127.0.0.1:%(http-server-port)s/defaults/html/foo.html"
    }
2019-08-21 08:37:38 +01:00
Thibault Saunier
8e01e03364 validate:launcher: Allow passing any extra_data in json test definition
This means that we can now pass any extra key that `populate_tests`
expects, meaning any key expected by FakeMediaDescriptor and
a few other keys supported by the methods such as
`expected-issues` and `extra_env_vars`
2019-08-20 13:55:52 +00:00
Thibault Saunier
556bc0bb4f launcher: Raise an exception when provided scenario can't be found 2019-08-19 10:33:20 +00:00
Aaron Boxer
e1129d2516 validate: add missing G_BEGIN/END_DECLS in validate.h 2019-08-03 20:09:32 -04:00
Mathieu Duponchelle
5a068bff72 validate: Update blacklisting reason for fast forward rtsp
While https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/14
was merged, the client side (in particular rtpbasedepayload) still
isn't expected to work appropriately
2019-08-01 21:04:12 +02:00
Tim-Philipp Müller
d8d35241fe validate: fix build with older GLib versions
g_enum_to_string() is only available in newer ones.

Add compatibility workaround for the time being to decouple
this from the decision whether to bump the GLib requirement
and what to bump it to.

https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/199

Fixes #45
2019-07-29 10:08:51 +01:00
Mathieu Duponchelle
7c255a9015 scenario: fix PAUSED position check
The way this was implemented was simply wrong, first of all checking
the position against the segment after a seek in PAUSED by a query
of the pipeline position is of limited interest, and can only work
in forward playback.

Furthermore the check was a huge blob of code that didn't even look
like it was pretending to do a good job at checking the position in
reverse playback.
2019-07-26 02:34:55 +02:00
Mathieu Duponchelle
93114b55ab json tests: assume all user pipelines can seek reverse
When doing a targeted test, it is up to the user to make sure
their pipeline + scenario behaves correctly.
2019-07-26 02:26:20 +02:00
Thibault Saunier
ba4275ad00 validate:launcher: Pass the right timeout_factor is passed to subprojects 2019-07-08 23:37:31 -04:00
Thibault Saunier
aea1082116 scenario: Do not dereference NULL pointer 2019-07-08 23:36:52 -04:00
Thibault Saunier
8498861a28 validate:pipeline-monitor: Connect deep properties notification only when required
This is quite expensive and can lead to an overwhelm mainloop.
2019-07-03 15:42:32 -04:00
Thibault Saunier
258453a169 validate:scenario: Keep a reference to 'description' structure
For it to be reusable outside the scenario
2019-06-28 17:34:23 -04:00
Thibault Saunier
91728c6170 scenario: Use internal sinks when a sink bin can be used to check last-sample 2019-06-26 12:09:03 -04:00
Thibault Saunier
c28c0b5f98 validate:flow: Log buffers even when tracking srcpads 2019-06-26 12:09:03 -04:00
Thibault Saunier
3343f166da validate:launcher: Move get_fakesink_for_media_type to utils
So it can be reused in other apps like GES
2019-06-26 12:09:03 -04:00
Thibault Saunier
1e1797ee3a validate: Also monitor ghost pads
Allowing overrides to work on ghost pads too
2019-06-26 12:09:03 -04:00
Thibault Saunier
25a7173b22 validateflow: Add buffers-checksum option to log buffers data checksum 2019-06-26 12:09:03 -04:00
Thibault Saunier
ade8ba3fcb validate: Add SCENARIO_NAME and CONFIG_NAME vars in configs/scenarios 2019-06-26 12:09:03 -04:00
Thibault Saunier
7d471ee25e validate: Set 'LOGSDIR' variable in scenarios and config files
Implementing support for variables in config files.
2019-06-23 03:10:34 -04:00
Thibault Saunier
b11c5ba185 scenario: Set SCENARIO_PATH/DIR variables in scenarios
And add some documentation about it
2019-06-23 01:54:26 -04:00
Thibault Saunier
0e0928b0b7 scenario: Add a TMPDIR global variables in scenarios
This also adds the notion of global variables which will be useable
in config files too.

And add some documentation about default variables in scenarios
2019-06-23 01:34:41 -04:00
Thibault Saunier
db487b2732 docs: Update validate action types
Include minor fixes in the action types and markdown generator
2019-06-18 18:15:30 -04:00
Thibault Saunier
5b52c38b85 validate: Misc leaks plugging 2019-06-18 18:13:03 -04:00
Thibault Saunier
a994dd0ca8 validate:launcher: Strip env vars in command line outputing verbose
But activate if activating verbosity more than once
2019-06-18 18:13:03 -04:00
Thibault Saunier
314fd2b6de validate:reporter: Show report by branches when doing smart reporting
Meaning that instead of getting 1 "Detected on" line per monitor,
there will be one per "branch" like:

    Detected on <audioconvert1:sink, audioconvert1:src, audioresample1:sink, audioresample1:src, smart-adder-adder:sink_0, smart-adder-adder:src, smart-adder-capsfilter:sink, smart-adder-capsfilter:src, capsfilter2:sink, capsfilter2:src, tee1:sink, tee1:src_0>

Making it simpler to read and a bit less verbose.
2019-06-11 22:35:15 +00:00
Thibault Saunier
010e18862f validate:launcher: Avoid repeating failure info in summaries 2019-06-11 21:03:56 +00:00
Thibault Saunier
0a6c7c64a9 validate:scenario: Move force-key-unit action from the transcoding tool
The action is generally useful but was implemented in a way that
was restricting its usage for no good reason. Refactor the
implementation adding more argument so it can be used in a wider
context, such as uvch264src.

Something like:

``` bash
echo "video-request-key-unit, direction=upstream, all-header=true, count=1, target-element-factory-name=h264parse, srcpad=src, playback-time=1.0" > tmp.scenario && \
echo "stop,playback-time=2.0" >> tmp.scenario && \
gst-validate-1.0 --set-scenario=tmp.scenario uvch264src \
       device=/dev/video0 name=src iframe-period=33 auto-start=true src.vfsrc ! queue ! fakesink \
       src.vidsrc ! queue ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! fakesink
```

works now.
2019-06-11 21:03:56 +00:00
Thibault Saunier
05f1c6e1b1 validate:scenario: Minor documentation cleanup 2019-06-11 21:03:56 +00:00
Thibault Saunier
f27e98caee validate:pipeline-monitor: Avoid wrong position issue
If the reported position or duration is NONE, do not check its
validity
2019-06-11 21:03:56 +00:00
Thibault Saunier
3ca0b7123e validate: Implement seeking with DEFAULT format 2019-05-27 14:36:28 +00:00
Thibault Saunier
6e9b2c35ce ssim: Report critical issue when override not attached 2019-05-23 11:52:00 -04:00
Thibault Saunier
1e2bf1c841 ssim: Fix the way we handle when an override is attached 2019-05-23 11:35:28 -04:00
Thibault Saunier
85282e53ca docs: Fix docstrings 2019-05-13 17:00:00 -04:00
Thibault Saunier
7161b21334 validate:launcher: Do not dump to big log files
Avoiding ' The script exceeded the maximum execution time set for the job' in GitLab
2019-05-13 11:37:38 -04:00
Thibault Saunier
67d4a39602 validate: inspect: Output valid markdown
So it can be used directly in the documentation Also add a special "all"
argument to `gst-validate-1.0 --inspect-action-type` so we can generate
the documentation for all action types easily.
2019-05-13 11:37:38 -04:00
Thibault Saunier
0a7b23f566 doc: Port to hotdoc
Ideally we want a GstValidate hotdoc plugin... not for now.
2019-05-13 11:37:38 -04:00
Thibault Saunier
8754d0520f meson: Use dep.type_name() when it makes sense 2019-05-13 11:37:38 -04:00
Thibault Saunier
040b71a3d9 doc: Minor fixes 2019-05-13 11:37:38 -04:00
Tim-Philipp Müller
22e179cbc1 launcher: testsuites: skip systemclock stress tests
These are very flaky when the build bots are under load.
2019-05-04 21:00:33 +00:00
Tim-Philipp Müller
751a6d756c validate: fix build on macOS
_Q_VALIDATE_MONITOR was defined twice because it wasn't declared
as extern in the header, so it would be defined as variable in all
included files. This doesn't seem to cause problems on Linux, but
seems to cause build failures on macOS.

Fixes #42
2019-05-04 19:54:16 +01:00
Tim-Philipp Müller
a1881d4dc2 Back to development 2019-04-19 10:42:30 +01:00
Tim-Philipp Müller
477d1e7d4a Release 1.16.0 2019-04-19 00:36:54 +01:00
Thibault Saunier
0544232d73 validate:check: Mare nle test_simple_operation as long 2019-04-17 18:10:12 -04:00
Thibault Saunier
fe6443090c validate:check: Fix some mistakes translating regex from gitlab-ci.yml 2019-04-17 18:10:12 -04:00
Thibault Saunier
d60ea5da63 validate:launcher: Set ORC_CODE=backup when running gst unit tests under valgrind 2019-04-17 11:04:45 -04:00
Thibault Saunier
1fb0d73947 validate:check: Blacklist and mark some GES tests as long under valgrind 2019-04-17 10:43:42 -04:00
Thibault Saunier
96f996b66a validate:testsuites: Add unit tests blacklists 2019-04-17 10:30:02 -04:00
Thibault Saunier
b9cb5db869 validate:launcher: Ignore possibly lost for now 2019-04-17 09:06:55 -04:00
Mathieu Duponchelle
96361bd426 TestsManager: _add_blacklist in set_default_blacklist
Otherwise test suites that want to set_default_blacklist and
add tests in setup_tests were seeing their blacklist ignored.

Split up and rename set_blacklists() to complete the refactoring
2019-04-17 02:31:30 +02:00
Mathieu Duponchelle
61d0605852 Check indirect leaks 2019-04-17 02:29:36 +02:00
Thibault Saunier
3fa393c498 validate:launcher: Do not copy logs for non flaky tests
That looks weird for users and is incorrect
2019-04-15 16:13:52 -04:00
Thibault Saunier
81b1368237 validate:launcher: Fix printing debug logs URIs 2019-04-15 11:50:16 -04:00
Thibault Saunier
e182272262 validate:launcher: Do not stop tcp server when reiterating tests runs 2019-04-12 12:33:25 -04:00
Thibault Saunier
d709cb54a9 validate:launcher: Associate issues with the bug they come from
Making it simpler to follow when print the known issues
2019-04-12 10:13:15 -04:00
Thibault Saunier
81f198f812 validate:launcher: Indent known issues printing 2019-04-12 10:12:45 -04:00
Thibault Saunier
e1625da9ed validate:launcher: Print the number of times the test was run when --forever 2019-04-11 10:38:46 -04:00
Thibault Saunier
0a56447bcc validate:launcher: Add python suppression files 2019-04-11 13:17:14 +00:00
Thibault Saunier
d053a07706 validate:launcher: Use md viewer to dump md logs if avalaible
And enhance the markdown
See https://github.com/axiros/terminal_markdown_viewer
2019-04-11 13:17:14 +00:00
Thibault Saunier
ebf0844d2c validate:launcher: Avoid forking when running gstcheck tests in gdb 2019-04-11 13:17:14 +00:00
Thibault Saunier
8639dc528c validate:launcher: Add an option to output HTML if commonmark is installed 2019-04-11 13:17:14 +00:00
Thibault Saunier
f7517e503c validate:launcher: Do not user python 3.5 features 2019-04-11 13:17:14 +00:00
Thibault Saunier
1294cb7b9b validate:launcher: Move all logs to one single log files to be displayed to end user 2019-04-11 13:17:14 +00:00
Thibault Saunier
446f1d8197 validate:launcher: Make extra_logfiles a set and fix their names 2019-04-11 13:17:14 +00:00
Thibault Saunier
2fcdc27c3a validate:launcher: Remove spurious print 2019-04-11 13:17:14 +00:00
Thibault Saunier
adbbfa1ec1 validate:launcher: Remove noise about empty known issues in logs 2019-04-11 13:17:14 +00:00
Thibault Saunier
148bb081b8 validate:launcher: Fix printing application name in the logs 2019-04-11 13:17:14 +00:00
Tim-Philipp Müller
dd97535391 Release 1.15.90 2019-04-11 01:27:46 +01:00
Tim-Philipp Müller
ad139b1b4f validate: autotools: dist mock decryptor header file 2019-04-11 01:25:52 +01:00
Tim-Philipp Müller
125277c73a validate: win32: add new api to export file 2019-04-11 01:02:14 +01:00
Thibault Saunier
787939f750 validate:launcher: Add a list of well known subpression files from gst-build subprojects
Fixes https://gitlab.freedesktop.org/gstreamer/gst-devtools/issues/38
2019-04-03 13:38:42 +00:00
Thibault Saunier
92f1979ec9 validate: Add a mecanism to rerun failling tests
And add a way to mark some 'flakes' as tolerated
2019-04-03 13:38:42 +00:00
Thibault Saunier
520c2102cc validate:launcher: Reset process on clean 2019-04-03 13:38:42 +00:00
Thibault Saunier
3650e66aec validate: Print error message details in our reports 2019-04-03 13:38:42 +00:00
Thibault Saunier
e279b1ff56 validate:launcher: Dump applied known issues in the logs 2019-04-03 13:38:42 +00:00
Thibault Saunier
de007b6819 validate:launcher: Put all logs inside the failure node
Pleasing gitlab CI reporting system
2019-04-03 13:38:42 +00:00
Thibault Saunier
8da6ecef13 validate:launcher: By default use cpu_count / 2 2019-04-03 13:38:42 +00:00
Thibault Saunier
b0cbae0fa7 validate:launcher: Print name of the test to be debugged
When --debug was passed
2019-04-03 13:38:42 +00:00
Thibault Saunier
dcfa084fae validate:pad-monitor: Accept any return value when we aggregated FLUSHING while tearing down
Basically nothing guarantees that the set of pads we aggregated the flow
for is the same as the one that was aggregated during the actual data
flow as some pads could have been removed meanwhile.
2019-04-03 13:38:42 +00:00
Thibault Saunier
d8aaf5fdaa validate:scenario: Allow last-sample to not be set when checking it
And instead of failling, wait for it to be set again.

Depends on https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/119
2019-04-03 13:38:42 +00:00
Thibault Saunier
c2c5c68573 validate: Return the GstValidateAction on .ref() 2019-04-03 13:38:42 +00:00
Thibault Saunier
abaa382847 validate: Generate dot files and link to them on CI 2019-04-03 13:38:42 +00:00
Thibault Saunier
01aa026e5a validate:launcher: Try to send SIGINT before killing processes
Giving a chance for validate to print reports
2019-04-03 13:38:42 +00:00
Thibault Saunier
28d413f059 validate:launcher: Add a way to say that a known issues can happen several times 2019-04-03 13:38:42 +00:00
Thibault Saunier
ba69336bf8 validate:launcher: Remove now useless code to check sending EOS brings down the pipeline
If we want to make an exception we can use known issues these days
2019-04-03 13:38:42 +00:00
Thibault Saunier
d73e283691 validate:launcher: Be a bit more resilient in GstValidateListener
And handle exception decoding received json info
2019-04-03 13:38:42 +00:00
Thibault Saunier
cd19b10d45 validate:scenario: Implement a way to execute an action on message
And use it for seek forward and fast forward scenarios
2019-04-03 13:38:42 +00:00
Thibault Saunier
374917b9c4 validate:launcher: Add a way to require a non fatal error when matching a fatal one 2019-04-03 13:38:42 +00:00
Thibault Saunier
f2e180e51f validate:launcher: Add a way to force coloration 2019-04-03 13:38:42 +00:00
Thibault Saunier
ddb81f29e8 validate:launcher: factor out TTY check and enhance iteration output 2019-04-03 13:38:42 +00:00
Thibault Saunier
48fa4b6c4b validate:scenario: Clear up last seek on EOS generating a 'stop' action
Otherwise there is a race leading to a segfault where ASYNC_DONE is
received *after* generating EOS ourselves:

```
Executing stop (
    - generated-after-eos=true
)
<Caught SIGNAL: SIGSEGV>

**Stack trace**:

...
Thread 1 (Thread 0x7f3c3e50df00 (LWP 10183)):
    #8  0x00007f3c3f01bea5 in g_cclosure_marshal_generic (closure=<optimized out>, return_gvalue=<optimized out>, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at gclosure.c:1496
    #9  0x00007f3c3f01b3dd in g_closure_invoke (closure=0x1855980, return_value=0x0, n_param_values=2, param_values=0x7ffda2e0a7e0, invocation_hint=0x7ffda2e0a760) at gclosure.c:810
    #10 0x00007f3c3f02e983 in signal_emit_unlocked_R (node=node@entry=0x15af670, detail=detail@entry=298, instance=instance@entry=0x171fc80, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffda2e0a7e0) at gsignal.c:3635
    #11 0x00007f3c3f037aaa in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffda2e0a9c0) at gsignal.c:3391
[Inferior 1 (process 10183) detached]

```
2019-04-03 13:38:42 +00:00
Thibault Saunier
0a2af1b027 validate:launcher: Add generated known issue list to the logs instead of printing then 2019-04-03 13:38:42 +00:00
Thibault Saunier
c8a3b34a3a validate:launcher: Add a way to force stdout coloring 2019-04-03 13:38:42 +00:00
Thibault Saunier
ac7efe9500 validate:launcher: Rework expected-issues data format
Instead of having the issues centered on the test classes, they
are now focusing on the "bug".

And harmise names on `expected_issue` not `expected_failures`
2019-04-03 13:38:42 +00:00
Thibault Saunier
6a4639352b validate:launcher: Allow printing log URL on a CI server 2019-04-03 13:38:42 +00:00
Thibault Saunier
06b8f23a34 validate:launcher: Fix getting skip-parser when generating media descriptor
On old version it didn't exist
2019-04-03 13:38:42 +00:00
Thibault Saunier
19dfd63408 validate:launcher: Review default for --mute
`--mute` is now True by default and added `--unmute` if the user wants
to have visual/audio feedback. It was really annoying to have thousand
of window pop up by default
2019-04-03 13:38:42 +00:00
Thibault Saunier
a77825ecbc validate:launcher: Allow referencing known issue by exiting signal names 2019-04-03 13:38:42 +00:00
Thibault Saunier
7dbdb84ca8 validate:launcher: Output markdown as much as possible 2019-04-03 13:38:42 +00:00
Thibault Saunier
3a826e1e3d validate:launcher: Implement bug checks for gitlab
And use new gitlab urls for all the bugs
2019-04-03 13:38:42 +00:00
Thibault Saunier
8d00a74f1a validate:launcher: Enhance and standardize output 2019-04-03 13:38:42 +00:00
Thibault Saunier
fca2411e77 validate:scenario: Add a way to ignore EOS
And ignore then in seek_forward/backward to avoid cases where the pipeline EOS
before we have the chance to launch the following seek, see:

https://ci.gstreamer.net/job/GStreamer-master-meson-validate/3483/testReport/junit/(root)/gst-validate-launcher/validate_rtsp_playback_seek_backward_raw_h264_1_mp4/
2019-04-03 13:38:42 +00:00
Thibault Saunier
ad28bffa20 validate:launcher: Take into account the timeout when checking EOS 2019-04-03 13:38:42 +00:00
Thibault Saunier
6f9e5d4494 Pass python files through autopep8 2019-04-03 13:38:42 +00:00
Thibault Saunier
091ce6bcfe validate:launcher: Help the user add known issues
And make it clear a bug should be opened about it
2019-04-03 13:38:42 +00:00
Thibault Saunier
b4e96b4f4e validate:launcher: Enhance dumping log files output 2019-04-03 13:38:42 +00:00
Thibault Saunier
3d5099ee41 validate:launcher: Use gst-integration-testsuites subproject as default testsuite repo if avalaible 2019-04-03 13:38:42 +00:00
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
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
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
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
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
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
Guillaume Desmottes
78a8306955 validate: scenario: fix dropped checking when terminating scenario
We want to early return if either no max value has been set for the
scenario or if we didn't receive any QoS information.
2019-02-08 14:25:52 +01:00
Guillaume Desmottes
916bf5cdf1 validate: properly namespace config related checks 2019-02-08 13:32:12 +01:00
Alicia Boya García
e96f2ca714 New validate plugin: validateflow
validateflow can be used to check the buffers and events flowing through
a custom pipeline match an expectation file. This can be used to test
non-regular-playback use cases like demuxers handling adaptive streaming
fragment pushing.

This patch includes also new actions used for these cases:
`appsrc-push`, `appsrc-eos` and `flush` (plus `checkpoint`, which is
only available with validateflow).
2019-02-07 18:19:22 +00:00
Guillaume Desmottes
0c83ff56dd baseclass: add_validate_config: don't use self.proc_env
self.proc_env is created when starting the test but this API can be call
by generator when creating the test.
2019-02-07 17:13:02 +01:00
Guillaume Desmottes
921a073bdf validate: allow scenarios to define a max nb of dropped buffers
The 'max-dropped' description field can now be used to specify the max
number of buffers than can be dropped by the QoS system.
2019-02-07 14:12:59 +00:00
Thibault Saunier
e8162cc957 validate:launcher: Error out in the check testsuite if rebuilding failed 2019-02-06 21:14:13 +00:00
Guillaume Desmottes
2d8ef6e81c validate: allow scenarios to define max pipeline latency
The 'max-latency' description field can now be used to specify the max
latency allowed for the running pipeline.
2019-02-06 16:07:02 +01:00
Mathieu Duponchelle
90c2d32030 Scenarios: override seek flags for RTSP tests
Our RTSP server is not accurate, it makes no sense to perform
accuracy checks on the client-side segments.
2019-02-02 02:08:58 +01:00
Thibault Saunier
49102316df validate:scenario: Set variables on all action fields 2019-02-01 23:46:21 +00:00
Thibault Saunier
e50d41420e validate: Handle G_LOG_ERROR in our glog handler 2019-02-01 23:46:21 +00:00
Thibault Saunier
2f957ab932 validate:scenario: Rename action 'define-consts' to 'set-vars'
Those are not consts are they can be modified at runtime
2019-02-01 23:46:21 +00:00