commit 058c05a8f9d3ec7496eee425fc9d41177a03240c
Author: FeRD (Frank Dana) <ferdnyc(a)gmail.com>
Date: Thu Aug 20 21:16:50 2020 -0400
Add patch to fix unit test failures
libopenshot.spec | 2 ++
test_fix.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
---
diff --git a/libopenshot.spec b/libopenshot.spec
index 7351188..1436862 100644
--- a/libopenshot.spec
+++ b/libopenshot.spec
@@ -9,6 +9,7 @@ License: LGPLv3+
URL:
http://www.openshot.org/
Source0: %{github_url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0:
%{github_url}/commit/13290364e7bea54164ab83d973951f2898ad9e23.patch#/gcc10_fix.patch
+Patch1:
%{github_url}/commit/f71051e8f1add0b893ffaa9a799625017978e7f8.patch#/test_fix.patch
# libopenshot is completely broken on ppc64le, see rfbz #5528
ExcludeArch: ppc64le
@@ -106,6 +107,7 @@ applications that use %{name}.
%changelog
* Tue Aug 18 2020 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
0.2.5-6
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+- Add patch from upstream to fix unit test failures
* Tue Aug 04 2020 FeRD (Frank Dana) <ferdnyc(a)gmail.com> - 0.2.5-5
- Updates for Fedora 33 build changes
diff --git a/test_fix.patch b/test_fix.patch
new file mode 100644
index 0000000..a079d97
--- /dev/null
+++ b/test_fix.patch
@@ -0,0 +1,45 @@
+From f71051e8f1add0b893ffaa9a799625017978e7f8 Mon Sep 17 00:00:00 2001
+From: Frank Dana <ferdnyc(a)gmail.com>
+Date: Thu, 20 Aug 2020 21:13:42 -0400
+Subject: [PATCH] Tests: Don't enable HW accel as side-effect (#557)
+
+The Settings test attempts to test the class by changing settings
+variables and reading them back again. Problem is, that affects
+the REST of the unit tests. So instead of enabling HW accel and
+causing crashes, we'll diddle something innocuous, like OMP_THREADS.
+---
+ tests/Settings_Tests.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/Settings_Tests.cpp b/tests/Settings_Tests.cpp
+index b63b56a8..65bd66a6 100644
+--- a/tests/Settings_Tests.cpp
++++ b/tests/Settings_Tests.cpp
+@@ -41,7 +41,7 @@ TEST(Settings_Default_Constructor)
+ // Create an empty color
+ Settings *s = Settings::Instance();
+
+- CHECK_EQUAL(0, s->HARDWARE_DECODER);
++ CHECK_EQUAL(12, s->OMP_THREADS);
+ CHECK_EQUAL(false, s->HIGH_QUALITY_SCALING);
+ CHECK_EQUAL(false, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
+ }
+@@ -50,15 +50,15 @@ TEST(Settings_Change_Settings)
+ {
+ // Create an empty color
+ Settings *s = Settings::Instance();
+- s->HARDWARE_DECODER = 1;
++ s->OMP_THREADS = 8;
+ s->HIGH_QUALITY_SCALING = true;
+ s->WAIT_FOR_VIDEO_PROCESSING_TASK = true;
+
+- CHECK_EQUAL(1, s->HARDWARE_DECODER);
++ CHECK_EQUAL(8, s->OMP_THREADS);
+ CHECK_EQUAL(true, s->HIGH_QUALITY_SCALING);
+ CHECK_EQUAL(true, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
+
+- CHECK_EQUAL(1, s->HARDWARE_DECODER);
++ CHECK_EQUAL(8, Settings::Instance()->OMP_THREADS);
+ CHECK_EQUAL(true, Settings::Instance()->HIGH_QUALITY_SCALING);
+ CHECK_EQUAL(true, Settings::Instance()->WAIT_FOR_VIDEO_PROCESSING_TASK);
+ }