~alpine/aports

[alpine-aports] [PATCH] community/libfm: fix tests

alpine-mips-patches <info@mobile-stream.com>
Details
Message ID
<20181203105409.61A154C4A0@mx12.valuehost.ru>
Sender timestamp
1543832790
DKIM signature
missing
Download raw message
Patch: +22 -2
On edge check() fails with the following message:

make[3]: Entering directory '/home/room/aports/community/libfm/src/libfm-1.3.0.2/src/tests'
make  check-local
make[4]: Entering directory '/home/room/aports/community/libfm/src/libfm-1.3.0.2/src/tests'
TEST: fm-path... (pid=28635)

** (process:28635): WARNING **: 11:58:23.519: The directory '~/Templates' doesn't exist, ignoring it
Tests were compiled with G_DISABLE_ASSERT and are likely no-ops. Aborting.
FAIL: fm-path

The message is printed by the g_test_init() macro from glib-2.0/glib/gtestutils.h
because src/tests/test-fm-path.c #undef's G_DISABLE_ASSERT too late. Move #undef
earlier in the code to fix the problem and make test pass on x86_64 and mipsel at
least.
---
 community/libfm/APKBUILD                        |  7 +++++--
 .../libfm/undef-G_DISABLE_ASSERT-earlier.patch  | 17 +++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 community/libfm/undef-G_DISABLE_ASSERT-earlier.patch

diff --git a/community/libfm/APKBUILD b/community/libfm/APKBUILD
index 20a1d6db69..2b08a417c1 100644
--- a/community/libfm/APKBUILD
+++ b/community/libfm/APKBUILD
@@ -3,7 +3,7 @@

pkgname=libfm
pkgver=1.3.0.2
pkgrel=0
pkgrel=1
pkgdesc="Library for file management"
url="https://wiki.lxde.org/en/PCManFM"
arch="all"
@@ -13,8 +13,10 @@ makedepends="gtk+2.0-dev menu-cache-dev udisks-dev intltool dbus-glib-dev
options="libtool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/lxde/$pkgname/archive/$pkgver.tar.gz
	undef-G_DISABLE_ASSERT-earlier.patch
	"
prepare() {
	default_prepare
	cd "$builddir"
	./autogen.sh
}
@@ -42,4 +44,5 @@ package() {
	mv "$pkgdir"/usr/include/libfm-1.0/ "$pkgdir"/usr/include/libfm
}

sha512sums="c954c7210b6eee66ec265490e16fe91fe7995cd95b340f49197eec60a9af94f1ca0f67861dd5455c0deb81a10f5091cbf3dc471ed224477acdc081b48d036c69  libfm-1.3.0.2.tar.gz"
sha512sums="c954c7210b6eee66ec265490e16fe91fe7995cd95b340f49197eec60a9af94f1ca0f67861dd5455c0deb81a10f5091cbf3dc471ed224477acdc081b48d036c69  libfm-1.3.0.2.tar.gz
3bc242566402455a1e0c66e9b7962ddf92a4113a49e9e094e5d585b00649327352e45917f229606b7edfc35e9ba3a9ae8733457de5ca682e1ab7fdd869bcd03a  undef-G_DISABLE_ASSERT-earlier.patch"
diff --git a/community/libfm/undef-G_DISABLE_ASSERT-earlier.patch b/community/libfm/undef-G_DISABLE_ASSERT-earlier.patch
new file mode 100644
index 0000000000..34bd7d0418
--- /dev/null
+++ b/community/libfm/undef-G_DISABLE_ASSERT-earlier.patch
@@ -0,0 +1,17 @@
--- a/src/tests/test-fm-path.c
+++ b/src/tests/test-fm-path.c
@@ -19,12 +19,12 @@
  *      MA 02110-1301, USA.
  */
 
-#include <fm.h>
-
 //ignore for test disabled asserts
 #ifdef G_DISABLE_ASSERT
     #undef G_DISABLE_ASSERT
 #endif
+
+#include <fm.h>
 
 #define TEST_PARSING(func, str_to_parse, ...) \
     G_STMT_START { \
-- 
2.19.2




---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)