Skip to content

Commit 34b9f78

Browse files
Migrate TestCompileWithoutUploadAndFqbn from test_compile_part_4.py to compile_part_4_test.go
1 parent bfacc80 commit 34b9f78

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
@@ -402,3 +402,20 @@ func TestCompileSketchWithIppFileInclude(t *testing.T) {
402402
_, _, err = cli.Run("compile", "-b", fqbn, sketchPath.String(), "--verbose")
403403
require.NoError(t, err)
404404
}
405+
406+
func TestCompileWithoutUploadAndFqbn(t *testing.T) {
407+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
408+
defer env.CleanUp()
409+
410+
_, _, err := cli.Run("update")
411+
require.NoError(t, err)
412+
413+
// Create a sketch
414+
sketchPath := cli.SketchbookDir().Join("SketchSimple")
415+
_, _, err = cli.Run("sketch", "new", sketchPath.String())
416+
require.NoError(t, err)
417+
418+
_, stderr, err := cli.Run("compile", sketchPath.String())
419+
require.Error(t, err)
420+
require.Contains(t, string(stderr), "Missing FQBN (Fully Qualified Board Name)")
421+
}

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)