Skip to content

Commit 679acdb

Browse files
committed
Recursive compile of subfolders in sketch is no more allowed
See #89 Signed-off-by: Cristian Maglie <[email protected]>
1 parent f5ba0ea commit 679acdb

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

Diff for: src/arduino.cc/builder/test/builder_test.go

+27-24
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@
3030
package test
3131

3232
import (
33-
"arduino.cc/builder"
34-
"arduino.cc/builder/constants"
35-
"arduino.cc/builder/types"
36-
"github.com/stretchr/testify/require"
3733
"os"
3834
"os/exec"
3935
"path/filepath"
4036
"testing"
37+
38+
"arduino.cc/builder"
39+
"arduino.cc/builder/constants"
40+
"arduino.cc/builder/types"
41+
"github.com/stretchr/testify/require"
4142
)
4243

4344
func TestBuilderEmptySketch(t *testing.T) {
@@ -324,26 +325,28 @@ func TestBuilderSketchWithOldLib(t *testing.T) {
324325
NoError(t, err)
325326
}
326327

327-
func TestBuilderSketchWithSubfolders(t *testing.T) {
328-
DownloadCoresAndToolsAndLibraries(t)
329-
330-
ctx := &types.Context{
331-
HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"},
332-
ToolsFolders: []string{"downloaded_tools"},
333-
BuiltInLibrariesFolders: []string{"downloaded_libraries"},
334-
OtherLibrariesFolders: []string{"libraries"},
335-
SketchLocation: filepath.Join("sketch_with_subfolders", "sketch_with_subfolders.ino"),
336-
FQBN: "arduino:avr:uno",
337-
ArduinoAPIVersion: "10600",
338-
}
339-
340-
buildPath := SetupBuildPath(t, ctx)
341-
defer os.RemoveAll(buildPath)
342-
343-
command := builder.Builder{}
344-
err := command.Run(ctx)
345-
NoError(t, err)
346-
}
328+
// Recursive compile of subfolder is no longer supported.
329+
// See: https://github.com/arduino/arduino-builder/issues/89
330+
//func TestBuilderSketchWithSubfolders(t *testing.T) {
331+
// DownloadCoresAndToolsAndLibraries(t)
332+
//
333+
// ctx := &types.Context{
334+
// HardwareFolders: []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"},
335+
// ToolsFolders: []string{"downloaded_tools"},
336+
// BuiltInLibrariesFolders: []string{"downloaded_libraries"},
337+
// OtherLibrariesFolders: []string{"libraries"},
338+
// SketchLocation: filepath.Join("sketch_with_subfolders", "sketch_with_subfolders.ino"),
339+
// FQBN: "arduino:avr:uno",
340+
// ArduinoAPIVersion: "10600",
341+
// }
342+
//
343+
// buildPath := SetupBuildPath(t, ctx)
344+
// defer os.RemoveAll(buildPath)
345+
//
346+
// command := builder.Builder{}
347+
// err := command.Run(ctx)
348+
// NoError(t, err)
349+
//}
347350

348351
func TestBuilderSketchBuildPathContainsUnusedPreviouslyCompiledLibrary(t *testing.T) {
349352
DownloadCoresAndToolsAndLibraries(t)

Diff for: src/arduino.cc/builder/test/try_build_of_problematic_sketch_test.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ func TestTryBuild014(t *testing.T) {
9696
tryBuild(t, "sketch_with_backup_files", "sketch.ino")
9797
}
9898

99-
func TestTryBuild015(t *testing.T) {
100-
tryBuild(t, "sketch_with_subfolders")
101-
}
99+
// Recursive compile of subfolder is no longer supported.
100+
// See: https://github.com/arduino/arduino-builder/issues/89
101+
//func TestTryBuild015(t *testing.T) {
102+
// tryBuild(t, "sketch_with_subfolders")
103+
//}
102104

103105
// This is a sketch that fails to build on purpose
104106
//func TestTryBuild016(t *testing.T) {

0 commit comments

Comments
 (0)