Merge lp:~jonas-drange/ubuntu-push/lp1517189 into lp:ubuntu-push/automatic
- lp1517189
- Merge into automatic
Proposed by
Jonas G. Drange
Status: | Merged |
---|---|
Approved by: | Jonas G. Drange |
Approved revision: | 424 |
Merged at revision: | 417 |
Proposed branch: | lp:~jonas-drange/ubuntu-push/lp1517189 |
Merge into: | lp:ubuntu-push/automatic |
Diff against target: |
492 lines (+88/-50) 17 files modified
accounts/caccounts.go (+2/-0) click/click_test.go (+28/-13) client/service/postal_test.go (+16/-11) client/service/service_test.go (+3/-1) client/session/session_test.go (+20/-8) config/config_test.go (+1/-1) debian/rules (+0/-6) dependencies.tsv (+2/-2) http13client/z_last_test.go (+2/-1) identifier/testing/testing_test.go (+3/-2) launch_helper/cual/cual_c.go (+2/-0) launch_helper/kindpool.go (+1/-1) launch_helper/kindpool_test.go (+1/-1) messaging/cmessaging/cmessaging_c.go (+2/-0) scripts/connect-many.py (+1/-1) signing-helper/CMakeLists.txt (+2/-2) urldispatcher/curldispatcher/curldispatcher_c.go (+2/-0) |
To merge this branch: | bzr merge lp:~jonas-drange/ubuntu-push/lp1517189 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Samuele Pedroni | Approve | ||
Review via email: mp+278045@code.launchpad.net |
This proposal supersedes a proposal from 2015-11-19.
Commit message
fix tests and warnings
Description of the change
To post a comment you must log in.
- 422. By Jonas G. Drange
-
undo maxprocs, insecure. add pedronis' fix for panics
Revision history for this message
Samuele Pedroni (pedronis) wrote : | # |
so it seeems we need -insecure but is not relevant for building so I would like to talk to some people maintaining go first
looks good to me, but put a small suggestion below
review:
Approve
- 423. By Jonas G. Drange
-
make format
- 424. By Jonas G. Drange
-
panic on err in helper
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'accounts/caccounts.go' | |||
2 | --- accounts/caccounts.go 2014-09-05 10:47:29 +0000 | |||
3 | +++ accounts/caccounts.go 2015-11-20 14:56:43 +0000 | |||
4 | @@ -3,6 +3,8 @@ | |||
5 | 3 | /* | 3 | /* |
6 | 4 | #include <libaccounts-glib/accounts-glib.h> | 4 | #include <libaccounts-glib/accounts-glib.h> |
7 | 5 | 5 | ||
8 | 6 | void gocb(); | ||
9 | 7 | |||
10 | 6 | static void cb(AgManager *manager, AgAccountId account_id, gpointer p) { | 8 | static void cb(AgManager *manager, AgAccountId account_id, gpointer p) { |
11 | 7 | AgAccount *account = ag_manager_get_account(manager, account_id); | 9 | AgAccount *account = ag_manager_get_account(manager, account_id); |
12 | 8 | if (!account) { | 10 | if (!account) { |
13 | 9 | 11 | ||
14 | === modified file 'click/click_test.go' | |||
15 | --- click/click_test.go 2014-09-17 19:38:34 +0000 | |||
16 | +++ click/click_test.go 2015-11-20 14:56:43 +0000 | |||
17 | @@ -1,5 +1,5 @@ | |||
18 | 1 | /* | 1 | /* |
20 | 2 | Copyright 2013-2014 Canonical Ltd. | 2 | Copyright 2013-2015 Canonical Ltd. |
21 | 3 | 3 | ||
22 | 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
23 | 5 | under the terms of the GNU General Public License version 3, as published | 5 | under the terms of the GNU General Public License version 3, as published |
24 | @@ -19,6 +19,8 @@ | |||
25 | 19 | import ( | 19 | import ( |
26 | 20 | "encoding/json" | 20 | "encoding/json" |
27 | 21 | "fmt" | 21 | "fmt" |
28 | 22 | "os/exec" | ||
29 | 23 | "strings" | ||
30 | 22 | "testing" | 24 | "testing" |
31 | 23 | 25 | ||
32 | 24 | . "launchpad.net/gocheck" | 26 | . "launchpad.net/gocheck" |
33 | @@ -32,6 +34,16 @@ | |||
34 | 32 | 34 | ||
35 | 33 | var _ = Suite(&clickSuite{}) | 35 | var _ = Suite(&clickSuite{}) |
36 | 34 | 36 | ||
37 | 37 | func GetPyVer() string { | ||
38 | 38 | out, err := exec.Command("python3", "-V").Output() | ||
39 | 39 | if err != nil { | ||
40 | 40 | panic(err) | ||
41 | 41 | } | ||
42 | 42 | pyver := strings.Replace(string(out[:]), "Python ", "", -1) | ||
43 | 43 | vers := strings.Split(pyver, ".") | ||
44 | 44 | return fmt.Sprintf("%s.%s", vers[0], vers[1]) | ||
45 | 45 | } | ||
46 | 46 | |||
47 | 35 | func (cs *clickSuite) TestParseAppId(c *C) { | 47 | func (cs *clickSuite) TestParseAppId(c *C) { |
48 | 36 | app, err := ParseAppId("com.ubuntu.clock_clock") | 48 | app, err := ParseAppId("com.ubuntu.clock_clock") |
49 | 37 | c.Assert(err, IsNil) | 49 | c.Assert(err, IsNil) |
50 | @@ -72,18 +84,19 @@ | |||
51 | 72 | } | 84 | } |
52 | 73 | 85 | ||
53 | 74 | func (cs *clickSuite) TestParseAppIdLegacy(c *C) { | 86 | func (cs *clickSuite) TestParseAppIdLegacy(c *C) { |
55 | 75 | app, err := ParseAppId("_python3.4") | 87 | pyver := fmt.Sprintf("python%s", GetPyVer()) |
56 | 88 | app, err := ParseAppId(fmt.Sprintf("_%s", pyver)) | ||
57 | 76 | c.Assert(err, IsNil) | 89 | c.Assert(err, IsNil) |
58 | 77 | c.Check(app.Package, Equals, "") | 90 | c.Check(app.Package, Equals, "") |
59 | 78 | c.Check(app.InPackage(""), Equals, true) | 91 | c.Check(app.InPackage(""), Equals, true) |
61 | 79 | c.Check(app.Application, Equals, "python3.4") | 92 | c.Check(app.Application, Equals, pyver) |
62 | 80 | c.Check(app.Version, Equals, "") | 93 | c.Check(app.Version, Equals, "") |
63 | 81 | c.Check(app.Click, Equals, false) | 94 | c.Check(app.Click, Equals, false) |
69 | 82 | c.Check(app.Original(), Equals, "_python3.4") | 95 | c.Check(app.Original(), Equals, fmt.Sprintf("_%s", pyver)) |
70 | 83 | c.Check(app.Versioned(), Equals, "python3.4") | 96 | c.Check(app.Versioned(), Equals, pyver) |
71 | 84 | c.Check(app.Base(), Equals, "python3.4") | 97 | c.Check(app.Base(), Equals, pyver) |
72 | 85 | c.Check(app.DesktopId(), Equals, "python3.4.desktop") | 98 | c.Check(app.DesktopId(), Equals, fmt.Sprintf("%s.desktop", pyver)) |
73 | 86 | c.Check(app.DispatchPackage(), Equals, "python3.4") | 99 | c.Check(app.DispatchPackage(), Equals, pyver) |
74 | 87 | 100 | ||
75 | 88 | for _, s := range []string{"_.foo", "_foo/", "_/foo"} { | 101 | for _, s := range []string{"_.foo", "_foo/", "_/foo"} { |
76 | 89 | app, err = ParseAppId(s) | 102 | app, err = ParseAppId(s) |
77 | @@ -93,7 +106,8 @@ | |||
78 | 93 | } | 106 | } |
79 | 94 | 107 | ||
80 | 95 | func (cs *clickSuite) TestJSON(c *C) { | 108 | func (cs *clickSuite) TestJSON(c *C) { |
82 | 96 | for _, appId := range []string{"com.ubuntu.clock_clock", "com.ubuntu.clock_clock_10", "_python3.4"} { | 109 | pyver := fmt.Sprintf("python%s", GetPyVer()) |
83 | 110 | for _, appId := range []string{"com.ubuntu.clock_clock", "com.ubuntu.clock_clock_10", fmt.Sprintf("_%s", pyver)} { | ||
84 | 97 | app, err := ParseAppId(appId) | 111 | app, err := ParseAppId(appId) |
85 | 98 | c.Assert(err, IsNil, Commentf(appId)) | 112 | c.Assert(err, IsNil, Commentf(appId)) |
86 | 99 | b, err := json.Marshal(app) | 113 | b, err := json.Marshal(app) |
87 | @@ -106,9 +120,10 @@ | |||
88 | 106 | } | 120 | } |
89 | 107 | 121 | ||
90 | 108 | func (cs *clickSuite) TestIcon(c *C) { | 122 | func (cs *clickSuite) TestIcon(c *C) { |
92 | 109 | app, err := ParseAppId("_python3.4") | 123 | pyver := fmt.Sprintf("python%s", GetPyVer()) |
93 | 124 | app, err := ParseAppId(fmt.Sprintf("_%s", pyver)) | ||
94 | 110 | c.Assert(err, IsNil) | 125 | c.Assert(err, IsNil) |
96 | 111 | c.Check(app.Icon(), Equals, "/usr/share/pixmaps/python3.4.xpm") | 126 | c.Check(app.Icon(), Equals, fmt.Sprintf("/usr/share/pixmaps/%s.xpm", pyver)) |
97 | 112 | } | 127 | } |
98 | 113 | 128 | ||
99 | 114 | func (s *clickSuite) TestUser(c *C) { | 129 | func (s *clickSuite) TestUser(c *C) { |
100 | @@ -161,7 +176,7 @@ | |||
101 | 161 | func (s *clickSuite) TestInstalledLegacy(c *C) { | 176 | func (s *clickSuite) TestInstalledLegacy(c *C) { |
102 | 162 | u, err := User() | 177 | u, err := User() |
103 | 163 | c.Assert(err, IsNil) | 178 | c.Assert(err, IsNil) |
105 | 164 | app, err := ParseAppId("_python3.4") | 179 | app, err := ParseAppId(fmt.Sprintf("_python%s", GetPyVer())) |
106 | 165 | c.Assert(err, IsNil) | 180 | c.Assert(err, IsNil) |
107 | 166 | c.Check(u.Installed(app, false), Equals, true) | 181 | c.Check(u.Installed(app, false), Equals, true) |
108 | 167 | } | 182 | } |
109 | @@ -198,7 +213,7 @@ | |||
110 | 198 | func (s *clickSuite) TestSymbolicIconCallsSymbolic(c *C) { | 213 | func (s *clickSuite) TestSymbolicIconCallsSymbolic(c *C) { |
111 | 199 | symbolic = func(string) string { return "xyzzy" } | 214 | symbolic = func(string) string { return "xyzzy" } |
112 | 200 | defer func() { symbolic = _symbolic }() | 215 | defer func() { symbolic = _symbolic }() |
114 | 201 | app, err := ParseAppId("_python3.4") | 216 | app, err := ParseAppId(fmt.Sprintf("_python%s", GetPyVer())) |
115 | 202 | c.Assert(err, IsNil) | 217 | c.Assert(err, IsNil) |
116 | 203 | c.Check(app.SymbolicIcon(), Equals, "xyzzy") | 218 | c.Check(app.SymbolicIcon(), Equals, "xyzzy") |
117 | 204 | } | 219 | } |
118 | 205 | 220 | ||
119 | === modified file 'client/service/postal_test.go' | |||
120 | --- client/service/postal_test.go 2015-10-29 15:51:59 +0000 | |||
121 | +++ client/service/postal_test.go 2015-11-20 14:56:43 +0000 | |||
122 | @@ -134,6 +134,7 @@ | |||
123 | 134 | } | 134 | } |
124 | 135 | 135 | ||
125 | 136 | type fakeUrlDispatcher struct { | 136 | type fakeUrlDispatcher struct { |
126 | 137 | DispatchDone chan bool | ||
127 | 137 | DispatchCalls [][]string | 138 | DispatchCalls [][]string |
128 | 138 | TestURLCalls []map[string][]string | 139 | TestURLCalls []map[string][]string |
129 | 139 | NextTestURLResult bool | 140 | NextTestURLResult bool |
130 | @@ -148,6 +149,7 @@ | |||
131 | 148 | if fud.DispatchShouldFail { | 149 | if fud.DispatchShouldFail { |
132 | 149 | return errors.New("fail!") | 150 | return errors.New("fail!") |
133 | 150 | } | 151 | } |
134 | 152 | fud.DispatchDone <- true | ||
135 | 151 | return nil | 153 | return nil |
136 | 152 | } | 154 | } |
137 | 153 | 155 | ||
138 | @@ -196,7 +198,13 @@ | |||
139 | 196 | ps.bus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) | 198 | ps.bus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) |
140 | 197 | ps.notifBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) | 199 | ps.notifBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) |
141 | 198 | ps.counterBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) | 200 | ps.counterBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) |
143 | 199 | ps.accountsBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true), map[string]dbus.Variant{"IncomingMessageVibrate": dbus.Variant{true}}) | 201 | ps.accountsBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true), map[string]dbus.Variant{ |
144 | 202 | "IncomingMessageVibrate": dbus.Variant{true}, | ||
145 | 203 | "SilentMode": dbus.Variant{false}, | ||
146 | 204 | "IncomingMessageSound": dbus.Variant{""}, | ||
147 | 205 | "IncomingMessageVibrateSilentMode": dbus.Variant{false}, | ||
148 | 206 | }) | ||
149 | 207 | |||
150 | 200 | ps.hapticBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) | 208 | ps.hapticBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true)) |
151 | 201 | ps.unityGreeterBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true), false) | 209 | ps.unityGreeterBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true), false) |
152 | 202 | ps.winStackBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true), []windowstack.WindowsInfo{}) | 210 | ps.winStackBus = testibus.NewTestingEndpoint(condition.Work(true), condition.Work(true), []windowstack.WindowsInfo{}) |
153 | @@ -557,14 +565,13 @@ | |||
154 | 557 | svc.NotificationsEndp = endp | 565 | svc.NotificationsEndp = endp |
155 | 558 | svc.UnityGreeterEndp = ps.unityGreeterBus | 566 | svc.UnityGreeterEndp = ps.unityGreeterBus |
156 | 559 | svc.WindowStackEndp = ps.winStackBus | 567 | svc.WindowStackEndp = ps.winStackBus |
157 | 568 | nopTicker := make(chan []interface{}) | ||
158 | 569 | testibus.SetWatchSource(endp, "ActionInvoked", nopTicker) | ||
159 | 570 | defer close(nopTicker) | ||
160 | 560 | svc.launchers = map[string]launch_helper.HelperLauncher{} | 571 | svc.launchers = map[string]launch_helper.HelperLauncher{} |
161 | 561 | svc.fallbackVibration = &launch_helper.Vibration{Pattern: []uint32{1}} | 572 | svc.fallbackVibration = &launch_helper.Vibration{Pattern: []uint32{1}} |
162 | 562 | c.Assert(svc.Start(), IsNil) | 573 | c.Assert(svc.Start(), IsNil) |
163 | 563 | 574 | ||
164 | 564 | nopTicker := make(chan []interface{}) | ||
165 | 565 | testibus.SetWatchSource(endp, "ActionInvoked", nopTicker) | ||
166 | 566 | defer close(nopTicker) | ||
167 | 567 | |||
168 | 568 | // Persist is false so we just check the log | 575 | // Persist is false so we just check the log |
169 | 569 | card := &launch_helper.Card{Icon: "icon-value", Summary: "summary-value", Body: "body-value", Popup: true, Persist: false} | 576 | card := &launch_helper.Card{Icon: "icon-value", Summary: "summary-value", Body: "body-value", Popup: true, Persist: false} |
170 | 570 | vib := json.RawMessage(`true`) | 577 | vib := json.RawMessage(`true`) |
171 | @@ -660,20 +667,19 @@ | |||
172 | 660 | app, _ := click.ParseAppId("com.example.test_test-app") | 667 | app, _ := click.ParseAppId("com.example.test_test-app") |
173 | 661 | c.Assert(svc.Start(), IsNil) | 668 | c.Assert(svc.Start(), IsNil) |
174 | 662 | fakeDisp := new(fakeUrlDispatcher) | 669 | fakeDisp := new(fakeUrlDispatcher) |
175 | 670 | fakeDisp.DispatchDone = make(chan bool) | ||
176 | 663 | svc.urlDispatcher = fakeDisp | 671 | svc.urlDispatcher = fakeDisp |
177 | 664 | fakeDisp.NextTestURLResult = true | 672 | fakeDisp.NextTestURLResult = true |
178 | 665 | svc.messagingMenu = fmm | 673 | svc.messagingMenu = fmm |
179 | 666 | aCh := make(chan *notifications.RawAction) | 674 | aCh := make(chan *notifications.RawAction) |
180 | 667 | rCh := make(chan *reply.MMActionReply) | 675 | rCh := make(chan *reply.MMActionReply) |
181 | 668 | bCh := make(chan bool) | ||
182 | 669 | go func() { | 676 | go func() { |
183 | 670 | aCh <- nil // just in case? | 677 | aCh <- nil // just in case? |
184 | 671 | aCh <- ¬ifications.RawAction{App: app, Action: "potato://", Nid: "xyzzy"} | 678 | aCh <- ¬ifications.RawAction{App: app, Action: "potato://", Nid: "xyzzy"} |
185 | 672 | close(aCh) | 679 | close(aCh) |
186 | 673 | bCh <- true | ||
187 | 674 | }() | 680 | }() |
188 | 675 | go svc.handleActions(aCh, rCh) | 681 | go svc.handleActions(aCh, rCh) |
190 | 676 | takeNextBool(bCh) | 682 | takeNextBool(fakeDisp.DispatchDone) |
191 | 677 | fakeDisp.Lock.Lock() | 683 | fakeDisp.Lock.Lock() |
192 | 678 | defer fakeDisp.Lock.Unlock() | 684 | defer fakeDisp.Lock.Unlock() |
193 | 679 | c.Assert(len(fakeDisp.DispatchCalls), Equals, 1) | 685 | c.Assert(len(fakeDisp.DispatchCalls), Equals, 1) |
194 | @@ -687,19 +693,18 @@ | |||
195 | 687 | c.Assert(svc.Start(), IsNil) | 693 | c.Assert(svc.Start(), IsNil) |
196 | 688 | fakeDisp := new(fakeUrlDispatcher) | 694 | fakeDisp := new(fakeUrlDispatcher) |
197 | 689 | svc.urlDispatcher = fakeDisp | 695 | svc.urlDispatcher = fakeDisp |
198 | 696 | fakeDisp.DispatchDone = make(chan bool) | ||
199 | 690 | fakeDisp.NextTestURLResult = true | 697 | fakeDisp.NextTestURLResult = true |
200 | 691 | app, _ := click.ParseAppId("com.example.test_test-app") | 698 | app, _ := click.ParseAppId("com.example.test_test-app") |
201 | 692 | aCh := make(chan *notifications.RawAction) | 699 | aCh := make(chan *notifications.RawAction) |
202 | 693 | rCh := make(chan *reply.MMActionReply) | 700 | rCh := make(chan *reply.MMActionReply) |
203 | 694 | bCh := make(chan bool) | ||
204 | 695 | go func() { | 701 | go func() { |
205 | 696 | rCh <- nil // just in case? | 702 | rCh <- nil // just in case? |
206 | 697 | rCh <- &reply.MMActionReply{App: app, Action: "potato://", Notification: "foo.bar"} | 703 | rCh <- &reply.MMActionReply{App: app, Action: "potato://", Notification: "foo.bar"} |
207 | 698 | close(rCh) | 704 | close(rCh) |
208 | 699 | bCh <- true | ||
209 | 700 | }() | 705 | }() |
210 | 701 | go svc.handleActions(aCh, rCh) | 706 | go svc.handleActions(aCh, rCh) |
212 | 702 | takeNextBool(bCh) | 707 | takeNextBool(fakeDisp.DispatchDone) |
213 | 703 | fakeDisp.Lock.Lock() | 708 | fakeDisp.Lock.Lock() |
214 | 704 | defer fakeDisp.Lock.Unlock() | 709 | defer fakeDisp.Lock.Unlock() |
215 | 705 | c.Assert(len(fakeDisp.DispatchCalls), Equals, 1) | 710 | c.Assert(len(fakeDisp.DispatchCalls), Equals, 1) |
216 | 706 | 711 | ||
217 | === modified file 'client/service/service_test.go' | |||
218 | --- client/service/service_test.go 2014-11-25 17:30:03 +0000 | |||
219 | +++ client/service/service_test.go 2015-11-20 14:56:43 +0000 | |||
220 | @@ -36,7 +36,9 @@ | |||
221 | 36 | "launchpad.net/ubuntu-push/testing/condition" | 36 | "launchpad.net/ubuntu-push/testing/condition" |
222 | 37 | ) | 37 | ) |
223 | 38 | 38 | ||
225 | 39 | func TestService(t *testing.T) { TestingT(t) } | 39 | func TestService(t *testing.T) { |
226 | 40 | TestingT(t) | ||
227 | 41 | } | ||
228 | 40 | 42 | ||
229 | 41 | type serviceSuite struct { | 43 | type serviceSuite struct { |
230 | 42 | log logger.Logger | 44 | log logger.Logger |
231 | 43 | 45 | ||
232 | === modified file 'client/session/session_test.go' | |||
233 | --- client/session/session_test.go 2015-04-17 12:55:00 +0000 | |||
234 | +++ client/session/session_test.go 2015-11-20 14:56:43 +0000 | |||
235 | @@ -1021,8 +1021,20 @@ | |||
236 | 1021 | }() | 1021 | }() |
237 | 1022 | } | 1022 | } |
238 | 1023 | 1023 | ||
239 | 1024 | func (s *loopSuite) waitUntilRunning(c *C) { | ||
240 | 1025 | delay := time.Duration(1000) | ||
241 | 1026 | for i := 0; i < 5; i++ { | ||
242 | 1027 | if s.sess.State() == Running { | ||
243 | 1028 | return | ||
244 | 1029 | } | ||
245 | 1030 | time.Sleep(delay) | ||
246 | 1031 | delay *= 2 | ||
247 | 1032 | } | ||
248 | 1033 | c.Check(s.sess.State(), Equals, Running) | ||
249 | 1034 | } | ||
250 | 1035 | |||
251 | 1024 | func (s *loopSuite) TestLoopReadError(c *C) { | 1036 | func (s *loopSuite) TestLoopReadError(c *C) { |
253 | 1025 | c.Check(s.sess.State(), Equals, Running) | 1037 | s.waitUntilRunning(c) |
254 | 1026 | s.upCh <- errors.New("Read") | 1038 | s.upCh <- errors.New("Read") |
255 | 1027 | err := <-s.sess.errCh | 1039 | err := <-s.sess.errCh |
256 | 1028 | c.Check(err, ErrorMatches, "Read") | 1040 | c.Check(err, ErrorMatches, "Read") |
257 | @@ -1030,7 +1042,7 @@ | |||
258 | 1030 | } | 1042 | } |
259 | 1031 | 1043 | ||
260 | 1032 | func (s *loopSuite) TestLoopPing(c *C) { | 1044 | func (s *loopSuite) TestLoopPing(c *C) { |
262 | 1033 | c.Check(s.sess.State(), Equals, Running) | 1045 | s.waitUntilRunning(c) |
263 | 1034 | c.Check(takeNext(s.downCh), Equals, "deadline 1ms") | 1046 | c.Check(takeNext(s.downCh), Equals, "deadline 1ms") |
264 | 1035 | s.upCh <- protocol.PingPongMsg{Type: "ping"} | 1047 | s.upCh <- protocol.PingPongMsg{Type: "ping"} |
265 | 1036 | c.Check(takeNext(s.downCh), Equals, protocol.PingPongMsg{Type: "pong"}) | 1048 | c.Check(takeNext(s.downCh), Equals, protocol.PingPongMsg{Type: "pong"}) |
266 | @@ -1040,7 +1052,7 @@ | |||
267 | 1040 | } | 1052 | } |
268 | 1041 | 1053 | ||
269 | 1042 | func (s *loopSuite) TestLoopLoopsDaLoop(c *C) { | 1054 | func (s *loopSuite) TestLoopLoopsDaLoop(c *C) { |
271 | 1043 | c.Check(s.sess.State(), Equals, Running) | 1055 | s.waitUntilRunning(c) |
272 | 1044 | for i := 1; i < 10; i++ { | 1056 | for i := 1; i < 10; i++ { |
273 | 1045 | c.Check(takeNext(s.downCh), Equals, "deadline 1ms") | 1057 | c.Check(takeNext(s.downCh), Equals, "deadline 1ms") |
274 | 1046 | s.upCh <- protocol.PingPongMsg{Type: "ping"} | 1058 | s.upCh <- protocol.PingPongMsg{Type: "ping"} |
275 | @@ -1053,7 +1065,7 @@ | |||
276 | 1053 | } | 1065 | } |
277 | 1054 | 1066 | ||
278 | 1055 | func (s *loopSuite) TestLoopBroadcast(c *C) { | 1067 | func (s *loopSuite) TestLoopBroadcast(c *C) { |
280 | 1056 | c.Check(s.sess.State(), Equals, Running) | 1068 | s.waitUntilRunning(c) |
281 | 1057 | b := &protocol.BroadcastMsg{ | 1069 | b := &protocol.BroadcastMsg{ |
282 | 1058 | Type: "broadcast", | 1070 | Type: "broadcast", |
283 | 1059 | AppId: "--ignored--", | 1071 | AppId: "--ignored--", |
284 | @@ -1070,7 +1082,7 @@ | |||
285 | 1070 | } | 1082 | } |
286 | 1071 | 1083 | ||
287 | 1072 | func (s *loopSuite) TestLoopNotifications(c *C) { | 1084 | func (s *loopSuite) TestLoopNotifications(c *C) { |
289 | 1073 | c.Check(s.sess.State(), Equals, Running) | 1085 | s.waitUntilRunning(c) |
290 | 1074 | 1086 | ||
291 | 1075 | n1 := protocol.Notification{ | 1087 | n1 := protocol.Notification{ |
292 | 1076 | AppId: "app1", | 1088 | AppId: "app1", |
293 | @@ -1090,7 +1102,7 @@ | |||
294 | 1090 | } | 1102 | } |
295 | 1091 | 1103 | ||
296 | 1092 | func (s *loopSuite) TestLoopSetParams(c *C) { | 1104 | func (s *loopSuite) TestLoopSetParams(c *C) { |
298 | 1093 | c.Check(s.sess.State(), Equals, Running) | 1105 | s.waitUntilRunning(c) |
299 | 1094 | setParams := protocol.SetParamsMsg{ | 1106 | setParams := protocol.SetParamsMsg{ |
300 | 1095 | Type: "setparams", | 1107 | Type: "setparams", |
301 | 1096 | SetCookie: "COOKIE", | 1108 | SetCookie: "COOKIE", |
302 | @@ -1104,7 +1116,7 @@ | |||
303 | 1104 | } | 1116 | } |
304 | 1105 | 1117 | ||
305 | 1106 | func (s *loopSuite) TestLoopConnBroken(c *C) { | 1118 | func (s *loopSuite) TestLoopConnBroken(c *C) { |
307 | 1107 | c.Check(s.sess.State(), Equals, Running) | 1119 | s.waitUntilRunning(c) |
308 | 1108 | broken := protocol.ConnBrokenMsg{ | 1120 | broken := protocol.ConnBrokenMsg{ |
309 | 1109 | Type: "connbroken", | 1121 | Type: "connbroken", |
310 | 1110 | Reason: "REASON", | 1122 | Reason: "REASON", |
311 | @@ -1126,7 +1138,7 @@ | |||
312 | 1126 | failure := errors.New("warn") | 1138 | failure := errors.New("warn") |
313 | 1127 | log := s.sess.Log.(*helpers.TestLogger) | 1139 | log := s.sess.Log.(*helpers.TestLogger) |
314 | 1128 | 1140 | ||
316 | 1129 | c.Check(s.sess.State(), Equals, Running) | 1141 | s.waitUntilRunning(c) |
317 | 1130 | c.Check(takeNext(s.downCh), Equals, "deadline 1ms") | 1142 | c.Check(takeNext(s.downCh), Equals, "deadline 1ms") |
318 | 1131 | log.ResetCapture() | 1143 | log.ResetCapture() |
319 | 1132 | s.upCh <- warn | 1144 | s.upCh <- warn |
320 | 1133 | 1145 | ||
321 | === modified file 'config/config_test.go' | |||
322 | --- config/config_test.go 2014-05-16 15:37:24 +0000 | |||
323 | +++ config/config_test.go 2015-11-20 14:56:43 +0000 | |||
324 | @@ -344,7 +344,7 @@ | |||
325 | 344 | "d": json.RawMessage(`"2s"`), | 344 | "d": json.RawMessage(`"2s"`), |
326 | 345 | } | 345 | } |
327 | 346 | readUsingFlags(p, reflect.ValueOf(&cfg)) | 346 | readUsingFlags(p, reflect.ValueOf(&cfg)) |
329 | 347 | c.Check(buf.String(), Matches, `(?s).*-cfg@=<config.json>: get config values from file\n.*-d="2s": duration.*`) | 347 | c.Check(buf.String(), Matches, `(?s).*get config values from file.*duration.*`) |
330 | 348 | } | 348 | } |
331 | 349 | 349 | ||
332 | 350 | func (s *configFlagsSuite) TestReadUsingFlagsAlreadyParsed(c *C) { | 350 | func (s *configFlagsSuite) TestReadUsingFlagsAlreadyParsed(c *C) { |
333 | 351 | 351 | ||
334 | === modified file 'debian/rules' | |||
335 | --- debian/rules 2015-08-14 13:03:23 +0000 | |||
336 | +++ debian/rules 2015-11-20 14:56:43 +0000 | |||
337 | @@ -8,12 +8,6 @@ | |||
338 | 8 | dh_auto_build --buildsystem=golang | 8 | dh_auto_build --buildsystem=golang |
339 | 9 | (cd signing-helper && cmake . && make) | 9 | (cd signing-helper && cmake . && make) |
340 | 10 | 10 | ||
341 | 11 | # overriding dh_auto_test because the http13client tests don't all pass on go < 1.3 | ||
342 | 12 | # (should go away once we ship go 1.3) | ||
343 | 13 | override_dh_auto_test: | ||
344 | 14 | cd $$( find ./ -type d -regex '\./[^/]*/src/launchpad.net' -printf "%h\n" | head -n1) && \ | ||
345 | 15 | env GOPATH=$$(cd ..; pwd) go test -v $$(env GOPATH=$$(cd ..; pwd) go list $(DH_GOPKG)/... | grep -v acceptance | grep -v http13client ) | ||
346 | 16 | |||
347 | 17 | override_dh_install: | 11 | override_dh_install: |
348 | 18 | dh_install -Xusr/bin/cmd --fail-missing | 12 | dh_install -Xusr/bin/cmd --fail-missing |
349 | 19 | 13 | ||
350 | 20 | 14 | ||
351 | === modified file 'dependencies.tsv' | |||
352 | --- dependencies.tsv 2015-03-19 14:35:51 +0000 | |||
353 | +++ dependencies.tsv 2015-11-20 14:56:43 +0000 | |||
354 | @@ -1,5 +1,5 @@ | |||
356 | 1 | code.google.com/p/go-uuid hg 7dda39b2e7d5e265014674c5af696ba4186679e9 11 | 1 | code.google.com/p/go-uuid hg 35bc42037350f0078e3c974c6ea690f1926603ab 14 |
357 | 2 | code.google.com/p/gosqlite hg 74691fb6f83716190870cde1b658538dd4b18eb0 15 | 2 | code.google.com/p/gosqlite hg 74691fb6f83716190870cde1b658538dd4b18eb0 15 |
359 | 3 | launchpad.net/go-dbus/v1 bzr jlenton@gmail.com-20141023032446-s5icvsucwlv5o38a 129 | 3 | launchpad.net/go-dbus/v1 bzr jlenton@gmail.com-20150203130125-kqqbam1jsp3tmlk5 136 |
360 | 4 | launchpad.net/go-xdg/v0 bzr john.lenton@canonical.com-20140208094800-gubd5md7cro3mtxa 10 | 4 | launchpad.net/go-xdg/v0 bzr john.lenton@canonical.com-20140208094800-gubd5md7cro3mtxa 10 |
361 | 5 | launchpad.net/gocheck bzr gustavo@niemeyer.net-20140225173054-xu9zlkf9kxhvow02 87 | 5 | launchpad.net/gocheck bzr gustavo@niemeyer.net-20140225173054-xu9zlkf9kxhvow02 87 |
362 | 6 | 6 | ||
363 | === modified file 'http13client/z_last_test.go' | |||
364 | --- http13client/z_last_test.go 2014-03-19 20:20:19 +0000 | |||
365 | +++ http13client/z_last_test.go 2015-11-20 14:56:43 +0000 | |||
366 | @@ -5,7 +5,7 @@ | |||
367 | 5 | package http_test | 5 | package http_test |
368 | 6 | 6 | ||
369 | 7 | import ( | 7 | import ( |
371 | 8 | "launchpad.net/ubuntu-push/http13client" | 8 | "net/http" |
372 | 9 | "runtime" | 9 | "runtime" |
373 | 10 | "sort" | 10 | "sort" |
374 | 11 | "strings" | 11 | "strings" |
375 | @@ -26,6 +26,7 @@ | |||
376 | 26 | strings.Contains(stack, "created by net.startServer") || | 26 | strings.Contains(stack, "created by net.startServer") || |
377 | 27 | strings.Contains(stack, "created by testing.RunTests") || | 27 | strings.Contains(stack, "created by testing.RunTests") || |
378 | 28 | strings.Contains(stack, "closeWriteAndWait") || | 28 | strings.Contains(stack, "closeWriteAndWait") || |
379 | 29 | strings.Contains(stack, "main.main(") || | ||
380 | 29 | strings.Contains(stack, "testing.Main(") || | 30 | strings.Contains(stack, "testing.Main(") || |
381 | 30 | // These only show up with GOTRACEBACK=2; Issue 5005 (comment 28) | 31 | // These only show up with GOTRACEBACK=2; Issue 5005 (comment 28) |
382 | 31 | strings.Contains(stack, "runtime.goexit") || | 32 | strings.Contains(stack, "runtime.goexit") || |
383 | 32 | 33 | ||
384 | === modified file 'identifier/testing/testing_test.go' | |||
385 | --- identifier/testing/testing_test.go 2014-08-04 20:40:50 +0000 | |||
386 | +++ identifier/testing/testing_test.go 2015-11-20 14:56:43 +0000 | |||
387 | @@ -17,9 +17,10 @@ | |||
388 | 17 | package testing | 17 | package testing |
389 | 18 | 18 | ||
390 | 19 | import ( | 19 | import ( |
392 | 20 | identifier ".." | 20 | "testing" |
393 | 21 | |||
394 | 21 | . "launchpad.net/gocheck" | 22 | . "launchpad.net/gocheck" |
396 | 22 | "testing" | 23 | "launchpad.net/ubuntu-push/identifier" |
397 | 23 | ) | 24 | ) |
398 | 24 | 25 | ||
399 | 25 | // hook up gocheck | 26 | // hook up gocheck |
400 | 26 | 27 | ||
401 | === modified file 'launch_helper/cual/cual_c.go' | |||
402 | --- launch_helper/cual/cual_c.go 2014-07-17 15:46:19 +0000 | |||
403 | +++ launch_helper/cual/cual_c.go 2015-11-20 14:56:43 +0000 | |||
404 | @@ -24,6 +24,8 @@ | |||
405 | 24 | 24 | ||
406 | 25 | #define HELPER_ERROR g_quark_from_static_string ("cgo-ual-helper-error-quark") | 25 | #define HELPER_ERROR g_quark_from_static_string ("cgo-ual-helper-error-quark") |
407 | 26 | 26 | ||
408 | 27 | void helperDone(gpointer gp, const gchar * ciid); | ||
409 | 28 | |||
410 | 27 | static void observer_of_stop (const gchar * app_id, const gchar * instance_id, const gchar * helper_type, gpointer user_data) { | 29 | static void observer_of_stop (const gchar * app_id, const gchar * instance_id, const gchar * helper_type, gpointer user_data) { |
411 | 28 | helperDone (user_data, instance_id); | 30 | helperDone (user_data, instance_id); |
412 | 29 | } | 31 | } |
413 | 30 | 32 | ||
414 | === modified file 'launch_helper/kindpool.go' | |||
415 | --- launch_helper/kindpool.go 2015-08-21 19:53:23 +0000 | |||
416 | +++ launch_helper/kindpool.go 2015-11-20 14:56:43 +0000 | |||
417 | @@ -26,7 +26,7 @@ | |||
418 | 26 | "sync" | 26 | "sync" |
419 | 27 | "time" | 27 | "time" |
420 | 28 | 28 | ||
422 | 29 | "launchpad.net/go-xdg/v0" | 29 | xdg "launchpad.net/go-xdg/v0" |
423 | 30 | 30 | ||
424 | 31 | "launchpad.net/ubuntu-push/click" | 31 | "launchpad.net/ubuntu-push/click" |
425 | 32 | "launchpad.net/ubuntu-push/launch_helper/cual" | 32 | "launchpad.net/ubuntu-push/launch_helper/cual" |
426 | 33 | 33 | ||
427 | === modified file 'launch_helper/kindpool_test.go' | |||
428 | --- launch_helper/kindpool_test.go 2015-08-21 19:53:23 +0000 | |||
429 | +++ launch_helper/kindpool_test.go 2015-11-20 14:56:43 +0000 | |||
430 | @@ -24,7 +24,7 @@ | |||
431 | 24 | "path/filepath" | 24 | "path/filepath" |
432 | 25 | "time" | 25 | "time" |
433 | 26 | 26 | ||
435 | 27 | "launchpad.net/go-xdg/v0" | 27 | xdg "launchpad.net/go-xdg/v0" |
436 | 28 | . "launchpad.net/gocheck" | 28 | . "launchpad.net/gocheck" |
437 | 29 | 29 | ||
438 | 30 | "launchpad.net/ubuntu-push/click" | 30 | "launchpad.net/ubuntu-push/click" |
439 | 31 | 31 | ||
440 | === modified file 'messaging/cmessaging/cmessaging_c.go' | |||
441 | --- messaging/cmessaging/cmessaging_c.go 2014-07-24 10:33:28 +0000 | |||
442 | +++ messaging/cmessaging/cmessaging_c.go 2015-11-20 14:56:43 +0000 | |||
443 | @@ -21,6 +21,8 @@ | |||
444 | 21 | 21 | ||
445 | 22 | // this is a .go file instead of a .c file because of dh-golang limitations | 22 | // this is a .go file instead of a .c file because of dh-golang limitations |
446 | 23 | 23 | ||
447 | 24 | void handleActivate(gchar* c_action, const gchar * c_notification , gpointer obj); | ||
448 | 25 | |||
449 | 24 | static void activate_cb(MessagingMenuMessage* msg, gchar* action, GVariant* parameter, gpointer obj) { | 26 | static void activate_cb(MessagingMenuMessage* msg, gchar* action, GVariant* parameter, gpointer obj) { |
450 | 25 | handleActivate(action, messaging_menu_message_get_id(msg), obj); | 27 | handleActivate(action, messaging_menu_message_get_id(msg), obj); |
451 | 26 | } | 28 | } |
452 | 27 | 29 | ||
453 | === modified file 'scripts/connect-many.py' | |||
454 | --- scripts/connect-many.py 2014-08-04 14:47:00 +0000 | |||
455 | +++ scripts/connect-many.py 2015-11-20 14:56:43 +0000 | |||
456 | @@ -16,7 +16,7 @@ | |||
457 | 16 | try: | 16 | try: |
458 | 17 | for i in range(soft+100): | 17 | for i in range(soft+100): |
459 | 18 | s=socket.socket() | 18 | s=socket.socket() |
461 | 19 | w = ssl.wrap_socket(s) | 19 | w = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1) |
462 | 20 | w.settimeout(1) | 20 | w.settimeout(1) |
463 | 21 | w.connect(addr) | 21 | w.connect(addr) |
464 | 22 | conns.append(w) | 22 | conns.append(w) |
465 | 23 | 23 | ||
466 | === modified file 'signing-helper/CMakeLists.txt' | |||
467 | --- signing-helper/CMakeLists.txt 2014-04-30 17:34:57 +0000 | |||
468 | +++ signing-helper/CMakeLists.txt 2015-11-20 14:56:43 +0000 | |||
469 | @@ -13,8 +13,8 @@ | |||
470 | 13 | SET (CMAKE_AUTOMOC ON) | 13 | SET (CMAKE_AUTOMOC ON) |
471 | 14 | find_package(Qt5Core REQUIRED) | 14 | find_package(Qt5Core REQUIRED) |
472 | 15 | 15 | ||
475 | 16 | FILE (GLOB SIGNING_SOURCES signing*.cpp) | 16 | SET (SIGNING_SOURCES signing-helper.cpp) |
476 | 17 | FILE (GLOB SIGNING_HEADERS signing*.h) | 17 | SET (SIGNING_HEADERS signing.h) |
477 | 18 | 18 | ||
478 | 19 | add_executable (${SIGNING_EXE} | 19 | add_executable (${SIGNING_EXE} |
479 | 20 | ${SIGNING_SOURCES} | 20 | ${SIGNING_SOURCES} |
480 | 21 | 21 | ||
481 | === modified file 'urldispatcher/curldispatcher/curldispatcher_c.go' | |||
482 | --- urldispatcher/curldispatcher/curldispatcher_c.go 2014-08-29 16:36:30 +0000 | |||
483 | +++ urldispatcher/curldispatcher/curldispatcher_c.go 2015-11-20 14:56:43 +0000 | |||
484 | @@ -23,6 +23,8 @@ | |||
485 | 23 | #include <liburl-dispatcher-1/url-dispatcher.h> | 23 | #include <liburl-dispatcher-1/url-dispatcher.h> |
486 | 24 | #include <glib.h> | 24 | #include <glib.h> |
487 | 25 | 25 | ||
488 | 26 | char* handleDispatchURLResult(const gchar * url, gboolean success, gpointer user_data); | ||
489 | 27 | |||
490 | 26 | static void url_dispatch_callback(const gchar * url, gboolean success, gpointer user_data) { | 28 | static void url_dispatch_callback(const gchar * url, gboolean success, gpointer user_data) { |
491 | 27 | handleDispatchURLResult(url, success, user_data); | 29 | handleDispatchURLResult(url, success, user_data); |
492 | 28 | } | 30 | } |
put some comment, quite sure the Makefile change won't help when building in the builders