|
16 | 16 | import os |
17 | 17 |
|
18 | 18 | from platformio.commands.boards import cli as cmd_boards |
19 | | -from platformio.package.commands.exec import package_exec_cmd |
20 | 19 | from platformio.project.commands.init import project_init_cmd |
21 | 20 | from platformio.project.config import ProjectConfig |
22 | 21 | from platformio.project.exception import ProjectEnvsNotAvailableError |
@@ -216,82 +215,3 @@ def test_init_incorrect_board(clirunner): |
216 | 215 | assert result.exit_code == 2 |
217 | 216 | assert "Error: Invalid value for" in result.output |
218 | 217 | assert isinstance(result.exception, SystemExit) |
219 | | - |
220 | | - |
221 | | -def test_init_ide_clion(clirunner, validate_cliresult, tmpdir): |
222 | | - project_dir = tmpdir.join("project").mkdir() |
223 | | - # Add extra libraries to cover cases with possible unwanted backslashes |
224 | | - lib_extra_dirs = tmpdir.join("extra_libs").mkdir() |
225 | | - extra_lib = lib_extra_dirs.join("extra_lib").mkdir() |
226 | | - extra_lib.join("extra_lib.h").write(" ") |
227 | | - extra_lib.join("extra_lib.cpp").write(" ") |
228 | | - |
229 | | - with project_dir.as_cwd(): |
230 | | - result = clirunner.invoke( |
231 | | - project_init_cmd, |
232 | | - [ |
233 | | - "-b", |
234 | | - "uno", |
235 | | - "--ide", |
236 | | - "clion", |
237 | | - "--project-option", |
238 | | - "framework=arduino", |
239 | | - "--project-option", |
240 | | - "platform_packages=platformio/tool-ninja", |
241 | | - "--project-option", |
242 | | - "lib_extra_dirs=%s" % str(lib_extra_dirs), |
243 | | - ], |
244 | | - ) |
245 | | - |
246 | | - validate_cliresult(result) |
247 | | - assert all( |
248 | | - os.path.isfile(f) for f in ("CMakeLists.txt", "CMakeListsPrivate.txt") |
249 | | - ) |
250 | | - |
251 | | - project_dir.join("src").join("main.cpp").write( |
252 | | - """#include <Arduino.h> |
253 | | -#include "extra_lib.h" |
254 | | -void setup(){} |
255 | | -void loop(){} |
256 | | -""" |
257 | | - ) |
258 | | - project_dir.join("build_dir").mkdir() |
259 | | - result = clirunner.invoke( |
260 | | - package_exec_cmd, |
261 | | - [ |
262 | | - "-p", |
263 | | - "tool-cmake", |
264 | | - "--", |
265 | | - "cmake", |
266 | | - "-DCMAKE_BUILD_TYPE=uno", |
267 | | - "-DCMAKE_MAKE_PROGRAM=%s" |
268 | | - % os.path.join( |
269 | | - ProjectConfig().get("platformio", "packages_dir"), |
270 | | - "tool-ninja", |
271 | | - "ninja", |
272 | | - ), |
273 | | - "-G", |
274 | | - "Ninja", |
275 | | - "-S", |
276 | | - str(project_dir), |
277 | | - "-B", |
278 | | - "build_dir", |
279 | | - ], |
280 | | - ) |
281 | | - validate_cliresult(result) |
282 | | - |
283 | | - # build |
284 | | - result = clirunner.invoke( |
285 | | - package_exec_cmd, |
286 | | - [ |
287 | | - "-p", |
288 | | - "tool-cmake", |
289 | | - "--", |
290 | | - "cmake", |
291 | | - "--build", |
292 | | - "build_dir", |
293 | | - "--target", |
294 | | - "Debug", |
295 | | - ], |
296 | | - ) |
297 | | - validate_cliresult(result) |
0 commit comments