Merge lp:~3v1n0/bamf/remove-gtk2 into lp:bamf/0.4

Proposed by Marco Trevisan (Treviño) on 2012-11-15
Status: Merged
Approved by: Michael Terry on 2012-11-19
Approved revision: 509
Merged at revision: 502
Proposed branch: lp:~3v1n0/bamf/remove-gtk2
Merge into: lp:bamf/0.4
Diff against target: 711 lines (+97/-278)
12 files modified
configure.ac (+4/-30)
debian/changelog (+5/-0)
debian/control (+1/-32)
debian/rules (+4/-22)
doc/reference/libbamf/Makefile.am (+2/-8)
lib/libbamf/Makefile.am (+14/-26)
src/bamf-legacy-window.c (+0/-40)
src/bamf-xutils.c (+3/-0)
tests/Makefile.am.gtests (+50/-0)
tests/bamfdaemon/Makefile.am (+3/-49)
tests/functional/Makefile.am (+7/-12)
tests/libbamf/Makefile.am (+4/-59)
To merge this branch: bzr merge lp:~3v1n0/bamf/remove-gtk2
Reviewer Review Type Date Requested Status
Michael Terry 2012-11-15 Approve on 2012-11-19
PS Jenkins bot continuous-integration Pending
Review via email: mp+134537@code.launchpad.net

Commit Message

Autconf, debian: remove the legacy gtk-2 support and factorize the test building code

Description of the Change

Remove the gtk2 dependencies from build system. Don't build gtk2 packages anymore as they are not needed.

Also, cleanup the building of tests, factorizing the shared code into just one makefile.

To post a comment you must log in.
lp:~3v1n0/bamf/remove-gtk2 updated on 2012-11-15
506. By Marco Trevisan (Treviño) on 2012-11-15

debian: update changelog

Michael Terry (mterry) wrote :

* You should also remove libwnck-dev from debian/control.
* In debian/rules, you can drop all the -Bbuild flags. And if that makes the call a no-op (like override_dh_auto_build just being a call to dh_auto_build), you can drop the override stanza altogether.
* You can probably just drop LIBBAMF_VER, since we hardcode the 3 enough other places. But if you like to keep it, that's fine too.
* When building, I get the following warnings and error:
lib/libbamf/Makefile.am:81: BUILT_SOURCES multiply defined in condition TRUE ...
lib/libbamf/Makefile.am:3: ... `BUILT_SOURCES' previously defined here
lib/libbamf/Makefile.am: installing `./depcomp'
src/Makefile.am:113: BUILT_SOURCES multiply defined in condition TRUE ...
src/Makefile.am:4: ... `BUILT_SOURCES' previously defined here
automake-1.11: cannot open < tests/Makefile.am.tests: No such file or directory
dh_autoreconf: ./autogen.sh returned exit code 1

Looks like a typo of .tests vs .gtests

review: Needs Fixing
lp:~3v1n0/bamf/remove-gtk2 updated on 2012-11-19
507. By Marco Trevisan (Treviño) on 2012-11-19

debian: update glib2 dependency and changelog

508. By Marco Trevisan (Treviño) on 2012-11-19

debian/rules: demoved the unneeded overrides

509. By Marco Trevisan (Treviño) on 2012-11-19

Autoconf: point to correct Makefile in testing.

Marco Trevisan (Treviño) (3v1n0) wrote :

> * You should also remove libwnck-dev from debian/control.

Done.

> * In debian/rules, you can drop all the -Bbuild flags. And if that makes the
> call a no-op (like override_dh_auto_build just being a call to dh_auto_build),
> you can drop the override stanza altogether.

Right, done as well.

> * When building, I get the following warnings and error:
> automake-1.11: cannot open < tests/Makefile.am.tests: No such file or
> Looks like a typo of .tests vs .gtests

Warnings are somewhat needed for now (but I'll get rid of them soon), typo fixed. Sorry for this, I just didn't remove the renamed file locally so I was not getting the issue at all. :/

Michael Terry (mterry) wrote :

Looks fine now. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2012-11-14 15:17:02 +0000
3+++ configure.ac 2012-11-19 18:45:28 +0000
4@@ -4,6 +4,7 @@
5 AC_PREREQ([2.63])
6 AC_INIT(bamf, 0.4.0, dx-team@canonical.com)
7 AC_PREREQ(2.62)
8+AC_SUBST(LIBBAMF_VER, 3)
9
10 AC_CONFIG_SRCDIR(src/main.c)
11 AC_CONFIG_HEADERS(config.h)
12@@ -13,7 +14,6 @@
13
14 AC_CONFIG_MACRO_DIR([m4])
15
16-
17 GNOME_COMMON_INIT
18 GNOME_COMPILE_WARNINGS(maximum)
19
20@@ -39,17 +39,6 @@
21 SHAMROCK_EXPAND_DATADIR
22
23 #
24-# gtk version
25-#
26-AC_ARG_WITH([gtk],
27- [AS_HELP_STRING([--with-gtk],
28- [Which version of gtk to use @<:@default=3@:>@])],
29- [],
30- [with_gtk=3])
31-
32-AM_CONDITIONAL(USE_GTK3, [test "x$with_gtk" = x3])
33-
34-#
35 # pkg-config
36 #
37 PKG_PROG_PKG_CONFIG
38@@ -77,23 +66,13 @@
39 #
40 # libwnck
41 #
42-if test "x$with_gtk" = "x2"; then
43- PKG_CHECK_MODULES(WNCK, libwnck-1.0)
44-else
45- PKG_CHECK_MODULES(WNCK, libwnck-3.0)
46- AC_DEFINE_UNQUOTED(USE_GTK3, , [Use GTK3])
47-fi
48+PKG_CHECK_MODULES(WNCK, libwnck-3.0)
49
50 #
51 # libgtop
52 #
53 PKG_CHECK_MODULES(GTOP, libgtop-2.0)
54-
55-if test "x$with_gtk" = "x2"; then
56- PKG_CHECK_MODULES(LIBWSBIND, glib-2.0 gdk-2.0 gdk-x11-2.0 gtk+-2.0)
57-else
58- PKG_CHECK_MODULES(LIBWSBIND, glib-2.0 gdk-3.0 gdk-x11-3.0 gtk+-3.0)
59-fi
60+PKG_CHECK_MODULES(LIBWSBIND, glib-2.0 gdk-3.0 gdk-x11-3.0 gtk+-3.0)
61 AC_SUBST(LIBWSBIND_CFLAGS)
62 AC_SUBST(LIBWSBIND_LIBS)
63
64@@ -153,11 +132,7 @@
65 #
66 # Gnome/GTK checks
67 #
68-if test "x$with_gtk" = "x2"; then
69- AM_PATH_GTK_2_0
70-else
71- AM_PATH_GTK_3_0
72-fi
73+AM_PATH_GTK_3_0
74
75 dnl CFLAGS
76 CFLAGS="$CFLAGS -Wall -Werror -lm"
77@@ -192,7 +167,6 @@
78 Build Environment
79 Install Prefix: ${prefix}
80 Introspection: ${enable_introspection}
81- GTK+ Version: ${with_gtk}
82 Unity Webapps: ${enable_webapps}
83 Headless tests: ${enable_headless_tests}
84
85
86=== modified file 'debian/changelog'
87--- debian/changelog 2012-11-14 16:01:34 +0000
88+++ debian/changelog 2012-11-19 18:45:28 +0000
89@@ -12,6 +12,11 @@
90
91 [ Marco Trevisan (Treviño) ]
92 * Bumping version to 0.4.0
93+ * debian/control:
94+ - Removed the gtk2 dependencies and packages
95+ - Dependency on libglib2.0-dev updated to match the configure.ac value
96+ * debian/rules:
97+ - Removed the unneded dh overrides
98
99 [ Didier Roche ]
100 * Automatic snapshot from revision 494 (bootstrap)
101
102=== modified file 'debian/control'
103--- debian/control 2012-11-07 19:51:56 +0000
104+++ debian/control 2012-11-19 18:45:28 +0000
105@@ -6,11 +6,9 @@
106 Build-Depends: dbus-x11,
107 debhelper (>= 9),
108 dh-autoreconf,
109- libglib2.0-dev (>= 2.28.0~),
110- libwnck-dev,
111+ libglib2.0-dev (>= 2.32.0),
112 libwnck-3-dev,
113 libgtop2-dev,
114- libgtk2.0-dev (>= 2.12.0),
115 libgtk-3-dev (>= 3.0.0),
116 libdbus-glib-1-dev,
117 gtk-doc-tools,
118@@ -18,7 +16,6 @@
119 libgirepository1.0-dev,
120 gir1.2-atk-1.0,
121 gir1.2-glib-2.0,
122- gir1.2-gtk-2.0 (>= 2.19.5),
123 gir1.2-gtk-3.0 (>= 3.0.0),
124 gir1.2-pango-1.0,
125 gir1.2-wnck-3.0,
126@@ -42,19 +39,6 @@
127 module that facilitates the matching of applications started
128 through GDesktopAppInfo
129
130-Package: libbamf0
131-Architecture: any
132-Depends: ${shlibs:Depends},
133- ${misc:Depends},
134- bamfdaemon (= ${binary:Version}),
135-Breaks: unity (<< 3.2.12)
136-Pre-Depends: ${misc:Pre-Depends}
137-Multi-Arch: same
138-Description: Window matching library - shared library (gtk2)
139- bamf matches application windows to desktop files
140- .
141- This package contains shared libraries to be used by gtk2 applications.
142-
143 Package: libbamf3-0
144 Architecture: any
145 Depends: ${shlibs:Depends},
146@@ -68,21 +52,6 @@
147 .
148 This package contains shared libraries to be used by applications.
149
150-Package: libbamf-dev
151-Section: libdevel
152-Architecture: any
153-Depends: ${shlibs:Depends},
154- ${misc:Depends},
155- libbamf0 (= ${binary:Version}),
156- libwnck-dev,
157- libglib2.0-dev (>= 2.23.0-1ubuntu3~),
158-Suggests: libbamf-doc
159-Description: Window matching library - development files (gtk2)
160- bamf matches application windows to desktop files
161- .
162- This package contains files that are needed to build applications on
163- gtk2 stack.
164-
165 Package: libbamf3-dev
166 Section: libdevel
167 Architecture: any
168
169=== modified file 'debian/rules'
170--- debian/rules 2012-11-14 15:04:32 +0000
171+++ debian/rules 2012-11-19 18:45:28 +0000
172@@ -11,30 +11,12 @@
173 NOCONFIGURE=1 dh_autoreconf ./autogen.sh
174
175 override_dh_auto_configure:
176- dh_auto_configure -Bbuild/gtk2 -- --enable-introspection=no \
177- --enable-headless-tests \
178- --disable-webapps \
179- --with-gtk=2
180- dh_auto_configure -Bbuild/gtk3 -- --enable-introspection=no \
181- --enable-gtk-doc \
182- --enable-headless-tests \
183- --with-gtk=3
184-
185-override_dh_auto_build:
186- dh_auto_build -Bbuild/gtk2
187- dh_auto_build -Bbuild/gtk3
188-
189-override_dh_auto_clean:
190- dh_auto_clean -Bbuild/gtk2
191- dh_auto_clean -Bbuild/gtk3
192-
193-override_dh_auto_test:
194- dh_auto_test -Bbuild/gtk2
195- dh_auto_test -Bbuild/gtk3
196+ dh_auto_configure -- --enable-introspection=no \
197+ --enable-gtk-doc \
198+ --enable-headless-tests
199
200 override_dh_auto_install:
201- dh_auto_install -Bbuild/gtk2
202- dh_auto_install -Bbuild/gtk3
203+ dh_auto_install
204 find debian/tmp/usr/lib -name \*.la -exec rm {} \;
205 find debian/tmp/usr/lib -name \*.a -exec rm {} \;
206
207
208=== modified file 'doc/reference/libbamf/Makefile.am'
209--- doc/reference/libbamf/Makefile.am 2011-08-04 07:11:37 +0000
210+++ doc/reference/libbamf/Makefile.am 2012-11-19 18:45:28 +0000
211@@ -1,11 +1,5 @@
212 ## Process this file with automake to produce Makefile.in
213
214-if USE_GTK3
215-VER=3
216-else
217-VER=
218-endif
219-
220 # automake requirements
221 AUTOMAKE_OPTIONS = 1.7
222
223@@ -57,11 +51,11 @@
224 $(LIBWSBIND_LIBS) \
225 $(GLIB_LIBS) \
226 $(DBUS_LIBS) \
227- $(top_builddir)/lib/libbamf/libbamf$(VER).la
228+ $(top_builddir)/lib/libbamf/libbamf$(LIBBAMF_VER).la
229
230 # This includes the standard gtk-doc make rules, copied by gtkdocize.
231 include $(top_srcdir)/gtk-doc.make
232
233 # Other files to distribute
234 # e.g. EXTRA_DIST += version.xml.in
235-EXTRA_DIST +=
236+EXTRA_DIST +=
237
238=== modified file 'lib/libbamf/Makefile.am'
239--- lib/libbamf/Makefile.am 2012-10-12 10:30:22 +0000
240+++ lib/libbamf/Makefile.am 2012-11-19 18:45:28 +0000
241@@ -1,15 +1,7 @@
242-if USE_GTK3
243-VER=3
244-lib_LTLIBRARIES = libbamf3.la
245-else
246-VER=
247-lib_LTLIBRARIES = libbamf.la
248-endif
249-
250 CLEANFILES =
251 DISTCLEANFILES =
252 BUILT_SOURCES =
253-EXTRA_DIST =
254+EXTRA_DIST =
255
256 include $(top_srcdir)/Makefile.am.marshal
257 -include $(INTROSPECTION_MAKEFILE)
258@@ -44,7 +36,9 @@
259 libbamf.h \
260 $(NULL)
261
262-libbamf_la_SOURCES = \
263+lib_LTLIBRARIES = libbamf3.la
264+
265+libbamf3_la_SOURCES = \
266 bamf-factory.h \
267 bamf-application-private.h \
268 bamf-view-private.h \
269@@ -52,17 +46,17 @@
270 $(libbamf_sources) \
271 $(NULL)
272
273-nodist_libbamf_la_SOURCES = \
274+nodist_libbamf3_la_SOURCES = \
275 $(libbamf_built_sources)
276 $(NULL)
277
278-libbamf_la_LIBADD = \
279+libbamf3_la_LIBADD = \
280 $(LIBWSBIND_LIBS) \
281 $(GLIB_LIBS) \
282 $(DBUS_LIBS) \
283 $(NULL)
284
285-libbamf_la_CPPFLAGS = \
286+libbamf3_la_CPPFLAGS = \
287 -Wall -std=c99 \
288 -fPIC \
289 -DDATADIR=\""$(datadir)"\" \
290@@ -75,17 +69,11 @@
291 $(DBUS_CFLAGS) \
292 $(NULL)
293
294-libbamf_la_LDFLAGS = \
295+libbamf3_la_LDFLAGS = \
296 -shared \
297 -export-symbols-regex "^bamf_" \
298 $(NULL)
299
300-libbamf3_la_SOURCES = $(libbamf_la_SOURCES)
301-nodist_libbamf3_la_SOURCES = $(libbamf_built_sources)
302-libbamf3_la_LIBADD = $(libbamf_la_LIBADD)
303-libbamf3_la_CPPFLAGS = $(libbamf_la_CPPFLAGS)
304-libbamf3_la_LDFLAGS = $(libbamf_la_LDFLAGS)
305-
306 glib_marshal_list = bamf-marshal.list
307 glib_marshal_prefix = _bamf_marshal
308
309@@ -103,13 +91,13 @@
310
311 EXTRA_DIST += bamf-tab-source-glue.xml
312
313-libbamf_includedir=$(includedir)/libbamf$(VER)/libbamf
314+libbamf_includedir=$(includedir)/libbamf$(LIBBAMF_VER)/libbamf
315 libbamf_include_HEADERS = \
316 $(libbamf_headers)
317
318 libbamf_pcdir = $(libdir)/pkgconfig
319 libbamf_pc_DATA = \
320- libbamf$(VER).pc
321+ libbamf$(LIBBAMF_VER).pc
322
323
324 #########################
325@@ -127,7 +115,7 @@
326 $(libbamf_sources) \
327 $(NULL)
328
329-Bamf-0.2.gir: libbamf.la
330+Bamf-0.2.gir: libbamf$(LIBBAMF_VER).la
331 Bamf_0_2_gir_INCLUDES = GObject-2.0 GLib-2.0
332 Bamf_0_2_gir_CFLAGS = \
333 --warn-all \
334@@ -136,9 +124,9 @@
335 -I$(top_srcdir)/lib \
336 -I$(top_builddir)/lib \
337 $(NULL)
338-Bamf_0_2_gir_LIBS = libbamf.la
339+Bamf_0_2_gir_LIBS = libbamf$(LIBBAMF_VER).la
340 Bamf_0_2_gir_FILES = $(introspection_sources)
341-Bamf_0_2_gir_EXPORT_PACKAGES = libbamf$(VER)
342+Bamf_0_2_gir_EXPORT_PACKAGES = libbamf$(LIBBAMF_VER)
343
344 INTROSPECTION_GIRS += Bamf-0.2.gir
345
346@@ -159,7 +147,7 @@
347 if HAVE_INTROSPECTION
348
349 vapidir = $(datadir)/vala/vapi
350-vapi_DATA = libbamf$(VER).vapi
351+vapi_DATA = libbamf$(LIBBAMF_VER).vapi
352
353 $(vapi_DATA): $(INTROSPECTION_GIRS)
354 $(AM_V_GEN)$(VALA_API_GEN) --library=$(@:.vapi=) $<
355
356=== modified file 'src/bamf-legacy-window.c'
357--- src/bamf-legacy-window.c 2012-11-05 20:04:01 +0000
358+++ src/bamf-legacy-window.c 2012-11-19 18:45:28 +0000
359@@ -48,10 +48,6 @@
360 {
361 WnckWindow * legacy_window;
362 char * mini_icon_path;
363-#ifndef USE_GTK3
364- char * group_name;
365- char * instance_name;
366-#endif
367 gulong closed_id;
368 gulong name_changed_id;
369 gulong state_changed_id;
370@@ -128,18 +124,7 @@
371 if (!window)
372 return NULL;
373
374-#ifdef USE_GTK3
375 return wnck_window_get_class_instance_name (window);
376-
377-#else
378- if (!self->priv->instance_name)
379- {
380- Window xid = wnck_window_get_xid (window);
381- bamf_xutils_get_window_class_hints (xid, &self->priv->instance_name, NULL);
382- }
383-
384- return self->priv->instance_name;
385-#endif
386 }
387
388 const char *
389@@ -157,18 +142,7 @@
390 if (!window)
391 return NULL;
392
393-#ifdef USE_GTK3
394 return wnck_window_get_class_group_name (window);
395-
396-#else
397- if (!self->priv->group_name)
398- {
399- Window xid = wnck_window_get_xid (window);
400- bamf_xutils_get_window_class_hints (xid, NULL, &self->priv->group_name);
401- }
402-
403- return self->priv->group_name;
404-#endif
405 }
406
407 const char *
408@@ -531,20 +505,6 @@
409 self->priv->mini_icon_path = NULL;
410 }
411
412-#ifndef USE_GTK3
413- if (self->priv->group_name)
414- {
415- g_free (self->priv->group_name);
416- self->priv->group_name = NULL;
417- }
418-
419- if (self->priv->instance_name)
420- {
421- g_free (self->priv->instance_name);
422- self->priv->instance_name = NULL;
423- }
424-#endif
425-
426 if (self->priv->legacy_window)
427 {
428 g_signal_handler_disconnect (self->priv->legacy_window,
429
430=== modified file 'src/bamf-xutils.c'
431--- src/bamf-xutils.c 2012-10-09 08:32:34 +0000
432+++ src/bamf-xutils.c 2012-11-19 18:45:28 +0000
433@@ -175,4 +175,7 @@
434
435 XFree (class_hint.res_class);
436 XFree (class_hint.res_name);
437+
438+ if (close_display)
439+ XCloseDisplay (xdisplay);
440 }
441
442=== added file 'tests/Makefile.am.gtests'
443--- tests/Makefile.am.gtests 1970-01-01 00:00:00 +0000
444+++ tests/Makefile.am.gtests 2012-11-19 18:45:28 +0000
445@@ -0,0 +1,50 @@
446+# Utility targets for testing. The variable $(TEST_BINARY) defines the binary
447+# to be ran to perform the gtests.
448+#
449+# Author: Marco Trevisan <marco@ubuntu.com>
450+
451+# Run tests as part of make check
452+if ENABLE_HEADLESS_TESTS
453+check-local: test-headless
454+
455+XVFB_RUN = $(abs_top_srcdir)/tests/run-xvfb.sh
456+LOG_PATH = headless-logs
457+test-headless:
458+ set -e; \
459+ rm -rf $(LOG_PATH); \
460+ mkdir $(LOG_PATH); \
461+ export LOG_PATH=$(LOG_PATH); \
462+ export XVFB_PATH=$(XVFB); \
463+ export DISPLAY=""; \
464+ source $(XVFB_RUN); \
465+ \
466+ $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \
467+ source $(LOG_PATH)/sessionbus.sh; \
468+ sleep 3; \
469+ \
470+ make test;
471+# END HEADLESS TESTS
472+else
473+check-local: test
474+endif
475+
476+
477+test:
478+ @gtester -k --verbose -o=$(TEST_BINARY)-results.xml ./$(TEST_BINARY)
479+
480+.PHONY: check-report full-report
481+check-report: $(TEST_BINARY)
482+ @gtester -k --verbose -o=$(TEST_BINARY)-results.xml -k ./$(TEST_BINARY) \
483+ && ( gtester-report $(TEST_BINARY)-results.xml \
484+ | sed 's/GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
485+ > $(TEST_BINARY)-results.html ) \
486+ && gnome-open ./$(TEST_BINARY)-results.html
487+
488+full-report:
489+ @gtester -k --verbose -o=$(TEST_BINARY)-results.xml -k -m=slow ./$(TEST_BINARY) \
490+ && ( gtester-report $(TEST_BINARY)-results.xml \
491+ | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
492+ > $(TEST_BINARY)-results.html )
493+
494+clean-generic:
495+ rm -f $(TEST_BINARY)-results.xml $(TEST_BINARY)-results.html
496
497=== modified file 'tests/bamfdaemon/Makefile.am'
498--- tests/bamfdaemon/Makefile.am 2012-10-09 09:27:18 +0000
499+++ tests/bamfdaemon/Makefile.am 2012-11-19 18:45:28 +0000
500@@ -1,8 +1,6 @@
501 noinst_PROGRAMS = \
502 test-bamf
503
504-XVFB_RUN=$(srcdir)/run-xvfb.sh
505-
506 bamf_test_extra_built_sources = \
507 $(top_builddir)/src/bamf-marshal.c \
508 $(top_builddir)/src/bamf-marshal.h \
509@@ -85,7 +83,7 @@
510 -I$(top_srcdir)/src \
511 -I$(top_builddir)/src \
512 -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
513- -DTESTDIR=\""$(top_srcdir)/tests"\" \
514+ -DTESTDIR=\""$(abs_top_srcdir)/tests"\" \
515 $(GCC_FLAGS) \
516 $(GTK_CFLAGS) \
517 $(GLIB_CFLAGS) \
518@@ -111,49 +109,5 @@
519 $(bamf_test_webapps_sources) \
520 $(NULL)
521
522-# Run tests as part of make check
523-if ENABLE_HEADLESS_TESTS
524-check-local: test-headless
525-else
526-check-local: test
527-endif
528-
529-test:
530- @gtester --verbose -k -o=test-bamf-results.xml ./test-bamf
531-
532-.PHONY: check-report full-report
533-check-report:
534- @gtester --verbose -k -o=test-bamf-results.xml -k ./test-bamf \
535- && ( gtester-report test-bamf-results.xml \
536- | sed 's/GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
537- > test-bamf-results.html ) \
538- && gnome-open ./test-bamf-results.html
539-
540-full-report:
541- @gtester --verbose-k -o=test-bamf-results.xml -k -m=slow ./test-bamf \
542- && ( gtester-report test-bamf-results.xml \
543- | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
544- > test-bamf-results.html )
545-
546-clean-generic:
547- rm -f test-bamf-results.xml test-bamf-results.html
548-
549-# START HEADLESS TESTS
550-if ENABLE_HEADLESS_TESTS
551-LOG_PATH = headless-logs
552-test-headless:
553- set -e; \
554- rm -rf $(LOG_PATH); \
555- mkdir $(LOG_PATH); \
556- export LOG_PATH=$(LOG_PATH); \
557- export XVFB_PATH=$(XVFB); \
558- export DISPLAY=""; \
559- source $(XVFB_RUN); \
560- \
561- $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \
562- source $(LOG_PATH)/sessionbus.sh; \
563- sleep 3; \
564- \
565- make test;
566-endif
567-# END HEADLESS TESTS
568+TEST_BINARY = test-bamf
569+include $(top_srcdir)/tests/Makefile.am.gtests
570
571=== modified file 'tests/functional/Makefile.am'
572--- tests/functional/Makefile.am 2012-08-22 17:31:46 +0000
573+++ tests/functional/Makefile.am 2012-11-19 18:45:28 +0000
574@@ -1,15 +1,10 @@
575-if USE_GTK3
576-VER=3
577-else
578-VER=
579-endif
580-
581-NULL =
582+NULL =
583
584 noinst_PROGRAMS = \
585 alt-tabber \
586 desktop-file-launcher \
587- interaction-tester
588+ interaction-tester \
589+ tab-source-test
590
591 # alt-tabber
592 alt_tabber_SOURCES = alt-tabber.c
593@@ -29,8 +24,8 @@
594 $(LIBWSBIND_LIBS) \
595 $(GLIB_LIBS) \
596 $(DBUS_LIBS) \
597- $(top_builddir)/lib/libbamf/libbamf$(VER).la
598-
599+ $(top_builddir)/lib/libbamf/libbamf$(LIBBAMF_VER).la
600+
601 # tab-source-test
602 tab_source_test_SOURCES = tab-source-test.c
603 tab_source_test_CPPFLAGS = \
604@@ -49,7 +44,7 @@
605 $(LIBWSBIND_LIBS) \
606 $(GLIB_LIBS) \
607 $(DBUS_LIBS) \
608- $(top_builddir)/lib/libbamf/libbamf$(VER).la
609+ $(top_builddir)/lib/libbamf/libbamf$(LIBBAMF_VER).la
610
611 # interaction-tester
612 interaction_tester_SOURCES = interaction-tester.c
613@@ -69,7 +64,7 @@
614 $(LIBWSBIND_LIBS) \
615 $(GLIB_LIBS) \
616 $(DBUS_LIBS) \
617- $(top_builddir)/lib/libbamf/libbamf$(VER).la
618+ $(top_builddir)/lib/libbamf/libbamf$(LIBBAMF_VER).la
619
620
621 # desktop-file-launcher
622
623=== modified file 'tests/libbamf/Makefile.am'
624--- tests/libbamf/Makefile.am 2012-02-03 07:18:24 +0000
625+++ tests/libbamf/Makefile.am 2012-11-19 18:45:28 +0000
626@@ -1,9 +1,3 @@
627-if USE_GTK3
628-VER=3
629-else
630-VER=
631-endif
632-
633 noinst_PROGRAMS = \
634 test-libbamf
635
636@@ -18,7 +12,7 @@
637 -I$(top_srcdir)/lib/libbamf \
638 -I$(top_builddir)/lib/libbamf \
639 -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
640- -DTESTDIR=\""$(top_srcdir)/tests/libbamf"\" \
641+ -DTESTDIR=\""$(abs_top_srcdir)/tests/libbamf"\" \
642 $(GCC_FLAGS) \
643 $(GTK_CFLAGS) \
644 $(WNCK_CFLAGS) \
645@@ -27,61 +21,12 @@
646 $(GLIB_CFLAGS)
647
648 test_libbamf_LDADD = \
649- $(top_builddir)/lib/libbamf/libbamf$(VER).la \
650+ $(top_builddir)/lib/libbamf/libbamf$(LIBBAMF_VER).la \
651 $(LIBWSBIND_LIBS) \
652 $(WNCK_LIBS) \
653 $(GLIB_LIBS) \
654 $(GTK_LIBS) \
655 $(DBUS_LIBS)
656
657-# Run tests as part of make check
658-if ENABLE_HEADLESS_TESTS
659-check-local: test-headless
660-else
661-check-local: test
662-endif
663-
664-test:
665- @gtester -k -o=test-libbamf-results.xml ./test-libbamf
666-
667-.PHONY: check-report full-report
668-check-report:
669- @gtester -k -o=test-libbamf-results.xml -k ./test-libbamf \
670- && ( gtester-report test-libbamf-results.xml \
671- | sed 's/GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
672- > test-libbamf-results.html ) \
673- && gnome-open ./test-libbamf-results.html
674-
675-full-report:
676- @gtester -k -o=test-libbamf-results.xml -k -m=slow ./test-libbamf \
677- && ( gtester-report test-libbamf-results.xml \
678- | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
679- > test-libbamf-results.html )
680-
681-clean-generic:
682- rm -f test-libbamf-results.xml test-libbamf-results.html
683-
684-# START HEADLESS TESTS
685-if ENABLE_HEADLESS_TESTS
686-DISPLAY = :27
687-LOG_PATH = headless-logs
688-test-headless:
689- set -e; \
690- export DISPLAY=$(DISPLAY); \
691- rm -rf $(LOG_PATH); \
692- mkdir $(LOG_PATH); \
693- $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/Xvfb.out 2>&1 & \
694- sleep 1; \
695- \
696- $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \
697- source $(LOG_PATH)/sessionbus.sh; \
698- sleep 1; \
699- \
700- make test; \
701- sleep 1; \
702- \
703- kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/sessionbus.sh | grep -oE '[0-9]+'`; \
704- pkill Xvfb;
705-
706-endif
707-# END HEADLESS TESTS
708+TEST_BINARY = test-libbamf
709+include $(top_srcdir)/tests/Makefile.am.gtests
710
711=== renamed file 'tests/bamfdaemon/run-xvfb.sh' => 'tests/run-xvfb.sh'

Subscribers

People subscribed via source and target branches