The default number of jobs to use is half of the available cores
rounded down, but in situations where only one core is available (such
as under some VMs), this means that `gst-validate-launcher` defaults
to using zero jobs, a case that the test-running code is not prepared
to handle.
This change makes the code match the documentation for the `--jobs` option,
guards against negative values both in the default setting and in argument
parsing, and introduces some defensive programming to prevent other situations
where the code might try to use zero jobs.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/154>
When debugging is activated, we could end up with log files ranging in the
multi-megabyte or even gigabyte range. Copying those is expensive from a cpu/io
point of view in addition to clobbering the storage.
Instead of always copying those files, check if they are smaller than 500kB. If
not, don't copy them and instead provide a link to their location.
Fixes#52
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/203>
By default, generate them whenever the file is missing but adding a way
to override that with `validateflow,generate-expectations=true` to force
regenerating them or setting `validateflow,generate-expectations=false`
to disallow generating them (on CI servers for example)
Also update the validateflow documentation to take that into account
and remove references to pipeline.json file which is now gone!
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/200>
This way we can have a single file that wraps scenarios,
`gst-validate-1.0` arguments, as well as a configuration.
It changes the name of `description` of scenarios to use `meta`
The goal is to replace tests describes in python with dictionary
to fully self contained `.validatetest` files which look like:
```
meta,
handles-states=true,
ignore-eos=true,
gst-validate-args = {
"videotestsrc pattern=blue ! video/x-raw,format=I420,framerate=1/1 ! timeoverlay ! $(videosink) name=videosink allocation-meta-flags=0",
},
configs = {
"$(validateflow), pad=videosink:sink, buffers-checksum=true, ignored-fields={\"buffers=meta\", }",
}
play
seek, start=0.0, stop=5.0, flags=accurate+flush, rate=1.0
crank-clock, expected-elapsed-time=0.0
crank-clock, repeat=4, expected-elapsed-time=1.0
crank-clock, expected-elapsed-time=1.0
stop, on-message=eos
```
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.
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.
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.