Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libopenshot/, media-libs/libopenshot/files/
Date: Fri, 25 Dec 2020 15:05:45
Message-Id: 1608908707.bf8cb32d4ec64b747e310012e3af7fcb905fccf7.asturm@gentoo
1 commit: bf8cb32d4ec64b747e310012e3af7fcb905fccf7
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 25 15:04:05 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 25 15:05:07 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf8cb32d
7
8 media-libs/libopenshot: Try to fix tests
9
10 Minor: Fix Unquoted Variable
11
12 Bug: https://bugs.gentoo.org/739638
13 Package-Manager: Portage-3.0.12, Repoman-3.0.2
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 .../libopenshot-0.2.5-no-hwaccel-testfix.patch | 45 ++++++++++++++++++++++
17 media-libs/libopenshot/libopenshot-0.2.5.ebuild | 5 ++-
18 2 files changed, 49 insertions(+), 1 deletion(-)
19
20 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
21 new file mode 100644
22 index 00000000000..a079d9746c0
23 --- /dev/null
24 +++ b/media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch
25 @@ -0,0 +1,45 @@
26 +From f71051e8f1add0b893ffaa9a799625017978e7f8 Mon Sep 17 00:00:00 2001
27 +From: Frank Dana <ferdnyc@×××××.com>
28 +Date: Thu, 20 Aug 2020 21:13:42 -0400
29 +Subject: [PATCH] Tests: Don't enable HW accel as side-effect (#557)
30 +
31 +The Settings test attempts to test the class by changing settings
32 +variables and reading them back again. Problem is, that affects
33 +the REST of the unit tests. So instead of enabling HW accel and
34 +causing crashes, we'll diddle something innocuous, like OMP_THREADS.
35 +---
36 + tests/Settings_Tests.cpp | 8 ++++----
37 + 1 file changed, 4 insertions(+), 4 deletions(-)
38 +
39 +diff --git a/tests/Settings_Tests.cpp b/tests/Settings_Tests.cpp
40 +index b63b56a8..65bd66a6 100644
41 +--- a/tests/Settings_Tests.cpp
42 ++++ b/tests/Settings_Tests.cpp
43 +@@ -41,7 +41,7 @@ TEST(Settings_Default_Constructor)
44 + // Create an empty color
45 + Settings *s = Settings::Instance();
46 +
47 +- CHECK_EQUAL(0, s->HARDWARE_DECODER);
48 ++ CHECK_EQUAL(12, s->OMP_THREADS);
49 + CHECK_EQUAL(false, s->HIGH_QUALITY_SCALING);
50 + CHECK_EQUAL(false, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
51 + }
52 +@@ -50,15 +50,15 @@ TEST(Settings_Change_Settings)
53 + {
54 + // Create an empty color
55 + Settings *s = Settings::Instance();
56 +- s->HARDWARE_DECODER = 1;
57 ++ s->OMP_THREADS = 8;
58 + s->HIGH_QUALITY_SCALING = true;
59 + s->WAIT_FOR_VIDEO_PROCESSING_TASK = true;
60 +
61 +- CHECK_EQUAL(1, s->HARDWARE_DECODER);
62 ++ CHECK_EQUAL(8, s->OMP_THREADS);
63 + CHECK_EQUAL(true, s->HIGH_QUALITY_SCALING);
64 + CHECK_EQUAL(true, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
65 +
66 +- CHECK_EQUAL(1, s->HARDWARE_DECODER);
67 ++ CHECK_EQUAL(8, Settings::Instance()->OMP_THREADS);
68 + CHECK_EQUAL(true, Settings::Instance()->HIGH_QUALITY_SCALING);
69 + CHECK_EQUAL(true, Settings::Instance()->WAIT_FOR_VIDEO_PROCESSING_TASK);
70 + }
71
72 diff --git a/media-libs/libopenshot/libopenshot-0.2.5.ebuild b/media-libs/libopenshot/libopenshot-0.2.5.ebuild
73 index fdfa393fcfc..37973900308 100644
74 --- a/media-libs/libopenshot/libopenshot-0.2.5.ebuild
75 +++ b/media-libs/libopenshot/libopenshot-0.2.5.ebuild
76 @@ -38,7 +38,10 @@ BDEPEND="
77 test? ( dev-libs/unittest++ )
78 "
79
80 -PATCHES=( ${FILESDIR}/${PN}-0.2.5-gcc10.patch )
81 +PATCHES=(
82 + "${FILESDIR}/${P}-gcc10.patch"
83 + "${FILESDIR}/${P}-no-hwaccel-testfix.patch"
84 +)
85
86 check_compiler() {
87 if [[ ${MERGE_TYPE} != binary ]] && ! tc-has-openmp; then