Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d29c379

Browse files
Add TestCompileBuildPathInsideSketch to compile_test.go
1 parent 4d43fa4 commit d29c379

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

‎internal/integrationtest/compile_3/compile_test.go‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,27 @@ func TestRuntimeToolPropertiesGeneration(t *testing.T) {
7272
require.True(t, res.GetPath("runtime.tools.avrdude.path").EquivalentTo(hardwareDir.Join("arduino", "tools", "avrdude", "6.3.0-arduino17")))
7373
}
7474
}
75+
76+
func TestCompileBuildPathInsideSketch(t *testing.T) {
77+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
78+
defer env.CleanUp()
79+
80+
_, _, err := cli.Run("core", "update-index")
81+
require.NoError(t, err)
82+
83+
_, _, err = cli.Run("core", "install", "arduino:avr")
84+
require.NoError(t, err)
85+
86+
sketch := "sketchSimple"
87+
_, _, err = cli.Run("sketch", "new", sketch)
88+
require.NoError(t, err)
89+
90+
cli.SetWorkingDir(cli.WorkingDir().Join(sketch))
91+
// Compile the sketch creating the build directory inside the sketch directory
92+
_, _, err = cli.Run("compile", "-b", "arduino:avr:mega", "--build-path", "build-mega")
93+
require.NoError(t, err)
94+
95+
// Compile again using the same build path
96+
_, _, err = cli.Run("compile", "-b", "arduino:avr:mega", "--build-path", "build-mega")
97+
require.NoError(t, err)
98+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /