Skip to content

Commit b4a8922

Browse files
committed
Increase code coverage
1 parent ba162f9 commit b4a8922

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Diff for: legacy/builder/test/add_build_board_property_if_missing_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestAddBuildBoardPropertyIfMissing(t *testing.T) {
6161
require.Equal(t, "mymega", targetBoard.BoardID)
6262
targetBoardBuildProperties := ctx.TargetBoardBuildProperties
6363
require.Equal(t, "atmega2560", targetBoardBuildProperties.Get("build.mcu"))
64-
require.Equal(t, "AVR_MYMEGA2560", targetBoardBuildProperties.Get("build.board"))
64+
require.Equal(t, "AVR_MYMEGA", targetBoardBuildProperties.Get("build.board"))
6565
}
6666

6767
func TestAddBuildBoardPropertyIfMissingNotMissing(t *testing.T) {
@@ -91,5 +91,5 @@ func TestAddBuildBoardPropertyIfMissingNotMissing(t *testing.T) {
9191
require.Equal(t, "mymega", targetBoard.BoardID)
9292
targetBoardBuildProperties := ctx.TargetBoardBuildProperties
9393
require.Equal(t, "atmega1280", targetBoardBuildProperties.Get("build.mcu"))
94-
require.Equal(t, "AVR_MYMEGA", targetBoardBuildProperties.Get("build.board"))
94+
require.Equal(t, "MYMEGA1280", targetBoardBuildProperties.Get("build.board"))
9595
}

Diff for: legacy/builder/test/user_hardware/my_avr_platform/avr/boards.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ mymega.menu.cpu.atmega2560.bootloader.extended_fuses=0xFD
7070
mymega.menu.cpu.atmega2560.bootloader.file={bootloader._folder}/stk500boot_v2_mega2560.hex
7171

7272
mymega.menu.cpu.atmega2560.build.mcu=atmega2560
73-
mymega.menu.cpu.atmega2560.build.board=AVR_MYMEGA2560
73+
# Do not define build.board to test autogeneration
74+
#mymega.menu.cpu.atmega2560.build.board=AVR_MYMEGA2560
7475

7576
mymega.menu.cpu.atmega1280=ATmega1280
7677

@@ -84,4 +85,5 @@ mymega.menu.cpu.atmega1280.bootloader.extended_fuses=0xF5
8485
mymega.menu.cpu.atmega1280.bootloader.file={bootloader._folder}/ATmegaBOOT_168_atmega1280.hex
8586

8687
mymega.menu.cpu.atmega1280.build.mcu=atmega1280
87-
mymega.menu.cpu.atmega1280.build.board=AVR_MYMEGA
88+
# define custom build.board for testing
89+
mymega.menu.cpu.atmega1280.build.board=MYMEGA1280

0 commit comments

Comments
 (0)