10 Commits

Author SHA1 Message Date
Jonathan Thomas
9e9bfb3404 Merge pull request #935 from Ninpo/fix-test-file-collisions
Fixes test file collisions with high concurrency builds
2024-05-10 20:24:09 -05:00
Jonathan Thomas
d87e9e49c8 Un-reverting previous commit, removing queuing from FFmpegWriter for simplicity. Increasing margin on webm unit tests, when checking pixel color. 2024-02-10 20:28:47 -06:00
Ninpo
e17c2a3f14 Fixes test file collisions with high concurrency builds
Fix by Ninpo <ninpo@qap.la>

When tests are run in parallel it's possible for ImageWriter
and FFmpegWriter Gif tests to truncate/overwrite the other's
output1.gif. This change makes use of test file names unique
to the tests themselves.

Because cmake defaults to Makefiles and make does not -j$(nproc)
by default, this bug can't show up unless part of a build with parallel
make with tests included.

https://github.com/OpenShot/libopenshot/issues/933
2023-07-10 00:10:51 +01:00
Jonathan Thomas
70e86ef044 Improved Profile Class (Helper methods, Sortable, Unit tests) (#895)
* Removing legacy profile property. Add new operators for Profile classes (for comparison). Also added new functions to generate different variations of the Profile data (key, short name, long name, long name w/description).

* Add empty constructor for Profile class, and new Profile unit tets

* Adding zero padding to profile Key function, for easier sorting: 01920x1080i2997_16:09

* Clear setfill flag after creating Key() output

* Updating example exe to load an *.osp project file via C++, which makes debugging complex broken projects much easier.

* - Add new unit test to FFmpegWriter to create an animated GIF and verify it can be wrapped with a FrameMapper (with no audio track)
- Improve FrameMapper to ignore missing audio data (i.e. when no audio samples present, don't try and find them or resample them)

* Fix some whitespace issues

* Fix inline documentation mistype

* Fixed missing reuse licensing on new example profile files

* Changing Profile::Key() format to exclude the : character, since Windows file names cannot contain that

* - Large memory leak fixed in FFmpegWriter when closing the video & audio contexts
- Reducing # of cached frames and rescalers to 1, since we no longer use OMP and this is unneeded - we need to refactor much of this code out eventually

* - Fixing whitespace issues
- Code clean-up / line wrapping / etc...
2023-02-02 16:29:38 -06:00
FeRD (Frank Dana)
677ed5f591 Tests: Switch test files to openshot_catch.h 2022-06-17 15:37:51 -04:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00
Frank Dana
88d3011455 Unit tests: Use == to compare strings (#741)
When there's a mismatch, Catch2 will output the contents of both
strings rather than a meaningless .compare() numeric value.
2021-09-27 07:14:48 -04:00
FeRD (Frank Dana)
70ea2659d8 tests/FFmpegWriter: Add DisplayInfo test 2021-06-11 06:13:22 -04:00
FeRD (Frank Dana)
d9775d4a5e Port unit tests to Catch2 2021-04-09 04:09:36 -04:00
FeRD (Frank Dana)
c68b16643e Rename tests/*_Tests.cpp to tests/*.cpp 2021-04-07 23:41:04 -04:00