commit:     e2fac57e27dd5c73f3442a0fd5f36f52192380b2
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 12 20:03:37 2014 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sun Oct 12 23:18:59 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=e2fac57e

dev-libs/gjs: add patches to disable broken unittests

---
 .../gjs/files/gjs-1.42.0-disable-unittest-1.patch  | 48 ++++++++++++++++++++++
 .../gjs/files/gjs-1.42.0-disable-unittest-2.patch  | 40 ++++++++++++++++++
 .../gjs/files/gjs-1.42.0-disable-unittest-3.patch  | 35 ++++++++++++++++
 dev-libs/gjs/gjs-1.42.0.ebuild                     |  7 ++++
 4 files changed, 130 insertions(+)

diff --git a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-1.patch 
b/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-1.patch
new file mode 100644
index 0000000..2ec481b
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-1.patch
@@ -0,0 +1,48 @@
+From 554c220e78172213e9637f9a901009b4bc964e3a Mon Sep 17 00:00:00 2001
+From: "Jasper St. Pierre" <jstpie...@mecheye.net>
+Date: Wed, 15 Jan 2014 17:00:22 -0500
+Subject: [PATCH] gjs-tests: Remove dumpstack test
+
+OK, I lied. This is the most useless test ever.
+---
+ test/gjs-tests.cpp | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/test/gjs-tests.cpp b/test/gjs-tests.cpp
+index b79b616..6cade7b 100644
+--- a/test/gjs-tests.cpp
++++ b/test/gjs-tests.cpp
+@@ -163,22 +163,6 @@ 
gjstest_test_func_gjs_jsapi_util_string_js_string_utf8(void)
+ }
+ 
+ static void
+-gjstest_test_func_gjs_stack_dump(void)
+-{
+-  GjsContext *context;
+-
+-  /* TODO this test could be better - maybe expose dumpstack as a JS API
+-   * so that we have a JS stack to dump?  At least here we're getting some
+-   * coverage.
+-   */
+-  context = gjs_context_new();
+-
+-  gjs_dumpstack();
+-  g_object_unref(context);
+-  gjs_dumpstack();
+-}
+-
+-static void
+ gjstest_test_func_gjs_jsapi_util_error_throw(void)
+ {
+     GjsUnitTestFixture fixture;
+@@ -348,7 +332,6 @@ main(int    argc,
+     g_test_add_func("/gjs/jsutil/strip_shebang/no_shebang", 
gjstest_test_strip_shebang_no_advance_for_no_shebang);
+     g_test_add_func("/gjs/jsutil/strip_shebang/have_shebang", 
gjstest_test_strip_shebang_advance_for_shebang);
+     g_test_add_func("/gjs/jsutil/strip_shebang/only_shebang", 
gjstest_test_strip_shebang_return_null_for_just_shebang);
+-    g_test_add_func("/gjs/stack/dump", gjstest_test_func_gjs_stack_dump);
+     g_test_add_func("/util/glib/strv/concat/null", 
gjstest_test_func_util_glib_strv_concat_null);
+     g_test_add_func("/util/glib/strv/concat/pointers", 
gjstest_test_func_util_glib_strv_concat_pointers);
+ 
+-- 
+2.1.2
+

diff --git a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-2.patch 
b/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-2.patch
new file mode 100644
index 0000000..2490a63
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-2.patch
@@ -0,0 +1,40 @@
+From 4ea9fda3f323355d10e946d19d817fe8c4e6b533 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <e...@gentoo.org>
+Date: Sun, 12 Oct 2014 21:57:11 +0200
+Subject: [PATCH 1/2] Comment broken unittests
+
+---
+ test/gjs-tests.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/test/gjs-tests.cpp b/test/gjs-tests.cpp
+index 6cade7b..4d6c61e 100644
+--- a/test/gjs-tests.cpp
++++ b/test/gjs-tests.cpp
+@@ -324,18 +324,18 @@ main(int    argc,
+ 
+     g_test_init(&argc, &argv, NULL);
+ 
+-    g_test_add_func("/gjs/context/construct/destroy", 
gjstest_test_func_gjs_context_construct_destroy);
++    /* g_test_add_func("/gjs/context/construct/destroy", 
gjstest_test_func_gjs_context_construct_destroy); */
+     g_test_add_func("/gjs/context/construct/eval", 
gjstest_test_func_gjs_context_construct_eval);
+-    g_test_add_func("/gjs/jsapi/util/array", 
gjstest_test_func_gjs_jsapi_util_array);
+-    g_test_add_func("/gjs/jsapi/util/error/throw", 
gjstest_test_func_gjs_jsapi_util_error_throw);
+-    g_test_add_func("/gjs/jsapi/util/string/js/string/utf8", 
gjstest_test_func_gjs_jsapi_util_string_js_string_utf8);
++    /* g_test_add_func("/gjs/jsapi/util/array", 
gjstest_test_func_gjs_jsapi_util_array); */
++    /* g_test_add_func("/gjs/jsapi/util/error/throw", 
gjstest_test_func_gjs_jsapi_util_error_throw); */
++    /* g_test_add_func("/gjs/jsapi/util/string/js/string/utf8", 
gjstest_test_func_gjs_jsapi_util_string_js_string_utf8); */
+     g_test_add_func("/gjs/jsutil/strip_shebang/no_shebang", 
gjstest_test_strip_shebang_no_advance_for_no_shebang);
+     g_test_add_func("/gjs/jsutil/strip_shebang/have_shebang", 
gjstest_test_strip_shebang_advance_for_shebang);
+     g_test_add_func("/gjs/jsutil/strip_shebang/only_shebang", 
gjstest_test_strip_shebang_return_null_for_just_shebang);
+     g_test_add_func("/util/glib/strv/concat/null", 
gjstest_test_func_util_glib_strv_concat_null);
+     g_test_add_func("/util/glib/strv/concat/pointers", 
gjstest_test_func_util_glib_strv_concat_pointers);
+ 
+-    gjs_test_add_tests_for_coverage ();
++    /* gjs_test_add_tests_for_coverage (); */
+ 
+     g_test_run();
+ 
+-- 
+2.1.2
+

diff --git a/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-3.patch 
b/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-3.patch
new file mode 100644
index 0000000..7b2898b
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-1.42.0-disable-unittest-3.patch
@@ -0,0 +1,35 @@
+From da18a2676477138693e893d3245316f987d74497 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <e...@gentoo.org>
+Date: Sun, 12 Oct 2014 21:57:45 +0200
+Subject: [PATCH 2/2] Comment broken JS unittest
+
+---
+ installed-tests/js/testLocale.js | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/installed-tests/js/testLocale.js 
b/installed-tests/js/testLocale.js
+index b086a66..0c5abb1 100644
+--- a/installed-tests/js/testLocale.js
++++ b/installed-tests/js/testLocale.js
+@@ -1,14 +1,14 @@
+ // tests for JS_SetLocaleCallbacks().
+ const JSUnit = imports.jsUnit;
+ 
+-function testToLocaleDateString() {
+-    let date = new Date();
++//function testToLocaleDateString() {
++    //let date = new Date();
+     // %A is the weekday name, this tests locale_to_unicode
+     // we're basically just testing for a non-crash, since
+     // we'd have to run in a specific locale to have any
+     // idea about the result.
+-    date.toLocaleDateString("%A");
+-}
++    //date.toLocaleDateString("%A");
++//}
+ 
+ function testToLocaleLowerCase() {
+     JSUnit.assertEquals("aaa", "AAA".toLocaleLowerCase());
+-- 
+2.1.2
+

diff --git a/dev-libs/gjs/gjs-1.42.0.ebuild b/dev-libs/gjs/gjs-1.42.0.ebuild
index 2438d07..9b5800a 100644
--- a/dev-libs/gjs/gjs-1.42.0.ebuild
+++ b/dev-libs/gjs/gjs-1.42.0.ebuild
@@ -35,6 +35,13 @@ DEPEND="${RDEPEND}
 # Large amount of tests are broken even in master.
 #RESTRICT="test"
 
+src_prepare() {
+       # Disable broken unittests
+       epatch "${FILESDIR}"/${PN}-1.42.0-disable-unittest-*.patch
+
+       gnome2_src_prepare
+}
+
 src_configure() {
        # FIXME: add systemtap/dtrace support, like in glib:2
        # FIXME: --enable-systemtap installs files in ${D}/${D} for some reason

Reply via email to