1 |
commit: 7455a74803721727671c69e21c3287d9efd8bd1c |
2 |
Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 15 18:30:08 2018 +0000 |
4 |
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 15 18:30:08 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7455a748 |
7 |
|
8 |
dev-embedded/arduino-builder: skip broken tests |
9 |
|
10 |
Some tests require network and fail within a network sandbox. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/668528 |
13 |
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org> |
14 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
15 |
|
16 |
.../arduino-builder/arduino-builder-1.3.25.ebuild | 3 +- |
17 |
.../arduino-builder/arduino-builder-1.4.1.ebuild | 5 +- |
18 |
.../files/arduino-builder-1.3.25-skip-tests.patch | 109 +++++++++++++++++ |
19 |
.../files/arduino-builder-1.4.1-skip-tests.patch | 129 +++++++++++++++++++++ |
20 |
4 files changed, 244 insertions(+), 2 deletions(-) |
21 |
|
22 |
diff --git a/dev-embedded/arduino-builder/arduino-builder-1.3.25.ebuild b/dev-embedded/arduino-builder/arduino-builder-1.3.25.ebuild |
23 |
index 0930e5240c0..4ffdc5d8fdc 100644 |
24 |
--- a/dev-embedded/arduino-builder/arduino-builder-1.3.25.ebuild |
25 |
+++ b/dev-embedded/arduino-builder/arduino-builder-1.3.25.ebuild |
26 |
@@ -1,4 +1,4 @@ |
27 |
-# Copyright 1999-2018 Gentoo Foundation |
28 |
+# Copyright 1999-2018 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
EAPI=6 |
32 |
@@ -48,6 +48,7 @@ src_prepare() { |
33 |
|
34 |
# path paths so that they point to system ctags and avrdude |
35 |
eapply "${FILESDIR}/arduino-builder-1.3.25-platform-paths.patch" |
36 |
+ eapply "${FILESDIR}/arduino-builder-1.3.25-skip-tests.patch" |
37 |
|
38 |
default |
39 |
} |
40 |
|
41 |
diff --git a/dev-embedded/arduino-builder/arduino-builder-1.4.1.ebuild b/dev-embedded/arduino-builder/arduino-builder-1.4.1.ebuild |
42 |
index c9c446bec65..078347f5234 100644 |
43 |
--- a/dev-embedded/arduino-builder/arduino-builder-1.4.1.ebuild |
44 |
+++ b/dev-embedded/arduino-builder/arduino-builder-1.4.1.ebuild |
45 |
@@ -36,7 +36,10 @@ DEPEND=">=dev-lang/go-1.9.2 |
46 |
dev-go/go-net |
47 |
dev-go/go-text" |
48 |
|
49 |
-PATCHES=("${FILESDIR}/arduino-builder-1.4.1-platform-paths.patch") |
50 |
+PATCHES=( |
51 |
+ "${FILESDIR}/arduino-builder-1.4.1-platform-paths.patch" |
52 |
+ "${FILESDIR}/arduino-builder-1.4.1-skip-tests.patch" |
53 |
+) |
54 |
|
55 |
src_unpack() { |
56 |
golang-vcs-snapshot_src_unpack |
57 |
|
58 |
diff --git a/dev-embedded/arduino-builder/files/arduino-builder-1.3.25-skip-tests.patch b/dev-embedded/arduino-builder/files/arduino-builder-1.3.25-skip-tests.patch |
59 |
new file mode 100644 |
60 |
index 00000000000..4ed170061c1 |
61 |
--- /dev/null |
62 |
+++ b/dev-embedded/arduino-builder/files/arduino-builder-1.3.25-skip-tests.patch |
63 |
@@ -0,0 +1,109 @@ |
64 |
+Skip tests that can't run on Gentoo because of the network sandbox |
65 |
+diff --git a/src/arduino.cc/builder/test/hardware_loader_test.go b/src/arduino.cc/builder/test/hardware_loader_test.go |
66 |
+index c9ea1d5..e7c68d2 100644 |
67 |
+--- a/src/arduino.cc/arduino-builder/src/arduino.cc/builder/test/hardware_loader_test.go |
68 |
++++ b/src/arduino.cc/arduino-builder/src/arduino.cc/builder/test/hardware_loader_test.go |
69 |
+@@ -41,6 +41,7 @@ import ( |
70 |
+ ) |
71 |
+ |
72 |
+ func TestLoadHardware(t *testing.T) { |
73 |
++ t.Skip("Can't run on Gentoo") |
74 |
+ ctx := &types.Context{ |
75 |
+ HardwareFolders: []string{"downloaded_hardware", filepath.Join("..", "hardware"), "hardware"}, |
76 |
+ } |
77 |
+@@ -85,6 +86,7 @@ func TestLoadHardware(t *testing.T) { |
78 |
+ } |
79 |
+ |
80 |
+ func TestLoadHardwareMixingUserHardwareFolder(t *testing.T) { |
81 |
++ t.Skip("Can't run on Gentoo") |
82 |
+ ctx := &types.Context{ |
83 |
+ HardwareFolders: []string{"downloaded_hardware", filepath.Join("..", "hardware"), "hardware", "user_hardware"}, |
84 |
+ } |
85 |
+@@ -155,6 +157,7 @@ func TestLoadHardwareMixingUserHardwareFolder(t *testing.T) { |
86 |
+ } |
87 |
+ |
88 |
+ func TestLoadHardwareWithBoardManagerFolderStructure(t *testing.T) { |
89 |
++ t.Skip("Can't run on Gentoo") |
90 |
+ ctx := &types.Context{ |
91 |
+ HardwareFolders: []string{"downloaded_board_manager_stuff"}, |
92 |
+ } |
93 |
+@@ -203,6 +206,7 @@ func TestLoadHardwareWithBoardManagerFolderStructure(t *testing.T) { |
94 |
+ } |
95 |
+ |
96 |
+ func TestLoadLotsOfHardware(t *testing.T) { |
97 |
++ t.Skip("Can't run on Gentoo") |
98 |
+ ctx := &types.Context{ |
99 |
+ HardwareFolders: []string{"downloaded_board_manager_stuff", "downloaded_hardware", filepath.Join("..", "hardware"), "hardware", "user_hardware"}, |
100 |
+ } |
101 |
+diff --git a/src/arduino.cc/builder/test/helper_tools_downloader.go b/src/arduino.cc/builder/test/helper_tools_downloader.go |
102 |
+index 3642510..e6391b6 100644 |
103 |
+--- a/src/arduino.cc/arduino-builder/src/arduino.cc/builder/test/helper_tools_downloader.go |
104 |
++++ b/src/arduino.cc/arduino-builder/src/arduino.cc/builder/test/helper_tools_downloader.go |
105 |
+@@ -83,6 +83,7 @@ type Core struct { |
106 |
+ } |
107 |
+ |
108 |
+ func DownloadCoresAndToolsAndLibraries(t *testing.T) { |
109 |
++ t.Skip("Gentoo skips tests requiring network"); |
110 |
+ cores := []Core{ |
111 |
+ Core{Maintainer: "arduino", Arch: "avr", Version: "1.6.10"}, |
112 |
+ Core{Maintainer: "arduino", Arch: "sam", Version: "1.6.7"}, |
113 |
+@@ -165,6 +166,7 @@ func patchFiles(t *testing.T) { |
114 |
+ } |
115 |
+ |
116 |
+ func download(t *testing.T, cores, boardsManagerCores, boardsManagerRedBearCores []Core, tools, toolsMultipleVersions, boardsManagerTools, boardsManagerRFduinoTools []Tool, libraries []Library) { |
117 |
++ t.Skip("Gentoo skips tests requiring network"); |
118 |
+ allCoresDownloaded, err := allCoresAlreadyDownloadedAndUnpacked(HARDWARE_FOLDER, cores) |
119 |
+ NoError(t, err) |
120 |
+ if allCoresDownloaded && |
121 |
+diff --git a/src/arduino.cc/builder/test/target_board_resolver_test.go b/src/arduino.cc/builder/test/target_board_resolver_test.go |
122 |
+index 274eb92..d6973e3 100644 |
123 |
+--- a/src/arduino.cc/arduino-builder/src/arduino.cc/builder/test/target_board_resolver_test.go |
124 |
++++ b/src/arduino.cc/arduino-builder/src/arduino.cc/builder/test/target_board_resolver_test.go |
125 |
+@@ -39,6 +39,7 @@ import ( |
126 |
+ ) |
127 |
+ |
128 |
+ func TestTargetBoardResolverUno(t *testing.T) { |
129 |
++ t.Skip("Can't run on Gentoo") |
130 |
+ ctx := &types.Context{ |
131 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
132 |
+ FQBN: "arduino:avr:uno", |
133 |
+@@ -64,6 +65,7 @@ func TestTargetBoardResolverUno(t *testing.T) { |
134 |
+ } |
135 |
+ |
136 |
+ func TestTargetBoardResolverDue(t *testing.T) { |
137 |
++ t.Skip("Can't run on Gentoo") |
138 |
+ ctx := &types.Context{ |
139 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
140 |
+ FQBN: "arduino:sam:arduino_due_x", |
141 |
+@@ -89,6 +91,7 @@ func TestTargetBoardResolverDue(t *testing.T) { |
142 |
+ } |
143 |
+ |
144 |
+ func TestTargetBoardResolverMega1280(t *testing.T) { |
145 |
++ t.Skip("Can't run on Gentoo") |
146 |
+ ctx := &types.Context{ |
147 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
148 |
+ FQBN: "arduino:avr:mega:cpu=atmega1280", |
149 |
+@@ -115,6 +118,7 @@ func TestTargetBoardResolverMega1280(t *testing.T) { |
150 |
+ } |
151 |
+ |
152 |
+ func TestTargetBoardResolverMega2560(t *testing.T) { |
153 |
++ t.Skip("Can't run on Gentoo") |
154 |
+ ctx := &types.Context{ |
155 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
156 |
+ FQBN: "arduino:avr:mega:cpu=atmega2560", |
157 |
+@@ -141,6 +145,7 @@ func TestTargetBoardResolverMega2560(t *testing.T) { |
158 |
+ } |
159 |
+ |
160 |
+ func TestTargetBoardResolverCustomYun(t *testing.T) { |
161 |
++ t.Skip("Can't run on Gentoo") |
162 |
+ ctx := &types.Context{ |
163 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"}, |
164 |
+ FQBN: "my_avr_platform:avr:custom_yun", |
165 |
+@@ -167,6 +172,7 @@ func TestTargetBoardResolverCustomYun(t *testing.T) { |
166 |
+ } |
167 |
+ |
168 |
+ func TestTargetBoardResolverCustomCore(t *testing.T) { |
169 |
++ t.Skip("Can't run on Gentoo") |
170 |
+ ctx := &types.Context{ |
171 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"}, |
172 |
+ FQBN: "watterott:avr:attiny841:core=spencekonde,info=info", |
173 |
|
174 |
diff --git a/dev-embedded/arduino-builder/files/arduino-builder-1.4.1-skip-tests.patch b/dev-embedded/arduino-builder/files/arduino-builder-1.4.1-skip-tests.patch |
175 |
new file mode 100644 |
176 |
index 00000000000..f66e829e4b0 |
177 |
--- /dev/null |
178 |
+++ b/dev-embedded/arduino-builder/files/arduino-builder-1.4.1-skip-tests.patch |
179 |
@@ -0,0 +1,129 @@ |
180 |
+Skip tests that can't run on Gentoo because of the network sandbox |
181 |
+diff --git a/test/hardware_loader_test.go b/test/hardware_loader_test.go |
182 |
+index 147396e..da6c8ef 100644 |
183 |
+--- a/src/github.com/arduino/arduino-builder/test/hardware_loader_test.go |
184 |
++++ b/src/github.com/arduino/arduino-builder/test/hardware_loader_test.go |
185 |
+@@ -41,6 +41,7 @@ import ( |
186 |
+ ) |
187 |
+ |
188 |
+ func TestLoadHardware(t *testing.T) { |
189 |
++ t.Skip("Can't run on Gentoo") |
190 |
+ ctx := &types.Context{ |
191 |
+ HardwareFolders: []string{"downloaded_hardware", filepath.Join("..", "hardware"), "hardware"}, |
192 |
+ } |
193 |
+@@ -85,6 +86,7 @@ func TestLoadHardware(t *testing.T) { |
194 |
+ } |
195 |
+ |
196 |
+ func TestLoadHardwareMixingUserHardwareFolder(t *testing.T) { |
197 |
++ t.Skip("Can't run on Gentoo") |
198 |
+ ctx := &types.Context{ |
199 |
+ HardwareFolders: []string{"downloaded_hardware", filepath.Join("..", "hardware"), "hardware", "user_hardware"}, |
200 |
+ } |
201 |
+@@ -155,6 +157,7 @@ func TestLoadHardwareMixingUserHardwareFolder(t *testing.T) { |
202 |
+ } |
203 |
+ |
204 |
+ func TestLoadHardwareWithBoardManagerFolderStructure(t *testing.T) { |
205 |
++ t.Skip("Can't run on Gentoo") |
206 |
+ ctx := &types.Context{ |
207 |
+ HardwareFolders: []string{"downloaded_board_manager_stuff"}, |
208 |
+ } |
209 |
+@@ -203,6 +206,7 @@ func TestLoadHardwareWithBoardManagerFolderStructure(t *testing.T) { |
210 |
+ } |
211 |
+ |
212 |
+ func TestLoadLotsOfHardware(t *testing.T) { |
213 |
++ t.Skip("Can't run on Gentoo") |
214 |
+ ctx := &types.Context{ |
215 |
+ HardwareFolders: []string{"downloaded_board_manager_stuff", "downloaded_hardware", filepath.Join("..", "hardware"), "hardware", "user_hardware"}, |
216 |
+ } |
217 |
+diff --git a/test/helper_tools_downloader.go b/test/helper_tools_downloader.go |
218 |
+index 49aa847..ba77a57 100644 |
219 |
+--- a/src/github.com/arduino/arduino-builder/test/helper_tools_downloader.go |
220 |
++++ b/src/github.com/arduino/arduino-builder/test/helper_tools_downloader.go |
221 |
+@@ -83,6 +83,7 @@ type Core struct { |
222 |
+ } |
223 |
+ |
224 |
+ func DownloadCoresAndToolsAndLibraries(t *testing.T) { |
225 |
++ t.Skip("Gentoo skips tests requiring network"); |
226 |
+ cores := []Core{ |
227 |
+ Core{Maintainer: "arduino", Arch: "avr", Version: "1.6.10"}, |
228 |
+ Core{Maintainer: "arduino", Arch: "sam", Version: "1.6.7"}, |
229 |
+@@ -177,6 +178,7 @@ func patchFiles(t *testing.T) { |
230 |
+ } |
231 |
+ |
232 |
+ func download(t *testing.T, cores, boardsManagerCores, boardsManagerRedBearCores []Core, tools, toolsMultipleVersions, boardsManagerTools, boardsManagerRFduinoTools []Tool, libraries []Library) { |
233 |
++ t.Skip("Gentoo skips tests requiring network"); |
234 |
+ allCoresDownloaded, err := allCoresAlreadyDownloadedAndUnpacked(HARDWARE_FOLDER, cores) |
235 |
+ NoError(t, err) |
236 |
+ if allCoresDownloaded && |
237 |
+diff --git a/test/target_board_resolver_test.go b/test/target_board_resolver_test.go |
238 |
+index 49e0abe..7a50fe1 100644 |
239 |
+--- a/src/github.com/arduino/arduino-builder/test/target_board_resolver_test.go |
240 |
++++ b/src/github.com/arduino/arduino-builder/test/target_board_resolver_test.go |
241 |
+@@ -39,6 +39,7 @@ import ( |
242 |
+ ) |
243 |
+ |
244 |
+ func TestTargetBoardResolverUno(t *testing.T) { |
245 |
++ t.Skip("Can't run on Gentoo") |
246 |
+ ctx := &types.Context{ |
247 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
248 |
+ FQBN: "arduino:avr:uno", |
249 |
+@@ -64,6 +65,7 @@ func TestTargetBoardResolverUno(t *testing.T) { |
250 |
+ } |
251 |
+ |
252 |
+ func TestTargetBoardResolverDue(t *testing.T) { |
253 |
++ t.Skip("Can't run on Gentoo") |
254 |
+ ctx := &types.Context{ |
255 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
256 |
+ FQBN: "arduino:sam:arduino_due_x", |
257 |
+@@ -89,6 +91,7 @@ func TestTargetBoardResolverDue(t *testing.T) { |
258 |
+ } |
259 |
+ |
260 |
+ func TestTargetBoardResolverMega1280(t *testing.T) { |
261 |
++ t.Skip("Can't run on Gentoo") |
262 |
+ ctx := &types.Context{ |
263 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
264 |
+ FQBN: "arduino:avr:mega:cpu=atmega1280", |
265 |
+@@ -115,6 +118,7 @@ func TestTargetBoardResolverMega1280(t *testing.T) { |
266 |
+ } |
267 |
+ |
268 |
+ func TestTargetBoardResolverMega2560(t *testing.T) { |
269 |
++ t.Skip("Can't run on Gentoo") |
270 |
+ ctx := &types.Context{ |
271 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}, |
272 |
+ FQBN: "arduino:avr:mega:cpu=atmega2560", |
273 |
+@@ -141,6 +145,7 @@ func TestTargetBoardResolverMega2560(t *testing.T) { |
274 |
+ } |
275 |
+ |
276 |
+ func TestTargetBoardResolverCustomYun(t *testing.T) { |
277 |
++ t.Skip("Can't run on Gentoo") |
278 |
+ ctx := &types.Context{ |
279 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"}, |
280 |
+ FQBN: "my_avr_platform:avr:custom_yun", |
281 |
+@@ -167,6 +172,7 @@ func TestTargetBoardResolverCustomYun(t *testing.T) { |
282 |
+ } |
283 |
+ |
284 |
+ func TestTargetBoardResolverCustomCore(t *testing.T) { |
285 |
++ t.Skip("Can't run on Gentoo") |
286 |
+ ctx := &types.Context{ |
287 |
+ HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"}, |
288 |
+ FQBN: "watterott:avr:attiny841:core=spencekonde,info=info", |
289 |
+diff --git a/test/wipeout_build_path_if_build_options_changed_test.go b/test/wipeout_build_path_if_build_options_changed_test.go |
290 |
+index 51bfe80..8501fb6 100644 |
291 |
+--- a/src/github.com/arduino/arduino-builder/test/wipeout_build_path_if_build_options_changed_test.go |
292 |
++++ b/src/github.com/arduino/arduino-builder/test/wipeout_build_path_if_build_options_changed_test.go |
293 |
+@@ -42,6 +42,7 @@ import ( |
294 |
+ ) |
295 |
+ |
296 |
+ func TestWipeoutBuildPathIfBuildOptionsChanged(t *testing.T) { |
297 |
++ t.Skip("Can't run in Gentoo") |
298 |
+ ctx := &types.Context{} |
299 |
+ |
300 |
+ buildPath := SetupBuildPath(t, ctx) |
301 |
+@@ -73,6 +74,7 @@ func TestWipeoutBuildPathIfBuildOptionsChanged(t *testing.T) { |
302 |
+ } |
303 |
+ |
304 |
+ func TestWipeoutBuildPathIfBuildOptionsChangedNoPreviousBuildOptions(t *testing.T) { |
305 |
++ t.Skip("Can't run in Gentoo") |
306 |
+ ctx := &types.Context{} |
307 |
+ |
308 |
+ buildPath := SetupBuildPath(t, ctx) |