Skip to content

Commit 5eae5de

Browse files
Migrate TestBuilderDidNotCatchLibsFromUnusedPlatforms to profiles_test.go and delete test_profiles.py
1 parent 614e537 commit 5eae5de

File tree

3 files changed

+26
-33
lines changed

3 files changed

+26
-33
lines changed

Diff for: internal/integrationtest/profiles/profiles_test.go

+26
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,29 @@ func TestCompileWithProfiles(t *testing.T) {
4343
_, _, err = cli.Run("compile", "-m", "avr2", sketchPath.String())
4444
require.NoError(t, err)
4545
}
46+
47+
func TestBuilderDidNotCatchLibsFromUnusedPlatforms(t *testing.T) {
48+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
49+
defer env.CleanUp()
50+
51+
// Init the environment explicitly
52+
_, _, err := cli.Run("core", "update-index")
53+
require.NoError(t, err)
54+
55+
// copy sketch into the working directory
56+
sketchPath := cli.CopySketch("sketch_with_error_including_wire")
57+
58+
// install two platforms with the Wire library bundled
59+
_, _, err = cli.Run("core", "install", "arduino:avr")
60+
require.NoError(t, err)
61+
_, _, err = cli.Run("core", "install", "arduino:samd")
62+
require.NoError(t, err)
63+
64+
// compile for AVR
65+
stdout, stderr, err := cli.Run("compile", "-b", "arduino:avr:uno", sketchPath.String())
66+
require.Error(t, err)
67+
68+
// check that the libary resolver did not take the SAMD bundled Wire library into account
69+
require.NotContains(t, string(stdout), "samd")
70+
require.NotContains(t, string(stderr), "samd")
71+
}

Diff for: test/test_profiles.py

-33
This file was deleted.

0 commit comments

Comments
 (0)