Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests: Don't use OpenShot.h header #607

Merged
merged 1 commit into from Dec 27, 2020

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Dec 26, 2020

To prevent slow compiles of unit tests, this PR replaces all of the #include "OpenShot.h" invocations with includes of the individual headers actually needed by each test file. This has little effect on files like Clip_Tests.cpp and Frame_Tests.cpp, but hugely speeds up the compilation (and reduces the size) of files like Coordinate_Tests.cpp and Fraction_Tests.cpp.

- To prevent slow compiles of unit tests, replace all of the
  '#include "OpenShot.h"' invocations with includes of the
  individual headers actually needed by each test file.
@codecov
Copy link

codecov bot commented Dec 26, 2020

Codecov Report

Merging #607 (d0cf7f1) into develop (bdb3eea) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #607   +/-   ##
========================================
  Coverage    52.31%   52.31%           
========================================
  Files          129      129           
  Lines        10783    10783           
========================================
  Hits          5641     5641           
  Misses        5142     5142           
Impacted Files Coverage Δ
tests/Cache_Tests.cpp 100.00% <ø> (ø)
tests/Clip_Tests.cpp 100.00% <ø> (ø)
tests/Color_Tests.cpp 100.00% <ø> (ø)
tests/Coordinate_Tests.cpp 100.00% <ø> (ø)
tests/DummyReader_Tests.cpp 100.00% <ø> (ø)
tests/FFmpegReader_Tests.cpp 100.00% <ø> (ø)
tests/FFmpegWriter_Tests.cpp 100.00% <ø> (ø)
tests/Fraction_Tests.cpp 100.00% <ø> (ø)
tests/Frame_Tests.cpp 100.00% <ø> (ø)
tests/ImageWriter_Tests.cpp 100.00% <ø> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdb3eea...d0cf7f1. Read the comment docs.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Dec 27, 2020

I'm going to merge this one... #585 might've inspired it, but it's useful even without OpenCV in the mix. The OpenShot.h megaheader has always been too much of a kitchen-sink solution to dependencies.

@ferdnyc ferdnyc merged commit 2699e7d into OpenShot:develop Dec 27, 2020
@ferdnyc ferdnyc deleted the test-includes branch December 27, 2020 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant