Merge lp:~online-accounts/libsignon-glib/packaging into lp:libsignon-glib

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: no longer in the source branch.
Merged at revision: 159
Proposed branch: lp:~online-accounts/libsignon-glib/packaging
Merge into: lp:libsignon-glib
Diff against target: 1063 lines (+407/-122)
23 files modified
.gitlab-ci.yml (+47/-0)
Makefile.am (+2/-0)
Makefile.am.coverage (+38/-0)
NEWS (+21/-0)
README (+0/-23)
README.md (+29/-0)
configure.ac (+10/-8)
debian/changelog (+13/-0)
libsignon-glib/Makefile.am (+9/-6)
libsignon-glib/signon-auth-service.c (+1/-0)
libsignon-glib/signon-auth-session.c (+20/-51)
libsignon-glib/signon-dbus-queue.c (+2/-2)
libsignon-glib/signon-dbus-queue.h (+1/-1)
libsignon-glib/signon-errors.h (+1/-1)
libsignon-glib/signon-identity-info.c (+1/-0)
libsignon-glib/signon-identity.c (+1/-22)
libsignon-glib/signon-utils.c (+2/-1)
libsignon-glib/sso-auth-service.c (+9/-1)
m4/gcov.m4 (+92/-0)
tests/Makefile.am (+4/-0)
tests/check_signon.c (+92/-4)
tests/signon-glib-test-wrapper.sh (+3/-0)
tests/signon-glib-test.sh (+9/-2)
To merge this branch: bzr merge lp:~online-accounts/libsignon-glib/packaging
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Online Accounts Pending
Review via email: mp+294012@code.launchpad.net

Description of the change

Migrate to GTask

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
159. By Alberto Mardegan

Migrate to GTask
Approved by: PS Jenkins bot

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.gitlab-ci.yml'
--- .gitlab-ci.yml 1970-01-01 00:00:00 +0000
+++ .gitlab-ci.yml 2016-05-19 15:30:34 +0000
@@ -0,0 +1,47 @@
1image: ubuntu:xenial
2
3cache:
4 key: apt-cache
5 paths:
6 - apt-cache/
7
8before_script:
9 - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
10 - apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yq autotools-dev gobject-introspection gtk-doc-tools libgirepository1.0-dev libglib2.0-dev libtool python3 python3-gi python-gi-dev signond-dev
11 - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yq signon-plugin-ssotest check dbus-test-runner lcov gcovr
12
13build_amd64:
14 stage: build
15 script:
16 - export PYTHON=python3
17 - mkdir build
18 - cd build
19 - ../autogen.sh --enable-gtk-doc --enable-gcov --enable-debug --enable-python --prefix=/usr
20 - make -j 4
21 artifacts:
22 paths:
23 - ./
24
25test_amd64:
26 stage: test
27 script:
28 - cd build
29 - make check || (cat tests/test-suite.log && /bin/false)
30 - make coverage-html
31 dependencies:
32 - build_amd64
33 artifacts:
34 paths:
35 - ./
36
37pages:
38 stage: deploy
39 script:
40 - mkdir public
41 - cp -a build/coveragereport public/coverage
42 - cp -a build/docs/reference/html/* public/
43 dependencies:
44 - test_amd64
45 artifacts:
46 paths:
47 - public
048
=== modified file 'Makefile.am'
--- Makefile.am 2012-10-30 09:28:39 +0000
+++ Makefile.am 2016-05-19 15:30:34 +0000
@@ -12,6 +12,8 @@
12SUBDIRS += tests12SUBDIRS += tests
13endif13endif
1414
15include $(top_srcdir)/Makefile.am.coverage
16
15pkgconfigdir = $(libdir)/pkgconfig17pkgconfigdir = $(libdir)/pkgconfig
16pkgconfig_in_files = libsignon-glib.pc.in18pkgconfig_in_files = libsignon-glib.pc.in
17pkgconfig_DATA = $(pkgconfig_in_files:.pc.in=.pc)19pkgconfig_DATA = $(pkgconfig_in_files:.pc.in=.pc)
1820
=== added file 'Makefile.am.coverage'
--- Makefile.am.coverage 1970-01-01 00:00:00 +0000
+++ Makefile.am.coverage 2016-05-19 15:30:34 +0000
@@ -0,0 +1,38 @@
1
2# Coverage targets
3
4.PHONY: clean-gcda
5clean-gcda:
6 @echo Removing old coverage results
7 -$(AM_V_at)find -name '*.gcda' -print | xargs -r rm
8
9.PHONY: coverage-html generate-coverage-html clean-coverage-html
10coverage-html: clean-gcda
11 -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
12 $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
13
14if HAVE_GCOV
15
16generate-coverage-html:
17 @echo Collecting coverage data
18 $(AM_V_at)$(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
19 $(AM_V_at)$(LCOV) --remove coverage.info signon-enum-types.c signon-errors-enum.c signon-marshal.c "sso-*-gen.*" -o coverage.info # autogenerated files
20 $(AM_V_at)LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
21
22clean-coverage-html: clean-gcda
23 -$(AM_V_at)$(LCOV) --directory $(top_builddir) -z
24 -$(AM_V_at)rm -rf coverage.info coveragereport
25
26clean-local: clean-coverage-html
27
28else
29
30generate-coverage-html:
31 $(AM_V_at)echo "Code coverage reporting not available"
32
33clean-coverage-html: clean-gcda
34 -$(AM_V_at)rm -rf coverage.info coveragereport
35
36clean-local: clean-coverage-html
37
38endif # HAVE_GCOV
039
=== modified file 'NEWS'
--- NEWS 2014-12-09 08:52:37 +0000
+++ NEWS 2016-05-19 15:30:34 +0000
@@ -1,5 +1,26 @@
1libsignon-glib NEWS1libsignon-glib NEWS
22
3Version 1.14
4------------
5
6* Migrate to GTask
7* Fix memory leaks reported by valgrind
8* Enable CI in gitlab.com
9* Build: add test coverage reporting
10* Build: fix parallel builds and out-of-tree builds
11* Tests: add a test for signon_auth_session_process_async()
12* Tests: allow running tests with valgrind
13
14Version 1.13
15------------
16
17* Build: don't emit a build error on deprecations
18* Build: ignore deprecations of GSimpleAsyncResult
19* pkg-config: remove unused variable
20 Fixes: https://gitlab.com/accounts-sso/libsignon-glib/issues/1
21* Tests: do not count on mechanisms being ordered
22* Introspection: mark ACL and realms as string lists, update Vala bindings
23
3Version 1.1224Version 1.12
4------------25------------
526
627
=== removed file 'README'
--- README 2015-11-27 02:48:53 +0000
+++ README 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
1Single signon authentication library for GLib applications
2----------------------------------------------------------
3
4This project is a library for managing single signon credentilas which can be
5used from GLib applications. It is effectively a GLib binding for the D-Bus API
6provided by signond. It is part of the accounts-sso project:
7
8https://gitlab.com/groups/accounts-sso
9
10Dependencies
11------------
12
13The project depends on GLib (including GIO and GObject), signond and check.
14
15Licence
16-------
17
18The library is licensed under the GNU LGPL version 2.1.
19
20Resources
21---------
22
23https://gitlab.com/accounts-sso/libsignon-glib
240
=== added file 'README.md'
--- README.md 1970-01-01 00:00:00 +0000
+++ README.md 2016-05-19 15:30:34 +0000
@@ -0,0 +1,29 @@
1Single signon authentication library for GLib applications
2==========================================================
3
4This project is a library for managing single signon credentilas which can be
5used from GLib applications. It is effectively a GLib binding for the D-Bus API
6provided by [signond][].
7It is part of the accounts-sso project:
8
9https://gitlab.com/groups/accounts-sso
10
11Dependencies
12------------
13
14The project depends on GLib (including GIO and GObject), [signond][] and [check][].
15
16Licence
17-------
18
19The library is licensed under the GNU LGPL version 2.1.
20
21Resources
22---------
23
24[API reference documentation](http://accounts-sso.gitlab.io/libsignon-glib/)
25
26[Official source code repository](https://gitlab.com/accounts-sso/libsignon-glib)
27
28[signond]: https://gitlab.com/accounts-sso/signond
29[check]: https://github.com/libcheck/check
030
=== modified file 'configure.ac'
--- configure.ac 2015-12-09 07:59:54 +0000
+++ configure.ac 2016-05-19 15:30:34 +0000
@@ -1,7 +1,7 @@
1dnl Process this file with autoconf to produce a configure script.1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ([2.64])2AC_PREREQ([2.64])
3AC_INIT([libsignon-glib],3AC_INIT([libsignon-glib],
4 [1.13],4 [1.14],
5 [https://gitlab.com/accounts-sso/libsignon-glib/issues],5 [https://gitlab.com/accounts-sso/libsignon-glib/issues],
6 [libsignon-glib],6 [libsignon-glib],
7 [https://gitlab.com/accounts-sso/libsignon-glib])7 [https://gitlab.com/accounts-sso/libsignon-glib])
@@ -11,7 +11,7 @@
11AC_CONFIG_SRCDIR([libsignon-glib.pc.in])11AC_CONFIG_SRCDIR([libsignon-glib.pc.in])
12AC_CONFIG_MACRO_DIR([m4])12AC_CONFIG_MACRO_DIR([m4])
1313
14AM_INIT_AUTOMAKE([1.11 -Wall check-news nostdinc silent-rules subdir-objects])14AM_INIT_AUTOMAKE([1.11 -Wall check-news nostdinc silent-rules subdir-objects foreign])
1515
16AC_PROG_CC16AC_PROG_CC
17AC_PROG_CC_STDC17AC_PROG_CC_STDC
@@ -25,7 +25,7 @@
2525
26PKG_CHECK_MODULES(26PKG_CHECK_MODULES(
27 [DEPS],27 [DEPS],
28 [gio-2.0 >= 2.3028 [gio-2.0 >= 2.36
29 gio-unix-2.029 gio-unix-2.0
30 glib-2.0 >= 2.3230 glib-2.0 >= 2.32
31 gobject-2.0 >= 2.35.131 gobject-2.0 >= 2.35.1
@@ -51,6 +51,13 @@
51 [AS_IF([test "x$enable_tests" = "xyes"],51 [AS_IF([test "x$enable_tests" = "xyes"],
52 [AC_MSG_ERROR([tests enabled but required dependencies were not found])])])52 [AC_MSG_ERROR([tests enabled but required dependencies were not found])])])
5353
54# gcov coverage reporting
55m4_include([m4/gcov.m4])
56AC_TDD_GCOV
57AC_SUBST(COVERAGE_CFLAGS)
58AC_SUBST(COVERAGE_CXXFLAGS)
59AC_SUBST(COVERAGE_LDFLAGS)
60
54AM_CONDITIONAL([ENABLE_TESTS], [test "x$have_check" = "xyes"])61AM_CONDITIONAL([ENABLE_TESTS], [test "x$have_check" = "xyes"])
5562
56GTK_DOC_CHECK([1.14], [--flavour no-tmpl])63GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
@@ -75,11 +82,6 @@
75AS_IF([test "x$enable_debug" = "xyes"],82AS_IF([test "x$enable_debug" = "xyes"],
76 [CFLAGS="$CFLAGS -DENABLE_DEBUG"])83 [CFLAGS="$CFLAGS -DENABLE_DEBUG"])
7784
78AC_ARG_ENABLE([coverage],
79 [AS_HELP_STRING([--enable-coverage], [compile with coverage info])])
80AS_IF([test "x$enable_coverage" = "xyes"],
81 [CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"])
82
83# Python support.85# Python support.
84PYGOBJECT_REQUIRED=2.9086PYGOBJECT_REQUIRED=2.90
8587
8688
=== modified file 'debian/changelog'
--- debian/changelog 2015-12-09 10:24:53 +0000
+++ debian/changelog 2016-05-19 15:30:34 +0000
@@ -1,3 +1,16 @@
1libsignon-glib (1.14-0ubuntu1) UNRELEASED; urgency=medium
2
3 * New upstream release.
4 - Migrate to GTask (LP: #1577373)
5 - Fix memory leaks reported by valgrind
6 - Enable CI in gitlab.com
7 - Build: add test coverage reporting
8 - Build: fix parallel builds and out-of-tree builds
9 - Tests: add a test for signon_auth_session_process_async()
10 - Tests: allow running tests with valgrind
11
12 -- Alberto Mardegan <alberto.mardegan@canonical.com> Thu, 19 May 2016 18:28:23 +0300
13
1libsignon-glib (1.13+16.04.20151209.1-0ubuntu1) xenial; urgency=medium14libsignon-glib (1.13+16.04.20151209.1-0ubuntu1) xenial; urgency=medium
215
3 [ Alberto Mardegan ]16 [ Alberto Mardegan ]
417
=== modified file 'libsignon-glib/Makefile.am'
--- libsignon-glib/Makefile.am 2015-12-02 08:57:16 +0000
+++ libsignon-glib/Makefile.am 2016-05-19 15:30:34 +0000
@@ -5,11 +5,14 @@
5 -I$(top_srcdir) \5 -I$(top_srcdir) \
6 -I$(srcdir) \6 -I$(srcdir) \
7 -I$(top_builddir) \7 -I$(top_builddir) \
8 -I$(builddir) \8 -I$(builddir)
9libsignon_glib_la_CFLAGS = \
9 $(DEPS_CFLAGS) \10 $(DEPS_CFLAGS) \
11 $(COVERAGE_CFLAGS) \
10 -Wall -Werror -Wno-error=deprecated-declarations12 -Wall -Werror -Wno-error=deprecated-declarations
11libsignon_glib_la_LIBADD = $(DEPS_LIBS)13libsignon_glib_la_LIBADD = $(DEPS_LIBS)
12libsignon_glib_la_LDFLAGS = \14libsignon_glib_la_LDFLAGS = \
15 $(COVERAGE_LDFLAGS) \
13 -version-info 1:0:0 \16 -version-info 1:0:0 \
14 -export-symbols-regex '^signon_'17 -export-symbols-regex '^signon_'
1518
@@ -75,8 +78,7 @@
75 signon-auth-session.h \78 signon-auth-session.h \
76 signon-identity-info.h79 signon-identity-info.h
7780
78# This should come from `pkg-config --variable=interfaces_dir dbus-1`81DBUS_INTERFACES_DIR = $(datadir)/dbus-1/interfaces
79DBUS_INTERFACES_DIR = /usr/share/dbus-1/interfaces
8082
81sso-auth-service-gen.h sso-auth-service-gen.c: $(DBUS_INTERFACES_DIR)/com.google.code.AccountsSSO.SingleSignOn.AuthService.xml83sso-auth-service-gen.h sso-auth-service-gen.c: $(DBUS_INTERFACES_DIR)/com.google.code.AccountsSSO.SingleSignOn.AuthService.xml
82 $(AM_V_GEN)gdbus-codegen \84 $(AM_V_GEN)gdbus-codegen \
@@ -145,9 +147,9 @@
145 --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n }\n return etype;\n}\n" \147 --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n }\n return etype;\n}\n" \
146 signon-errors.h ) | \148 signon-errors.h ) | \
147 $(SED) -e 's/SEDSIGNON_ERROR_\([^,]*\)/SIGNOND_\1_ERR_NAME/' \149 $(SED) -e 's/SEDSIGNON_ERROR_\([^,]*\)/SIGNOND_\1_ERR_NAME/' \
148 > xgen-getc \150 > xgen-getc-enum \
149 && cp xgen-getc signon-errors-enum.c \151 && cp xgen-getc-enum signon-errors-enum.c \
150 && rm -f xgen-getc152 && rm -f xgen-getc-enum
151153
152signon-errors-map.c: Makefile signon-errors.h154signon-errors-map.c: Makefile signon-errors.h
153 $(AM_V_GEN)( cd $(srcdir) && \155 $(AM_V_GEN)( cd $(srcdir) && \
@@ -189,6 +191,7 @@
189 --warn-all191 --warn-all
190Signon_1_0_gir_CFLAGS = \192Signon_1_0_gir_CFLAGS = \
191 -I$(top_srcdir) \193 -I$(top_srcdir) \
194 -I$(top_builddir) \
192 $(DEPS_CFLAGS)195 $(DEPS_CFLAGS)
193Signon_1_0_gir_LIBS = libsignon-glib.la196Signon_1_0_gir_LIBS = libsignon-glib.la
194Signon_1_0_gir_FILES = $(introspection_sources)197Signon_1_0_gir_FILES = $(introspection_sources)
195198
=== modified file 'libsignon-glib/signon-auth-service.c'
--- libsignon-glib/signon-auth-service.c 2014-12-05 07:15:03 +0000
+++ libsignon-glib/signon-auth-service.c 2016-05-19 15:30:34 +0000
@@ -86,6 +86,7 @@
86 if (priv->cancellable)86 if (priv->cancellable)
87 {87 {
88 g_cancellable_cancel (priv->cancellable);88 g_cancellable_cancel (priv->cancellable);
89 g_object_unref (priv->cancellable);
89 priv->cancellable = NULL;90 priv->cancellable = NULL;
90 }91 }
9192
9293
=== modified file 'libsignon-glib/signon-auth-session.c'
--- libsignon-glib/signon-auth-session.c 2015-12-02 08:40:47 +0000
+++ libsignon-glib/signon-auth-session.c 2016-05-19 15:30:34 +0000
@@ -93,7 +93,6 @@
93{93{
94 GVariant *session_data;94 GVariant *session_data;
95 gchar *mechanism;95 gchar *mechanism;
96 GCancellable *cancellable;
97} AuthSessionProcessData;96} AuthSessionProcessData;
9897
99typedef struct _AuthSessionQueryAvailableMechanismsCbData98typedef struct _AuthSessionQueryAvailableMechanismsCbData
@@ -138,7 +137,7 @@
138{137{
139 SignonAuthSession *self;138 SignonAuthSession *self;
140 SsoAuthSession *proxy = SSO_AUTH_SESSION (object);139 SsoAuthSession *proxy = SSO_AUTH_SESSION (object);
141 GSimpleAsyncResult *res_process = (GSimpleAsyncResult *)userdata;140 GTask *res_process = userdata;
142 GVariant *reply;141 GVariant *reply;
143 GError *error = NULL;142 GError *error = NULL;
144143
@@ -146,29 +145,20 @@
146145
147 sso_auth_session_call_process_finish (proxy, &reply, res, &error);146 sso_auth_session_call_process_finish (proxy, &reply, res, &error);
148147
149G_GNUC_BEGIN_IGNORE_DEPRECATIONS148 self = SIGNON_AUTH_SESSION (g_task_get_source_object (res_process));
150 self = SIGNON_AUTH_SESSION (g_async_result_get_source_object (
151 (GAsyncResult *)res_process));
152 self->priv->busy = FALSE;149 self->priv->busy = FALSE;
153150
154 if (G_LIKELY (error == NULL))151 if (G_LIKELY (error == NULL))
155 {152 {
156 g_simple_async_result_set_op_res_gpointer (res_process, reply,153 g_task_return_pointer (res_process, reply,
157 (GDestroyNotify)154 (GDestroyNotify) g_variant_unref);
158 g_variant_unref);
159 }155 }
160 else156 else
161 {157 {
162 g_simple_async_result_take_error (res_process, error);158 g_task_return_error (res_process, error);
163 }159 }
164160
165 /* We use the idle variant in order to avoid the following critical161 g_object_unref (res_process);
166 * message:
167 * g_main_context_pop_thread_default: assertion `g_queue_peek_head (stack) == context' failed
168 */
169 g_simple_async_result_complete_in_idle (res_process);
170G_GNUC_END_IGNORE_DEPRECATIONS
171 g_object_unref (self);
172}162}
173163
174static void164static void
@@ -176,18 +166,17 @@
176{166{
177 SignonAuthSession *self = SIGNON_AUTH_SESSION (object);167 SignonAuthSession *self = SIGNON_AUTH_SESSION (object);
178 SignonAuthSessionPrivate *priv;168 SignonAuthSessionPrivate *priv;
179 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);169 GTask *res = G_TASK (user_data);
180 AuthSessionProcessData *process_data;170 AuthSessionProcessData *process_data;
181171
182 g_return_if_fail (self != NULL);172 g_return_if_fail (self != NULL);
183 priv = self->priv;173 priv = self->priv;
184174
185G_GNUC_BEGIN_IGNORE_DEPRECATIONS
186 if (error != NULL)175 if (error != NULL)
187 {176 {
188 DEBUG ("AuthSessionError: %s", error->message);177 DEBUG ("AuthSessionError: %s", error->message);
189 g_simple_async_result_set_from_error (res, error);178 g_task_return_error (res, g_error_copy (error));
190 g_simple_async_result_complete (res);179 g_object_unref (res);
191 return;180 return;
192 }181 }
193182
@@ -195,14 +184,13 @@
195 {184 {
196 priv->busy = FALSE;185 priv->busy = FALSE;
197 priv->canceled = FALSE;186 priv->canceled = FALSE;
198 g_simple_async_result_set_error (res,187 g_task_return_new_error (res,
199 signon_error_quark (),188 signon_error_quark (),
200 SIGNON_ERROR_SESSION_CANCELED,189 SIGNON_ERROR_SESSION_CANCELED,
201 "Authentication session was canceled");190 "Authentication session was canceled");
202 g_simple_async_result_complete (res);191 g_object_unref (res);
203 return;192 return;
204 }193 }
205G_GNUC_END_IGNORE_DEPRECATIONS
206194
207 process_data = g_object_get_data ((GObject *)res, data_key_process);195 process_data = g_object_get_data ((GObject *)res, data_key_process);
208 g_return_if_fail (process_data != NULL);196 g_return_if_fail (process_data != NULL);
@@ -210,7 +198,7 @@
210 sso_auth_session_call_process (priv->proxy,198 sso_auth_session_call_process (priv->proxy,
211 process_data->session_data,199 process_data->session_data,
212 process_data->mechanism,200 process_data->mechanism,
213 process_data->cancellable,201 g_task_get_cancellable (res),
214 auth_session_process_reply,202 auth_session_process_reply,
215 res);203 res);
216204
@@ -254,7 +242,6 @@
254242
255 g_slice_free (AuthSessionProcessCbData, cb_data);243 g_slice_free (AuthSessionProcessCbData, cb_data);
256 g_clear_error (&error);244 g_clear_error (&error);
257 g_object_unref (res);
258}245}
259246
260static void247static void
@@ -432,8 +419,6 @@
432{419{
433 g_return_if_fail (SIGNON_IS_AUTH_SESSION (self));420 g_return_if_fail (SIGNON_IS_AUTH_SESSION (self));
434421
435 SignonAuthSessionPrivate *priv = self->priv;
436 g_return_if_fail (priv != NULL);
437 g_return_if_fail (id >= 0);422 g_return_if_fail (id >= 0);
438423
439 auth_session_check_remote_object(self);424 auth_session_check_remote_object(self);
@@ -490,9 +475,6 @@
490 gpointer user_data)475 gpointer user_data)
491{476{
492 g_return_if_fail (SIGNON_IS_AUTH_SESSION (self));477 g_return_if_fail (SIGNON_IS_AUTH_SESSION (self));
493 SignonAuthSessionPrivate* priv = self->priv;
494
495 g_return_if_fail (priv != NULL);
496478
497 AuthSessionQueryAvailableMechanismsCbData *cb_data = g_slice_new0 (AuthSessionQueryAvailableMechanismsCbData);479 AuthSessionQueryAvailableMechanismsCbData *cb_data = g_slice_new0 (AuthSessionQueryAvailableMechanismsCbData);
498 cb_data->self = self;480 cb_data->self = self;
@@ -589,23 +571,18 @@
589{571{
590 SignonAuthSessionPrivate *priv;572 SignonAuthSessionPrivate *priv;
591 AuthSessionProcessData *process_data;573 AuthSessionProcessData *process_data;
592 GSimpleAsyncResult *res;574 GTask *res;
593575
594 g_return_if_fail (SIGNON_IS_AUTH_SESSION (self));576 g_return_if_fail (SIGNON_IS_AUTH_SESSION (self));
595 priv = self->priv;577 priv = self->priv;
596578
597 g_return_if_fail (session_data != NULL);579 g_return_if_fail (session_data != NULL);
598580
599G_GNUC_BEGIN_IGNORE_DEPRECATIONS581 res = g_task_new (self, cancellable, callback, user_data);
600 res = g_simple_async_result_new ((GObject *)self, callback, user_data,
601 signon_auth_session_process_async);
602 g_simple_async_result_set_check_cancellable (res, cancellable);
603G_GNUC_END_IGNORE_DEPRECATIONS
604582
605 process_data = g_slice_new0 (AuthSessionProcessData);583 process_data = g_slice_new0 (AuthSessionProcessData);
606 process_data->session_data = g_variant_ref_sink (session_data);584 process_data->session_data = g_variant_ref_sink (session_data);
607 process_data->mechanism = g_strdup (mechanism);585 process_data->mechanism = g_strdup (mechanism);
608 process_data->cancellable = cancellable;
609 g_object_set_data_full ((GObject *)res, data_key_process, process_data,586 g_object_set_data_full ((GObject *)res, data_key_process, process_data,
610 (GDestroyNotify)auth_session_process_data_free);587 (GDestroyNotify)auth_session_process_data_free);
611588
@@ -636,19 +613,12 @@
636signon_auth_session_process_finish (SignonAuthSession *self, GAsyncResult *res,613signon_auth_session_process_finish (SignonAuthSession *self, GAsyncResult *res,
637 GError **error)614 GError **error)
638{615{
639 GSimpleAsyncResult *async_result;616 GTask *task;
640 GVariant *reply;
641617
642 g_return_val_if_fail (SIGNON_IS_AUTH_SESSION (self), NULL);618 g_return_val_if_fail (SIGNON_IS_AUTH_SESSION (self), NULL);
643619
644 async_result = (GSimpleAsyncResult *)res;620 task = G_TASK (res);
645G_GNUC_BEGIN_IGNORE_DEPRECATIONS621 return g_task_propagate_pointer (task, error);
646 if (g_simple_async_result_propagate_error (async_result, error))
647 return NULL;
648
649 reply = g_simple_async_result_get_op_res_gpointer (async_result);
650G_GNUC_END_IGNORE_DEPRECATIONS
651 return g_variant_ref (reply);
652}622}
653623
654/**624/**
@@ -748,7 +718,6 @@
748 DEBUG ("Object path received: %s", object_path);718 DEBUG ("Object path received: %s", object_path);
749 g_free (object_path);719 g_free (object_path);
750 _signon_object_ready (self, auth_session_object_quark (), error);720 _signon_object_ready (self, auth_session_object_quark (), error);
751 g_clear_error (&error);
752}721}
753722
754static void723static void
755724
=== modified file 'libsignon-glib/signon-dbus-queue.c'
--- libsignon-glib/signon-dbus-queue.c 2010-06-29 07:25:04 +0000
+++ libsignon-glib/signon-dbus-queue.c 2016-05-19 15:30:34 +0000
@@ -121,7 +121,7 @@
121}121}
122122
123void123void
124_signon_object_ready (gpointer object, GQuark quark, const GError *error)124_signon_object_ready (gpointer object, GQuark quark, GError *error)
125{125{
126 SignonReadyData *rd;126 SignonReadyData *rd;
127127
@@ -129,7 +129,7 @@
129129
130 if(error)130 if(error)
131 g_object_set_qdata_full ((GObject *)object, _signon_object_error_quark(),131 g_object_set_qdata_full ((GObject *)object, _signon_object_error_quark(),
132 g_error_copy(error),132 error,
133 (GDestroyNotify)g_error_free);133 (GDestroyNotify)g_error_free);
134134
135 /* steal the qdata so the callbacks won't be invoked again, even if the135 /* steal the qdata so the callbacks won't be invoked again, even if the
136136
=== modified file 'libsignon-glib/signon-dbus-queue.h'
--- libsignon-glib/signon-dbus-queue.h 2010-06-28 11:59:12 +0000
+++ libsignon-glib/signon-dbus-queue.h 2016-05-19 15:30:34 +0000
@@ -36,7 +36,7 @@
36void _signon_object_call_when_ready (gpointer object, GQuark quark,36void _signon_object_call_when_ready (gpointer object, GQuark quark,
37 SignonReadyCb callback, gpointer user_data);37 SignonReadyCb callback, gpointer user_data);
3838
39void _signon_object_ready (gpointer object, GQuark quark, const GError *error);39void _signon_object_ready (gpointer object, GQuark quark, GError *error);
40void _signon_object_not_ready (gpointer object);40void _signon_object_not_ready (gpointer object);
4141
42const GError *_signon_object_last_error (gpointer object);42const GError *_signon_object_last_error (gpointer object);
4343
=== modified file 'libsignon-glib/signon-errors.h'
--- libsignon-glib/signon-errors.h 2012-01-27 10:24:27 +0000
+++ libsignon-glib/signon-errors.h 2016-05-19 15:30:34 +0000
@@ -27,7 +27,7 @@
2727
28#include <glib.h>28#include <glib.h>
29#include <glib-object.h>29#include <glib-object.h>
30#include "signon-enum-types.h"30#include <libsignon-glib/signon-enum-types.h>
3131
32#define SIGNON_ERROR (signon_error_quark())32#define SIGNON_ERROR (signon_error_quark())
3333
3434
=== modified file 'libsignon-glib/signon-identity-info.c'
--- libsignon-glib/signon-identity-info.c 2015-04-02 13:23:18 +0000
+++ libsignon-glib/signon-identity-info.c 2016-05-19 15:30:34 +0000
@@ -144,6 +144,7 @@
144 {144 {
145 g_hash_table_insert (info->methods, method, mechanisms);145 g_hash_table_insert (info->methods, method, mechanisms);
146 }146 }
147 g_variant_unref (method_map);
147 }148 }
148149
149 g_variant_lookup (variant,150 g_variant_lookup (variant,
150151
=== modified file 'libsignon-glib/signon-identity.c'
--- libsignon-glib/signon-identity.c 2015-04-02 13:23:18 +0000
+++ libsignon-glib/signon-identity.c 2016-05-19 15:30:34 +0000
@@ -949,9 +949,6 @@
949{949{
950 g_return_if_fail (SIGNON_IS_IDENTITY (self));950 g_return_if_fail (SIGNON_IS_IDENTITY (self));
951951
952 SignonIdentityPrivate *priv = self->priv;
953 g_return_if_fail (priv != NULL);
954
955 DEBUG ("%s %d", G_STRFUNC, __LINE__);952 DEBUG ("%s %d", G_STRFUNC, __LINE__);
956953
957 IdentityVerifyCbData *cb_data = g_slice_new0 (IdentityVerifyCbData);954 IdentityVerifyCbData *cb_data = g_slice_new0 (IdentityVerifyCbData);
@@ -1202,7 +1199,7 @@
1202 }1199 }
1203 }1200 }
12041201
1205 if (priv->updated == TRUE)1202 if (priv->updated || priv->removed)
1206 g_slice_free (IdentityInfoCbData, cb_data);1203 g_slice_free (IdentityInfoCbData, cb_data);
12071204
1208 g_slice_free (IdentityVoidData, operation_data);1205 g_slice_free (IdentityVoidData, operation_data);
@@ -1308,9 +1305,6 @@
1308{1305{
1309 g_return_if_fail (SIGNON_IS_IDENTITY (self));1306 g_return_if_fail (SIGNON_IS_IDENTITY (self));
13101307
1311 SignonIdentityPrivate *priv = self->priv;
1312 g_return_if_fail (priv != NULL);
1313
1314 DEBUG ("%s %d", G_STRFUNC, __LINE__);1308 DEBUG ("%s %d", G_STRFUNC, __LINE__);
13151309
1316 IdentityVoidData *operation_data = g_slice_new0 (IdentityVoidData);1310 IdentityVoidData *operation_data = g_slice_new0 (IdentityVoidData);
@@ -1335,9 +1329,6 @@
1335{1329{
1336 g_return_if_fail (SIGNON_IS_IDENTITY (self));1330 g_return_if_fail (SIGNON_IS_IDENTITY (self));
13371331
1338 SignonIdentityPrivate *priv = self->priv;
1339 g_return_if_fail (priv != NULL);
1340
1341 IdentityVoidCbData *cb_data = g_slice_new0 (IdentityVoidCbData);1332 IdentityVoidCbData *cb_data = g_slice_new0 (IdentityVoidCbData);
1342 cb_data->self = self;1333 cb_data->self = self;
1343 cb_data->cb = (SignonIdentityVoidCb)cb;1334 cb_data->cb = (SignonIdentityVoidCb)cb;
@@ -1368,9 +1359,6 @@
1368{1359{
1369 g_return_if_fail (SIGNON_IS_IDENTITY (self));1360 g_return_if_fail (SIGNON_IS_IDENTITY (self));
13701361
1371 SignonIdentityPrivate *priv = self->priv;
1372 g_return_if_fail (priv != NULL);
1373
1374 IdentityVoidCbData *cb_data = g_slice_new0 (IdentityVoidCbData);1362 IdentityVoidCbData *cb_data = g_slice_new0 (IdentityVoidCbData);
1375 cb_data->self = self;1363 cb_data->self = self;
1376 cb_data->cb = (SignonIdentityVoidCb)cb;1364 cb_data->cb = (SignonIdentityVoidCb)cb;
@@ -1399,9 +1387,6 @@
1399{1387{
1400 g_return_if_fail (SIGNON_IS_IDENTITY (self));1388 g_return_if_fail (SIGNON_IS_IDENTITY (self));
14011389
1402 SignonIdentityPrivate *priv = self->priv;
1403 g_return_if_fail (priv != NULL);
1404
1405 //TODO implement1390 //TODO implement
14061391
1407 if (cb)1392 if (cb)
@@ -1424,9 +1409,6 @@
1424{1409{
1425 g_return_if_fail (SIGNON_IS_IDENTITY (self));1410 g_return_if_fail (SIGNON_IS_IDENTITY (self));
14261411
1427 SignonIdentityPrivate *priv = self->priv;
1428 g_return_if_fail (priv != NULL);
1429
1430 //TODO implement1412 //TODO implement
14311413
1432 if (cb)1414 if (cb)
@@ -1448,9 +1430,6 @@
1448{1430{
1449 g_return_if_fail (SIGNON_IS_IDENTITY (self));1431 g_return_if_fail (SIGNON_IS_IDENTITY (self));
14501432
1451 SignonIdentityPrivate *priv = self->priv;
1452 g_return_if_fail (priv != NULL);
1453
1454 IdentityInfoCbData *cb_data = g_slice_new0 (IdentityInfoCbData);1433 IdentityInfoCbData *cb_data = g_slice_new0 (IdentityInfoCbData);
1455 cb_data->self = self;1434 cb_data->self = self;
1456 cb_data->cb = cb;1435 cb_data->cb = cb;
14571436
=== modified file 'libsignon-glib/signon-utils.c'
--- libsignon-glib/signon-utils.c 2012-10-17 07:06:24 +0000
+++ libsignon-glib/signon-utils.c 2016-05-19 15:30:34 +0000
@@ -106,7 +106,7 @@
106106
107 if (G_VALUE_TYPE (value) == G_TYPE_VARIANT)107 if (G_VALUE_TYPE (value) == G_TYPE_VARIANT)
108 {108 {
109 val = g_value_get_variant (value);109 val = g_value_dup_variant (value);
110 }110 }
111 else111 else
112 {112 {
@@ -115,6 +115,7 @@
115 val = g_dbus_gvalue_to_gvariant (value, type);115 val = g_dbus_gvalue_to_gvariant (value, type);
116 }116 }
117 g_variant_builder_add (&builder, "{sv}", key, val);117 g_variant_builder_add (&builder, "{sv}", key, val);
118 g_variant_unref (val);
118 }119 }
119 return g_variant_builder_end (&builder);120 return g_variant_builder_end (&builder);
120}121}
121122
=== modified file 'libsignon-glib/sso-auth-service.c'
--- libsignon-glib/sso-auth-service.c 2012-08-02 10:25:45 +0000
+++ libsignon-glib/sso-auth-service.c 2016-05-19 15:30:34 +0000
@@ -51,6 +51,13 @@
51}51}
5252
53static void53static void
54weak_ref_free(GWeakRef *ref)
55{
56 g_weak_ref_clear (ref);
57 g_slice_free (GWeakRef, ref);
58}
59
60static void
54set_singleton (SsoAuthService *object)61set_singleton (SsoAuthService *object)
55{62{
56 g_return_if_fail (IS_SSO_AUTH_SERVICE (object));63 g_return_if_fail (IS_SSO_AUTH_SERVICE (object));
@@ -59,7 +66,8 @@
5966
60 if (thread_objects == NULL)67 if (thread_objects == NULL)
61 {68 {
62 thread_objects = g_hash_table_new (g_direct_hash, g_direct_equal);69 thread_objects = g_hash_table_new_full (g_direct_hash, g_direct_equal,
70 NULL, (GDestroyNotify) weak_ref_free);
63 }71 }
6472
65 if (object != NULL)73 if (object != NULL)
6674
=== added file 'm4/gcov.m4'
--- m4/gcov.m4 1970-01-01 00:00:00 +0000
+++ m4/gcov.m4 2016-05-19 15:30:34 +0000
@@ -0,0 +1,92 @@
1# Copyright 2012-2016 Canonical Ltd.
2#
3# This program is free software: you can redistribute it and/or modify it
4# under the terms of the GNU General Public License version 3, as published
5# by the Free Software Foundation.
6#
7# This program is distributed in the hope that it will be useful, but
8# WITHOUT ANY WARRANTY; without even the implied warranties of
9# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
10# PURPOSE. See the GNU General Public License for more details.
11#
12# You should have received a copy of the GNU General Public License along
13# with this program. If not, see <http://www.gnu.org/licenses/>.
14
15# Checks for existence of coverage tools:
16# * gcov
17# * lcov
18# * genhtml
19# * gcovr
20#
21# Sets ac_cv_check_gcov to yes if tooling is present
22# and reports the executables to the variables LCOV, GCOVR and GENHTML.
23AC_DEFUN([AC_TDD_GCOV],
24[
25 AC_ARG_ENABLE(gcov,
26 AS_HELP_STRING([--enable-gcov],
27 [enable coverage testing with gcov]))
28
29 AM_CONDITIONAL(HAVE_GCOV, test "x$enable_gcov" = "xyes")
30
31 if test "x$enable_gcov" = "xyes"; then
32 # we need gcc:
33 if test "$GCC" != "yes"; then
34 AC_MSG_ERROR([GCC is required for --enable-gcov])
35 fi
36
37 # Check if ccache is being used
38 AC_CHECK_PROG(SHTOOL, shtool, shtool)
39 if test "$SHTOOL"; then
40 AS_CASE([`$SHTOOL path $CC`],
41 [*ccache*], [gcc_ccache=yes],
42 [gcc_ccache=no])
43 fi
44
45 if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
46 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
47 fi
48
49 lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12"
50 AC_CHECK_PROG(LCOV, lcov, lcov)
51 AC_CHECK_PROG(GENHTML, genhtml, genhtml)
52
53 if test "$LCOV"; then
54 AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [
55 glib_cv_lcov_version=invalid
56 lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
57 for lcov_check_version in $lcov_version_list; do
58 if test "$lcov_version" = "$lcov_check_version"; then
59 glib_cv_lcov_version="$lcov_check_version (ok)"
60 fi
61 done
62 ])
63 else
64 lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
65 AC_MSG_ERROR([$lcov_msg])
66 fi
67
68 case $glib_cv_lcov_version in
69 ""|invalid[)]
70 lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
71 AC_MSG_ERROR([$lcov_msg])
72 LCOV="exit 0;"
73 ;;
74 esac
75
76 if test -z "$GENHTML"; then
77 AC_MSG_ERROR([Could not find genhtml from the lcov package])
78 fi
79
80 # Remove all optimization flags from CFLAGS
81 changequote({,})
82 CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
83 changequote([,])
84
85 # Add the special gcc flags
86 COVERAGE_CFLAGS="--coverage -DG_DISABLE_ASSERTS -DG_DISABLE_CHECKS"
87 COVERAGE_CXXFLAGS="--coverage"
88 COVERAGE_LDFLAGS="-lgcov"
89
90fi
91]) # AC_TDD_GCOV
92
093
=== modified file 'tests/Makefile.am'
--- tests/Makefile.am 2014-12-09 09:20:01 +0000
+++ tests/Makefile.am 2016-05-19 15:30:34 +0000
@@ -5,6 +5,7 @@
55
6signon_glib_testsuite_SOURCES = check_signon.c6signon_glib_testsuite_SOURCES = check_signon.c
7signon_glib_testsuite_CPPFLAGS = \7signon_glib_testsuite_CPPFLAGS = \
8 -I$(top_builddir) \
8 -I$(top_srcdir) \9 -I$(top_srcdir) \
9 $(DEPS_CFLAGS) \10 $(DEPS_CFLAGS) \
10 $(CHECK_FLAGS)11 $(CHECK_FLAGS)
@@ -14,4 +15,7 @@
14 $(DEPS_LIBS) \15 $(DEPS_LIBS) \
15 -lpthread16 -lpthread
1617
18TESTS_ENVIRONMENT = \
19 TESTDIR=$(top_srcdir)/tests/; export TESTDIR;
20
17TESTS = signon-glib-test.sh21TESTS = signon-glib-test.sh
1822
=== modified file 'tests/check_signon.c'
--- tests/check_signon.c 2015-04-20 11:32:46 +0000
+++ tests/check_signon.c 2016-05-19 15:30:34 +0000
@@ -309,6 +309,7 @@
309 g_main_loop_run (main_loop);309 g_main_loop_run (main_loop);
310310
311 g_free(patterns[0]);311 g_free(patterns[0]);
312 g_object_unref(auth_session);
312 g_object_unref(idty);313 g_object_unref(idty);
313314
314 end_test ();315 end_test ();
@@ -366,6 +367,7 @@
366 g_free(patterns[0]);367 g_free(patterns[0]);
367 g_free(patterns[1]);368 g_free(patterns[1]);
368 g_free(patterns[2]);369 g_free(patterns[2]);
370 g_object_unref(auth_session);
369 g_object_unref(idty);371 g_object_unref(idty);
370372
371 end_test ();373 end_test ();
@@ -406,8 +408,6 @@
406 fail_unless(g_strcmp0(g_value_get_string(usernameVa), "test_username") == 0, "Wrong value of username");408 fail_unless(g_strcmp0(g_value_get_string(usernameVa), "test_username") == 0, "Wrong value of username");
407 fail_unless(g_strcmp0(g_value_get_string(realmVa), "testRealm_after_test") == 0, "Wrong value of realm");409 fail_unless(g_strcmp0(g_value_get_string(realmVa), "testRealm_after_test") == 0, "Wrong value of realm");
408410
409 g_hash_table_destroy(sessionData);
410
411 g_free(usernameKey);411 g_free(usernameKey);
412 g_free(realmKey);412 g_free(realmKey);
413413
@@ -528,6 +528,88 @@
528 g_free(passwordVa);528 g_free(passwordVa);
529 g_free(passwordKey);529 g_free(passwordKey);
530530
531 g_hash_table_unref (sessionData);
532
533 end_test ();
534}
535END_TEST
536
537static void
538test_auth_session_process_async_cb (GObject *source_object,
539 GAsyncResult *res,
540 gpointer user_data)
541{
542 SignonAuthSession *auth_session = SIGNON_AUTH_SESSION (source_object);
543 GVariant **v_reply = user_data;
544 GError *error = NULL;
545
546 fail_unless (SIGNON_IS_AUTH_SESSION (source_object));
547
548 *v_reply = signon_auth_session_process_finish (auth_session, res, &error);
549 fail_unless (error == NULL);
550
551 g_main_loop_quit (main_loop);
552}
553
554START_TEST(test_auth_session_process_async)
555{
556 gint state_counter = 0;
557 GError *err = NULL;
558 GVariantBuilder builder;
559 GVariant *session_data, *reply;
560 gchar *username, *realm;
561 gboolean ok;
562
563 g_debug("%s", G_STRFUNC);
564 SignonIdentity *idty = signon_identity_new(NULL, NULL);
565 fail_unless (idty != NULL, "Cannot create Iddentity object");
566
567 SignonAuthSession *auth_session = signon_identity_create_session(idty,
568 "ssotest",
569 &err);
570
571 fail_unless (auth_session != NULL, "Cannot create AuthSession object");
572
573 g_clear_error(&err);
574
575 g_signal_connect(auth_session, "state-changed",
576 G_CALLBACK(test_auth_session_states_cb), &state_counter);
577
578 g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT);
579 g_variant_builder_add (&builder, "{sv}",
580 SIGNON_SESSION_DATA_USERNAME,
581 g_variant_new_string ("test_username"));
582 g_variant_builder_add (&builder, "{sv}",
583 SIGNON_SESSION_DATA_SECRET,
584 g_variant_new_string ("test_pw"));
585
586 session_data = g_variant_builder_end (&builder);
587
588 signon_auth_session_process_async (auth_session,
589 session_data,
590 "mech1",
591 NULL,
592 test_auth_session_process_async_cb,
593 &reply);
594 main_loop = g_main_loop_new (NULL, FALSE);
595 g_main_loop_run (main_loop);
596 fail_unless (state_counter == 12, "Wrong numer of state change signals: %d", state_counter);
597
598 fail_unless (reply != NULL);
599 session_data = NULL;
600
601 ok = g_variant_lookup (reply, SIGNON_SESSION_DATA_USERNAME, "&s", &username);
602 ck_assert (ok);
603 ck_assert_str_eq (username, "test_username");
604 ok = g_variant_lookup (reply, SIGNON_SESSION_DATA_REALM, "&s", &realm);
605 ck_assert (ok);
606 ck_assert_str_eq (realm, "testRealm_after_test");
607
608 g_variant_unref (reply);
609
610 g_object_unref (auth_session);
611 g_object_unref (idty);
612
531 end_test ();613 end_test ();
532}614}
533END_TEST615END_TEST
@@ -581,6 +663,7 @@
581 fail_unless (error->domain == SIGNON_ERROR);663 fail_unless (error->domain == SIGNON_ERROR);
582 fail_unless (error->code == SIGNON_ERROR_METHOD_NOT_KNOWN);664 fail_unless (error->code == SIGNON_ERROR_METHOD_NOT_KNOWN);
583665
666 g_error_free (error);
584 g_object_unref (auth_session);667 g_object_unref (auth_session);
585668
586 end_test ();669 end_test ();
@@ -610,7 +693,6 @@
610 fail_unless (g_strcmp0 (g_value_get_string (v_username), "Nice user") == 0,693 fail_unless (g_strcmp0 (g_value_get_string (v_username), "Nice user") == 0,
611 "Wrong value of username");694 "Wrong value of username");
612695
613 g_hash_table_unref (reply);
614 g_object_unref (self);696 g_object_unref (self);
615697
616 g_main_loop_quit (main_loop);698 g_main_loop_quit (main_loop);
@@ -654,6 +736,7 @@
654 "mech1",736 "mech1",
655 test_auth_session_process_after_store_cb,737 test_auth_session_process_after_store_cb,
656 NULL);738 NULL);
739 g_hash_table_unref (session_data);
657}740}
658741
659START_TEST(test_auth_session_process_after_store)742START_TEST(test_auth_session_process_after_store)
@@ -681,6 +764,7 @@
681 g_main_loop_run (main_loop);764 g_main_loop_run (main_loop);
682765
683 g_object_unref (identity);766 g_object_unref (identity);
767 signon_identity_info_free (info);
684768
685 end_test ();769 end_test ();
686}770}
@@ -722,6 +806,7 @@
722806
723 *new_id = id;807 *new_id = id;
724808
809 g_object_unref (self);
725 g_main_loop_quit (main_loop);810 g_main_loop_quit (main_loop);
726}811}
727812
@@ -1064,7 +1149,7 @@
1064 fail_unless (_contains(mechs3, "mechanism3"));1149 fail_unless (_contains(mechs3, "mechanism3"));
1065 }1150 }
10661151
1067 if (info)1152 if (info && pattern_ptr)
1068 {1153 {
1069 signon_identity_info_free (pattern);1154 signon_identity_info_free (pattern);
1070 *pattern_ptr = signon_identity_info_copy (info);1155 *pattern_ptr = signon_identity_info_copy (info);
@@ -1309,6 +1394,7 @@
1309 signon_identity_query_info (idty, identity_info_cb, &info);1394 signon_identity_query_info (idty, identity_info_cb, &info);
1310 g_main_loop_run (main_loop);1395 g_main_loop_run (main_loop);
13111396
1397 signon_identity_info_free (info);
1312 g_object_unref (idty);1398 g_object_unref (idty);
1313 g_object_unref (idty2);1399 g_object_unref (idty2);
13141400
@@ -1425,6 +1511,7 @@
1425 "mech1",1511 "mech1",
1426 test_regression_unref_process_cb,1512 test_regression_unref_process_cb,
1427 "Hi there!");1513 "Hi there!");
1514 g_hash_table_unref (session_data);
1428 g_main_loop_run (main_loop);1515 g_main_loop_run (main_loop);
14291516
1430 end_test ();1517 end_test ();
@@ -1453,6 +1540,7 @@
1453 tcase_add_test (tc_core, test_auth_session_query_mechanisms);1540 tcase_add_test (tc_core, test_auth_session_query_mechanisms);
1454 tcase_add_test (tc_core, test_auth_session_query_mechanisms_nonexisting);1541 tcase_add_test (tc_core, test_auth_session_query_mechanisms_nonexisting);
1455 tcase_add_test (tc_core, test_auth_session_process);1542 tcase_add_test (tc_core, test_auth_session_process);
1543 tcase_add_test (tc_core, test_auth_session_process_async);
1456 tcase_add_test (tc_core, test_auth_session_process_failure);1544 tcase_add_test (tc_core, test_auth_session_process_failure);
1457 tcase_add_test (tc_core, test_auth_session_process_after_store);1545 tcase_add_test (tc_core, test_auth_session_process_after_store);
1458 tcase_add_test (tc_core, test_store_credentials_identity);1546 tcase_add_test (tc_core, test_store_credentials_identity);
14591547
=== added file 'tests/signon-glib-test-wrapper.sh'
--- tests/signon-glib-test-wrapper.sh 1970-01-01 00:00:00 +0000
+++ tests/signon-glib-test-wrapper.sh 2016-05-19 15:30:34 +0000
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3exec "$(pwd)/../libtool" --mode=execute $WRAPPER ./signon-glib-testsuite
04
=== modified file 'tests/signon-glib-test.sh'
--- tests/signon-glib-test.sh 2015-04-10 07:27:34 +0000
+++ tests/signon-glib-test.sh 2016-05-19 15:30:34 +0000
@@ -10,9 +10,16 @@
1010
11#Environment variables for the test application11#Environment variables for the test application
12export G_MESSAGES_DEBUG=all12export G_MESSAGES_DEBUG=all
13export G_SLICE=debug-blocks13# If running the test executable under a wrapper, setup the tests so that the
14# wrapper can debug them more easily.
15if [ -n "$WRAPPER" ]; then
16 export G_SLICE=always-malloc
17 export CK_FORK="no"
18else
19 export G_SLICE=debug-blocks
20fi
1421
15TEST_APP=./signon-glib-testsuite22TEST_APP="$TESTDIR/signon-glib-test-wrapper.sh"
1623
17# If dbus-test-runner exists, use it to run the tests in a separate D-Bus24# If dbus-test-runner exists, use it to run the tests in a separate D-Bus
18# session25# session

Subscribers

No one subscribed via source and target branches