community/libfm: fix tests

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.
This commit is contained in:
alpine-mips-patches 2018-12-03 10:26:30 +00:00 committed by Leonardo Arena
parent 34aaed65c9
commit 8727ae4452
2 changed files with 22 additions and 2 deletions

View File

@ -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"

View File

@ -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 { \