Merge lp:~kamstrup/bamf/fail-on-FAIL into lp:bamf/0.4

Proposed by Mikkel Kamstrup Erlandsen
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 424
Merged at revision: 421
Proposed branch: lp:~kamstrup/bamf/fail-on-FAIL
Merge into: lp:bamf/0.4
Diff against target: 88 lines (+13/-12)
4 files modified
src/bamf-legacy-window.c (+3/-0)
src/bamf-view.c (+0/-2)
tests/bamfdaemon/Makefile.am (+5/-5)
tests/libbamf/Makefile.am (+5/-5)
To merge this branch: bzr merge lp:~kamstrup/bamf/fail-on-FAIL
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Jason Smith (community) Approve
Review via email: mp+83601@code.launchpad.net

Description of the change

Bugfix:

 * Add missing guard checking if the legacy WnckWindow is != NULL in bamf_legacy_window_save_mini_icon(). This fixes the tests /Application/ManagesXid and /Application/Xids when running headless

Fixes for headless test mode:

 * Properly exit if any tests report errors during 'make check' when running in headless mode
 * Remove debug spew when running tests "Export path: %s\n"
 * Remove unused variable TEST_RESULTS from test Makefile.ams

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

seems rather obvious on seeing it, well caught

review: Approve
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Just uploaded some more fixes that should fix the headless mode on the build bots:

 * Remove unused variable TEST_RESULTS from test Makefile.ams

 * Remove debug spew when running tests "Export path: %s\n"

 * Add missing guard checking if the legacy WnckWindow is != NULL in bamf_legacy_window_save_mini_icon(). This fixes the tests /Application/ManagesXid and /Application/Xids

Please re-review

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Approving latest commit, looks good, let's test this :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bamf-legacy-window.c'
2--- src/bamf-legacy-window.c 2011-09-26 11:44:10 +0000
3+++ src/bamf-legacy-window.c 2011-11-29 08:12:24 +0000
4@@ -215,6 +215,9 @@
5
6 window = self->priv->legacy_window;
7
8+ if (!window)
9+ return NULL;
10+
11 if (wnck_window_get_icon_is_fallback (window))
12 return NULL;
13
14
15=== modified file 'src/bamf-view.c'
16--- src/bamf-view.c 2011-08-01 23:25:01 +0000
17+++ src/bamf-view.c 2011-11-29 08:12:24 +0000
18@@ -462,8 +462,6 @@
19 path = g_strdup_printf ("%s/%s", BAMF_DBUS_PATH, stable_name);
20 g_free (stable_name);
21
22- g_print ("Export Path: %s\n", path);
23-
24 BAMF_VIEW_GET_CLASS (view)->names = g_list_prepend (BAMF_VIEW_GET_CLASS (view)->names, path);
25
26 view->priv->path = path;
27
28=== modified file 'tests/bamfdaemon/Makefile.am'
29--- tests/bamfdaemon/Makefile.am 2011-11-28 10:17:05 +0000
30+++ tests/bamfdaemon/Makefile.am 2011-11-29 08:12:24 +0000
31@@ -109,21 +109,21 @@
32 DISPLAY = :27
33 LOG_PATH = headless-logs
34 test-headless:
35+ set -e; \
36 export DISPLAY=$(DISPLAY); \
37 rm -rf $(LOG_PATH); \
38 mkdir $(LOG_PATH); \
39- $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/_Xvfb.out 2>&1 & \
40+ $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/Xvfb.out 2>&1 & \
41 sleep 1; \
42 \
43- $(DBUS_LAUNCH) > $(LOG_PATH)/_sessionbus.sh; \
44- source $(LOG_PATH)/_sessionbus.sh; \
45+ $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \
46+ source $(LOG_PATH)/sessionbus.sh; \
47 sleep 1; \
48 \
49 make test; \
50- TEST_RESULTS=$?; \
51 sleep 1; \
52 \
53- kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/_sessionbus.sh | grep -oE '[0-9]+'`; \
54+ kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/sessionbus.sh | grep -oE '[0-9]+'`; \
55 pkill Xvfb;
56
57 endif
58
59=== modified file 'tests/libbamf/Makefile.am'
60--- tests/libbamf/Makefile.am 2011-11-28 10:17:05 +0000
61+++ tests/libbamf/Makefile.am 2011-11-29 08:12:24 +0000
62@@ -65,21 +65,21 @@
63 DISPLAY = :27
64 LOG_PATH = headless-logs
65 test-headless:
66+ set -e; \
67 export DISPLAY=$(DISPLAY); \
68 rm -rf $(LOG_PATH); \
69 mkdir $(LOG_PATH); \
70- $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/_Xvfb.out 2>&1 & \
71+ $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/Xvfb.out 2>&1 & \
72 sleep 1; \
73 \
74- $(DBUS_LAUNCH) > $(LOG_PATH)/_sessionbus.sh; \
75- source $(LOG_PATH)/_sessionbus.sh; \
76+ $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \
77+ source $(LOG_PATH)/sessionbus.sh; \
78 sleep 1; \
79 \
80 make test; \
81- TEST_RESULTS=$?; \
82 sleep 1; \
83 \
84- kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/_sessionbus.sh | grep -oE '[0-9]+'`; \
85+ kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/sessionbus.sh | grep -oE '[0-9]+'`; \
86 pkill Xvfb;
87
88 endif

Subscribers

People subscribed via source and target branches