summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-12-25 16:04:05 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2020-12-25 16:05:07 +0100
commitbf8cb32d4ec64b747e310012e3af7fcb905fccf7 (patch)
tree22b820d41cfb0cd22a76a5d91bf01119b1172738 /media-libs/libopenshot
parentsys-kernel/gentoo-sources: Keyword ~riscv (diff)
downloadgentoo-bf8cb32d4ec64b747e310012e3af7fcb905fccf7.tar.gz
gentoo-bf8cb32d4ec64b747e310012e3af7fcb905fccf7.tar.bz2
gentoo-bf8cb32d4ec64b747e310012e3af7fcb905fccf7.zip
media-libs/libopenshot: Try to fix tests
Minor: Fix Unquoted Variable Bug: https://bugs.gentoo.org/739638 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs/libopenshot')
-rw-r--r--media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch45
-rw-r--r--media-libs/libopenshot/libopenshot-0.2.5.ebuild5
2 files changed, 49 insertions, 1 deletions
diff --git a/media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch b/media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch
new file mode 100644
index 000000000000..a079d9746c0e
--- /dev/null
+++ b/media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch
@@ -0,0 +1,45 @@
+From f71051e8f1add0b893ffaa9a799625017978e7f8 Mon Sep 17 00:00:00 2001
+From: Frank Dana <ferdnyc@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);
+ }
diff --git a/media-libs/libopenshot/libopenshot-0.2.5.ebuild b/media-libs/libopenshot/libopenshot-0.2.5.ebuild
index fdfa393fcfc9..37973900308f 100644
--- a/media-libs/libopenshot/libopenshot-0.2.5.ebuild
+++ b/media-libs/libopenshot/libopenshot-0.2.5.ebuild
@@ -38,7 +38,10 @@ BDEPEND="
test? ( dev-libs/unittest++ )
"
-PATCHES=( ${FILESDIR}/${PN}-0.2.5-gcc10.patch )
+PATCHES=(
+ "${FILESDIR}/${P}-gcc10.patch"
+ "${FILESDIR}/${P}-no-hwaccel-testfix.patch"
+)
check_compiler() {
if [[ ${MERGE_TYPE} != binary ]] && ! tc-has-openmp; then