From ced2b3da7a357ef6249c637cc436bcb08ac4db25 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Wed, 10 Feb 2021 13:08:46 +0100 Subject: [PATCH 1/2] [skip changelog] Fix platform loading legacy tests --- docs/platform-specification.md | 10 ++--- ...dd_build_board_property_if_missing_test.go | 4 +- legacy/builder/test/builder_test.go | 2 +- legacy/builder/test/ctags_runner_test.go | 10 ++--- .../test/hardware/arduino/avr/boards.txt | 18 -------- legacy/builder/test/hardware/platform.txt | 1 - legacy/builder/test/hardware_loader_test.go | 19 +++++---- .../test/includes_to_include_folders_test.go | 16 +++---- legacy/builder/test/libraries_loader_test.go | 8 ++-- .../load_vid_pid_specific_properties_test.go | 4 +- .../test/merge_sketch_with_bootloader_test.go | 8 ++-- .../test/platform_keys_rewrite_loader_test.go | 2 +- legacy/builder/test/prototypes_adder_test.go | 42 +++++++++---------- .../test/setup_build_properties_test.go | 8 ++-- .../test/target_board_resolver_test.go | 12 +++--- .../try_build_of_problematic_sketch_test.go | 2 +- .../my_avr_platform/platform.txt | 1 - 17 files changed, 75 insertions(+), 92 deletions(-) delete mode 100644 legacy/builder/test/hardware/arduino/avr/boards.txt delete mode 100644 legacy/builder/test/hardware/platform.txt delete mode 100644 legacy/builder/test/user_hardware/my_avr_platform/platform.txt diff --git a/docs/platform-specification.md b/docs/platform-specification.md index 46e1a52ed97..a8705f10927 100644 --- a/docs/platform-specification.md +++ b/docs/platform-specification.md @@ -379,9 +379,9 @@ Arduino IDE. ## platform.local.txt -Introduced in Arduino IDE 1.5.7. This file can be used to override properties defined in platform.txt or define new -properties without modifying platform.txt (e.g. when platform.txt is tracked by a version control system). It should be -placed in the same folder as the platform.txt it supplements. +Introduced in Arduino IDE 1.5.7. This file can be used to override properties defined in `platform.txt` or define new +properties without modifying `platform.txt` (e.g. when `platform.txt` is tracked by a version control system). It must +be placed in the same folder as the `platform.txt` it supplements. ## boards.txt @@ -978,8 +978,8 @@ actual Arduino CLI code, the "board platform" is called `targetPlatform`, the "c ## boards.local.txt -Introduced in Arduino IDE 1.6.6. This file can be used to override properties defined in boards.txt or define new -properties without modifying boards.txt. +Introduced in Arduino IDE 1.6.6. This file can be used to override properties defined in `boards.txt` or define new +properties without modifying `boards.txt`. It must be placed in the same folder as the `boards.txt` it supplements. ## Platform bundled libraries diff --git a/legacy/builder/test/add_build_board_property_if_missing_test.go b/legacy/builder/test/add_build_board_property_if_missing_test.go index 3c369fd6e69..97dc8b8c5fb 100644 --- a/legacy/builder/test/add_build_board_property_if_missing_test.go +++ b/legacy/builder/test/add_build_board_property_if_missing_test.go @@ -36,7 +36,7 @@ func TestAddBuildBoardPropertyIfMissing(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), FQBN: parseFQBN(t, "my_avr_platform:avr:mymega"), Verbose: true, } @@ -68,7 +68,7 @@ func TestAddBuildBoardPropertyIfMissingNotMissing(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), FQBN: parseFQBN(t, "my_avr_platform:avr:mymega:cpu=atmega1280"), Verbose: true, } diff --git a/legacy/builder/test/builder_test.go b/legacy/builder/test/builder_test.go index d44aa8439c1..7bc35b46a39 100644 --- a/legacy/builder/test/builder_test.go +++ b/legacy/builder/test/builder_test.go @@ -34,7 +34,7 @@ func prepareBuilderTestContext(t *testing.T, sketchPath *paths.Path, fqbn string return &types.Context{ SketchLocation: sketchPath, FQBN: parseFQBN(t, fqbn), - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), diff --git a/legacy/builder/test/ctags_runner_test.go b/legacy/builder/test/ctags_runner_test.go index c783ef5b8ba..99434b4cf4d 100644 --- a/legacy/builder/test/ctags_runner_test.go +++ b/legacy/builder/test/ctags_runner_test.go @@ -32,7 +32,7 @@ func TestCTagsRunner(t *testing.T) { sketchLocation := Abs(t, paths.New("downloaded_libraries", "Bridge", "examples", "Bridge", "Bridge.ino")) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -82,7 +82,7 @@ func TestCTagsRunnerSketchWithClass(t *testing.T) { sketchLocation := Abs(t, paths.New("sketch_with_class", "sketch_with_class.ino")) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -130,7 +130,7 @@ func TestCTagsRunnerSketchWithTypename(t *testing.T) { sketchLocation := Abs(t, paths.New("sketch_with_typename", "sketch_with_typename.ino")) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -177,7 +177,7 @@ func TestCTagsRunnerSketchWithNamespace(t *testing.T) { sketchLocation := Abs(t, paths.New("sketch_with_namespace", "sketch_with_namespace.ino")) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -223,7 +223,7 @@ func TestCTagsRunnerSketchWithTemplates(t *testing.T) { sketchLocation := Abs(t, paths.New("sketch_with_templates_and_shift", "sketch_with_templates_and_shift.cpp")) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), diff --git a/legacy/builder/test/hardware/arduino/avr/boards.txt b/legacy/builder/test/hardware/arduino/avr/boards.txt deleted file mode 100644 index bcea233107f..00000000000 --- a/legacy/builder/test/hardware/arduino/avr/boards.txt +++ /dev/null @@ -1,18 +0,0 @@ - -micro.vid.4=0x2341 -micro.pid.4=0x0237 -# If the board is a 2341:0237 use 2341:8237 for build and set -# other parameters as well -micro.vid.4.build.vid=0x2341 -micro.vid.4.build.pid=0x8237 -micro.vid.4.build.usb_product="Genuino Micro" -micro.vid.4.bootloader.file=caterina/Caterina-Genuino-Micro.hex - -micro.vid.5=0x2341 -micro.pid.5=0x8237 -# If the board is a 2341:8237 use 2341:8237 for build and set -# other paramters as well -micro.vid.5.build.vid=0x2341 -micro.vid.5.build.pid=0x8237 -micro.vid.5.build.usb_product="Genuino Micro" -micro.vid.5.bootloader.file=caterina/Caterina-Genuino-Micro.hex diff --git a/legacy/builder/test/hardware/platform.txt b/legacy/builder/test/hardware/platform.txt deleted file mode 100644 index 8b137891791..00000000000 --- a/legacy/builder/test/hardware/platform.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/legacy/builder/test/hardware_loader_test.go b/legacy/builder/test/hardware_loader_test.go index 91711d0665a..0bbd1f8c4d8 100644 --- a/legacy/builder/test/hardware_loader_test.go +++ b/legacy/builder/test/hardware_loader_test.go @@ -28,8 +28,11 @@ import ( func TestLoadHardware(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) + downloadedHardwareAvr := paths.New("downloaded_hardware", "arduino", "avr") + paths.New("hardware", "arduino", "avr", "boards.local.txt").CopyTo(downloadedHardwareAvr.Join("boards.local.txt")) + paths.New("hardware", "arduino", "avr", "platform.local.txt").CopyTo(downloadedHardwareAvr.Join("platform.local.txt")) ctx := &types.Context{ - HardwareDirs: paths.NewPathList("downloaded_hardware", filepath.Join("..", "hardware"), "hardware"), + HardwareDirs: paths.NewPathList("downloaded_hardware", filepath.Join("..", "hardware")), } commands := []types.Command{ @@ -42,7 +45,7 @@ func TestLoadHardware(t *testing.T) { } packages := ctx.Hardware - require.Equal(t, 2, len(packages)) + require.Equal(t, 1, len(packages)) require.NotNil(t, packages["arduino"]) require.Equal(t, 2, len(packages["arduino"].Platforms)) @@ -73,7 +76,7 @@ func TestLoadHardware(t *testing.T) { func TestLoadHardwareMixingUserHardwareFolder(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList("downloaded_hardware", filepath.Join("..", "hardware"), "hardware", "user_hardware"), + HardwareDirs: paths.NewPathList("downloaded_hardware", filepath.Join("..", "hardware"), "user_hardware"), } commands := []types.Command{ @@ -92,9 +95,9 @@ func TestLoadHardwareMixingUserHardwareFolder(t *testing.T) { if runtime.GOOS == "windows" { //a package is a symlink, and windows does not support them - require.Equal(t, 3, len(packages)) + require.Equal(t, 2, len(packages)) } else { - require.Equal(t, 4, len(packages)) + require.Equal(t, 3, len(packages)) } require.NotNil(t, packages["arduino"]) @@ -191,7 +194,7 @@ func TestLoadHardwareWithBoardManagerFolderStructure(t *testing.T) { func TestLoadLotsOfHardware(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList("downloaded_board_manager_stuff", "downloaded_hardware", filepath.Join("..", "hardware"), "hardware", "user_hardware"), + HardwareDirs: paths.NewPathList("downloaded_board_manager_stuff", "downloaded_hardware", filepath.Join("..", "hardware"), "user_hardware"), } commands := []types.Command{ @@ -207,9 +210,9 @@ func TestLoadLotsOfHardware(t *testing.T) { if runtime.GOOS == "windows" { //a package is a symlink, and windows does not support them - require.Equal(t, 5, len(packages)) + require.Equal(t, 4, len(packages)) } else { - require.Equal(t, 6, len(packages)) + require.Equal(t, 5, len(packages)) } require.NotNil(t, packages["arduino"]) diff --git a/legacy/builder/test/includes_to_include_folders_test.go b/legacy/builder/test/includes_to_include_folders_test.go index c9300b28e78..86836bd5c49 100644 --- a/legacy/builder/test/includes_to_include_folders_test.go +++ b/legacy/builder/test/includes_to_include_folders_test.go @@ -30,7 +30,7 @@ func TestIncludesToIncludeFolders(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -66,7 +66,7 @@ func TestIncludesToIncludeFoldersSketchWithIfDef(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -101,7 +101,7 @@ func TestIncludesToIncludeFoldersIRremoteLibrary(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -139,7 +139,7 @@ func TestIncludesToIncludeFoldersANewLibrary(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -174,7 +174,7 @@ func TestIncludesToIncludeFoldersDuplicateLibs(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), SketchLocation: paths.New("user_hardware", "my_avr_platform", "avr", "libraries", "SPI", "examples", "BarometricPressureSensor", "BarometricPressureSensor.ino"), @@ -211,7 +211,7 @@ func TestIncludesToIncludeFoldersDuplicateLibsWithConflictingLibsOutsideOfPlatfo DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -249,7 +249,7 @@ func TestIncludesToIncludeFoldersDuplicateLibs2(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "downloaded_board_manager_stuff"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "downloaded_board_manager_stuff"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -287,7 +287,7 @@ func TestIncludesToIncludeFoldersSubfolders(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), diff --git a/legacy/builder/test/libraries_loader_test.go b/legacy/builder/test/libraries_loader_test.go index d6b4fcca546..9bed71806a5 100644 --- a/legacy/builder/test/libraries_loader_test.go +++ b/legacy/builder/test/libraries_loader_test.go @@ -41,7 +41,7 @@ func TestLoadLibrariesAVR(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), FQBN: parseFQBN(t, "arduino:avr:leonardo"), @@ -151,7 +151,7 @@ func TestLoadLibrariesSAM(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), FQBN: parseFQBN(t, "arduino:sam:arduino_due_x_dbg"), @@ -234,7 +234,7 @@ func TestLoadLibrariesAVRNoDuplicateLibrariesFolders(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries", filepath.Join("downloaded_hardware", "arduino", "avr", "libraries")), FQBN: parseFQBN(t, "arduino:avr:leonardo"), @@ -263,7 +263,7 @@ func TestLoadLibrariesMyAVRPlatform(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "user_hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "user_hardware", "downloaded_hardware"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries", filepath.Join("downloaded_hardware", "arduino", "avr", "libraries")), FQBN: parseFQBN(t, "my_avr_platform:avr:custom_yun"), diff --git a/legacy/builder/test/load_vid_pid_specific_properties_test.go b/legacy/builder/test/load_vid_pid_specific_properties_test.go index f3d1be3b43e..a9bb9b89f3a 100644 --- a/legacy/builder/test/load_vid_pid_specific_properties_test.go +++ b/legacy/builder/test/load_vid_pid_specific_properties_test.go @@ -29,7 +29,7 @@ func TestLoadVIDPIDSpecificPropertiesWhenNoVIDPIDAreProvided(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "./tools_builtin"), SketchLocation: paths.New("sketch1", "sketch1.ino"), FQBN: parseFQBN(t, "arduino:avr:micro"), @@ -59,7 +59,7 @@ func TestLoadVIDPIDSpecificProperties(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "./tools_builtin"), SketchLocation: paths.New("sketch1", "sketch1.ino"), FQBN: parseFQBN(t, "arduino:avr:micro"), diff --git a/legacy/builder/test/merge_sketch_with_bootloader_test.go b/legacy/builder/test/merge_sketch_with_bootloader_test.go index ee7c59893a7..89f08131461 100644 --- a/legacy/builder/test/merge_sketch_with_bootloader_test.go +++ b/legacy/builder/test/merge_sketch_with_bootloader_test.go @@ -32,7 +32,7 @@ func TestMergeSketchWithBootloader(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -102,7 +102,7 @@ func TestMergeSketchWithBootloaderSketchInBuildPath(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -173,7 +173,7 @@ func TestMergeSketchWithBootloaderWhenNoBootloaderAvailable(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -211,7 +211,7 @@ func TestMergeSketchWithBootloaderPathIsParameterized(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), diff --git a/legacy/builder/test/platform_keys_rewrite_loader_test.go b/legacy/builder/test/platform_keys_rewrite_loader_test.go index 74a19818f26..80a7190c242 100644 --- a/legacy/builder/test/platform_keys_rewrite_loader_test.go +++ b/legacy/builder/test/platform_keys_rewrite_loader_test.go @@ -27,7 +27,7 @@ import ( func TestLoadPlatformKeysRewrite(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList("downloaded_hardware", filepath.Join("..", "hardware"), "hardware"), + HardwareDirs: paths.NewPathList("downloaded_hardware", filepath.Join("..", "hardware")), } commands := []types.Command{ diff --git a/legacy/builder/test/prototypes_adder_test.go b/legacy/builder/test/prototypes_adder_test.go index 811ae91508c..1e2e706870e 100644 --- a/legacy/builder/test/prototypes_adder_test.go +++ b/legacy/builder/test/prototypes_adder_test.go @@ -35,7 +35,7 @@ func TestPrototypesAdderBridgeExample(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -77,7 +77,7 @@ func TestPrototypesAdderSketchWithIfDef(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -117,7 +117,7 @@ func TestPrototypesAdderBaladuino(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -157,7 +157,7 @@ func TestPrototypesAdderCharWithEscapedDoubleQuote(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -197,7 +197,7 @@ func TestPrototypesAdderIncludeBetweenMultilineComment(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -237,7 +237,7 @@ func TestPrototypesAdderLineContinuations(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -277,7 +277,7 @@ func TestPrototypesAdderStringWithComment(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -317,7 +317,7 @@ func TestPrototypesAdderSketchWithStruct(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -365,7 +365,7 @@ func TestPrototypesAdderSketchWithConfig(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -411,7 +411,7 @@ func TestPrototypesAdderSketchNoFunctionsTwoFiles(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -451,7 +451,7 @@ func TestPrototypesAdderSketchNoFunctions(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -497,7 +497,7 @@ func TestPrototypesAdderSketchWithDefaultArgs(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -540,7 +540,7 @@ func TestPrototypesAdderSketchWithInlineFunction(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -594,7 +594,7 @@ func TestPrototypesAdderSketchWithFunctionSignatureInsideIFDEF(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -637,7 +637,7 @@ func TestPrototypesAdderSketchWithUSBCON(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), OtherLibrariesDirs: paths.NewPathList("libraries"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), @@ -680,7 +680,7 @@ func TestPrototypesAdderSketchWithTypename(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInLibrariesDirs: paths.NewPathList("libraries", "downloaded_libraries"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), SketchLocation: sketchLocation, @@ -728,7 +728,7 @@ func TestPrototypesAdderSketchWithIfDef2(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -774,7 +774,7 @@ func TestPrototypesAdderSketchWithIfDef2SAM(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -820,7 +820,7 @@ func TestPrototypesAdderSketchWithConst(t *testing.T) { quotedSketchLocation := utils.QuoteCppPath(Abs(t, sketchLocation)) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -860,7 +860,7 @@ func TestPrototypesAdderSketchWithDosEol(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), @@ -900,7 +900,7 @@ func TestPrototypesAdderSketchWithSubstringFunctionMember(t *testing.T) { quotedSketchLocation := utils.QuoteCppString(Abs(t, sketchLocation).String()) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), diff --git a/legacy/builder/test/setup_build_properties_test.go b/legacy/builder/test/setup_build_properties_test.go index 995d7a42747..e9b9a800c51 100644 --- a/legacy/builder/test/setup_build_properties_test.go +++ b/legacy/builder/test/setup_build_properties_test.go @@ -29,7 +29,7 @@ func TestSetupBuildProperties(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "tools_builtin"), SketchLocation: paths.New("sketch1", "sketch1.ino"), FQBN: parseFQBN(t, "arduino:avr:uno"), @@ -95,7 +95,7 @@ func TestSetupBuildPropertiesWithSomeCustomOverrides(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "tools_builtin"), SketchLocation: paths.New("sketch1", "sketch1.ino"), FQBN: parseFQBN(t, "arduino:avr:uno"), @@ -136,7 +136,7 @@ func TestSetupBuildPropertiesUserHardware(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "tools_builtin"), SketchLocation: paths.New("sketch1", "sketch1.ino"), FQBN: parseFQBN(t, "my_avr_platform:avr:custom_yun"), @@ -174,7 +174,7 @@ func TestSetupBuildPropertiesWithMissingPropsFromParentPlatformTxtFiles(t *testi DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "tools_builtin"), SketchLocation: paths.New("sketch1", "sketch1.ino"), FQBN: parseFQBN(t, "my_avr_platform:avr:custom_yun"), diff --git a/legacy/builder/test/target_board_resolver_test.go b/legacy/builder/test/target_board_resolver_test.go index 2df4c6f6f9c..0d95a06ece5 100644 --- a/legacy/builder/test/target_board_resolver_test.go +++ b/legacy/builder/test/target_board_resolver_test.go @@ -27,7 +27,7 @@ import ( func TestTargetBoardResolverUno(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), FQBN: parseFQBN(t, "arduino:avr:uno"), } @@ -52,7 +52,7 @@ func TestTargetBoardResolverUno(t *testing.T) { func TestTargetBoardResolverDue(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), FQBN: parseFQBN(t, "arduino:sam:arduino_due_x"), } @@ -77,7 +77,7 @@ func TestTargetBoardResolverDue(t *testing.T) { func TestTargetBoardResolverMega1280(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), FQBN: parseFQBN(t, "arduino:avr:mega:cpu=atmega1280"), } @@ -103,7 +103,7 @@ func TestTargetBoardResolverMega1280(t *testing.T) { func TestTargetBoardResolverMega2560(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"), FQBN: parseFQBN(t, "arduino:avr:mega:cpu=atmega2560"), } @@ -129,7 +129,7 @@ func TestTargetBoardResolverMega2560(t *testing.T) { func TestTargetBoardResolverCustomYun(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"), FQBN: parseFQBN(t, "my_avr_platform:avr:custom_yun"), } @@ -155,7 +155,7 @@ func TestTargetBoardResolverCustomYun(t *testing.T) { func TestTargetBoardResolverCustomCore(t *testing.T) { ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "user_hardware"), + HardwareDirs: paths.NewPathList("hardware"), FQBN: parseFQBN(t, "watterott:avr:attiny841:core=spencekonde,info=info"), } diff --git a/legacy/builder/test/try_build_of_problematic_sketch_test.go b/legacy/builder/test/try_build_of_problematic_sketch_test.go index 702ed136af6..92c5afb1f3f 100644 --- a/legacy/builder/test/try_build_of_problematic_sketch_test.go +++ b/legacy/builder/test/try_build_of_problematic_sketch_test.go @@ -208,7 +208,7 @@ func makeDefaultContext(t *testing.T) *types.Context { DownloadCoresAndToolsAndLibraries(t) ctx := &types.Context{ - HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "hardware", "downloaded_hardware", "downloaded_board_manager_stuff"), + HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "downloaded_board_manager_stuff"), BuiltInToolsDirs: paths.NewPathList("downloaded_tools"), BuiltInLibrariesDirs: paths.NewPathList("downloaded_libraries"), OtherLibrariesDirs: paths.NewPathList("libraries"), diff --git a/legacy/builder/test/user_hardware/my_avr_platform/platform.txt b/legacy/builder/test/user_hardware/my_avr_platform/platform.txt deleted file mode 100644 index 4c1664e56d4..00000000000 --- a/legacy/builder/test/user_hardware/my_avr_platform/platform.txt +++ /dev/null @@ -1 +0,0 @@ -example=hello world From 1171b0e45926d2e438cdee69d23bf0f929b186e2 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Thu, 11 Feb 2021 11:09:04 +0100 Subject: [PATCH 2/2] [skip changelog] Moved local.txt files used for testing --- .../arduino/avr => custom_local_txts}/boards.local.txt | 0 .../arduino/avr => custom_local_txts}/platform.local.txt | 0 legacy/builder/test/hardware_loader_test.go | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename legacy/builder/test/{hardware/arduino/avr => custom_local_txts}/boards.local.txt (100%) rename legacy/builder/test/{hardware/arduino/avr => custom_local_txts}/platform.local.txt (100%) diff --git a/legacy/builder/test/hardware/arduino/avr/boards.local.txt b/legacy/builder/test/custom_local_txts/boards.local.txt similarity index 100% rename from legacy/builder/test/hardware/arduino/avr/boards.local.txt rename to legacy/builder/test/custom_local_txts/boards.local.txt diff --git a/legacy/builder/test/hardware/arduino/avr/platform.local.txt b/legacy/builder/test/custom_local_txts/platform.local.txt similarity index 100% rename from legacy/builder/test/hardware/arduino/avr/platform.local.txt rename to legacy/builder/test/custom_local_txts/platform.local.txt diff --git a/legacy/builder/test/hardware_loader_test.go b/legacy/builder/test/hardware_loader_test.go index 0bbd1f8c4d8..0c1575f91da 100644 --- a/legacy/builder/test/hardware_loader_test.go +++ b/legacy/builder/test/hardware_loader_test.go @@ -29,8 +29,8 @@ import ( func TestLoadHardware(t *testing.T) { DownloadCoresAndToolsAndLibraries(t) downloadedHardwareAvr := paths.New("downloaded_hardware", "arduino", "avr") - paths.New("hardware", "arduino", "avr", "boards.local.txt").CopyTo(downloadedHardwareAvr.Join("boards.local.txt")) - paths.New("hardware", "arduino", "avr", "platform.local.txt").CopyTo(downloadedHardwareAvr.Join("platform.local.txt")) + paths.New("custom_local_txts", "boards.local.txt").CopyTo(downloadedHardwareAvr.Join("boards.local.txt")) + paths.New("custom_local_txts", "platform.local.txt").CopyTo(downloadedHardwareAvr.Join("platform.local.txt")) ctx := &types.Context{ HardwareDirs: paths.NewPathList("downloaded_hardware", filepath.Join("..", "hardware")), }