Skip to content

Commit da7e58c

Browse files
Migrate TestCompileWithoutUploadAndFqbn from test_compile_part_4.py to compile_part_4_test.go
1 parent 44b9e80 commit da7e58c

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

internal/integrationtest/compile/compile_part_4_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,20 @@ func TestCompileSketchWithIppFileInclude(t *testing.T) {
406406
_, _, err = cli.Run("compile", "-b", fqbn, sketchPath.String(), "--verbose")
407407
require.NoError(t, err)
408408
}
409+
410+
func TestCompileWithoutUploadAndFqbn(t *testing.T) {
411+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
412+
defer env.CleanUp()
413+
414+
_, _, err := cli.Run("update")
415+
require.NoError(t, err)
416+
417+
// Create a sketch
418+
sketchPath := cli.SketchbookDir().Join("SketchSimple")
419+
_, _, err = cli.Run("sketch", "new", sketchPath.String())
420+
require.NoError(t, err)
421+
422+
_, stderr, err := cli.Run("compile", sketchPath.String())
423+
require.Error(t, err)
424+
require.Contains(t, string(stderr), "Missing FQBN (Fully Qualified Board Name)")
425+
}

test/test_compile_part_4.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,6 @@ def test_compile_with_relative_build_path(run_command, data_dir, copy_sketch):
8383
assert "sketch" in built_files
8484

8585

86-
def test_compile_without_upload_and_fqbn(run_command, data_dir):
87-
assert run_command(["update"])
88-
89-
# Create a sketch
90-
sketch_name = "SketchSimple"
91-
sketch_path = Path(data_dir, sketch_name)
92-
assert run_command(["sketch", "new", sketch_path])
93-
94-
res = run_command(["compile", sketch_path])
95-
assert res.failed
96-
assert "Missing FQBN (Fully Qualified Board Name)" in res.stderr
97-
98-
9986
def test_compile_non_installed_platform_with_wrong_packager_and_arch(run_command, data_dir):
10087
assert run_command(["update"])
10188

0 commit comments

Comments
 (0)