Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1239ab2

Browse files
committedSep 13, 2023
polish legacy test
1 parent af86c0f commit 1239ab2

12 files changed

+156
-737
lines changed
 

‎arduino/builder/linker.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,10 @@ func (b *Builder) Link() error {
3333
return nil
3434
}
3535

36-
// TODO can we remove this multiple assignations?
37-
objectFilesSketch := b.buildArtifacts.sketchObjectFiles
38-
objectFilesLibraries := b.buildArtifacts.librariesObjectFiles
39-
objectFilesCore := b.buildArtifacts.coreObjectsFiles
40-
4136
objectFiles := paths.NewPathList()
42-
objectFiles.AddAll(objectFilesSketch)
43-
objectFiles.AddAll(objectFilesLibraries)
44-
objectFiles.AddAll(objectFilesCore)
37+
objectFiles.AddAll(b.buildArtifacts.sketchObjectFiles)
38+
objectFiles.AddAll(b.buildArtifacts.librariesObjectFiles)
39+
objectFiles.AddAll(b.buildArtifacts.coreObjectsFiles)
4540

4641
coreDotARelPath, err := b.buildPath.RelTo(b.buildArtifacts.coreArchiveFilePath)
4742
if err != nil {

‎arduino/builder/utils/utils_test.go

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
package utils
1717

1818
import (
19+
"os"
1920
"testing"
21+
"time"
2022

23+
"github.com/arduino/go-paths-helper"
2124
"github.com/stretchr/testify/require"
2225
)
2326

@@ -39,3 +42,133 @@ func TestPrintableCommand(t *testing.T) {
3942
result := printableCommand(parts)
4043
require.Equal(t, correct, result)
4144
}
45+
46+
func tempFile(t *testing.T, prefix string) *paths.Path {
47+
file, err := os.CreateTemp("", prefix)
48+
file.Close()
49+
require.NoError(t, err)
50+
return paths.New(file.Name())
51+
}
52+
53+
func TestObjFileIsUpToDateObjMissing(t *testing.T) {
54+
sourceFile := tempFile(t, "source")
55+
defer sourceFile.RemoveAll()
56+
57+
upToDate, err := ObjFileIsUpToDate(sourceFile, nil, nil)
58+
require.NoError(t, err)
59+
require.False(t, upToDate)
60+
}
61+
62+
func TestObjFileIsUpToDateDepMissing(t *testing.T) {
63+
sourceFile := tempFile(t, "source")
64+
defer sourceFile.RemoveAll()
65+
66+
objFile := tempFile(t, "obj")
67+
defer objFile.RemoveAll()
68+
69+
upToDate, err := ObjFileIsUpToDate(sourceFile, objFile, nil)
70+
require.NoError(t, err)
71+
require.False(t, upToDate)
72+
}
73+
74+
func TestObjFileIsUpToDateObjOlder(t *testing.T) {
75+
objFile := tempFile(t, "obj")
76+
defer objFile.RemoveAll()
77+
depFile := tempFile(t, "dep")
78+
defer depFile.RemoveAll()
79+
80+
time.Sleep(time.Second)
81+
82+
sourceFile := tempFile(t, "source")
83+
defer sourceFile.RemoveAll()
84+
85+
upToDate, err := ObjFileIsUpToDate(sourceFile, objFile, depFile)
86+
require.NoError(t, err)
87+
require.False(t, upToDate)
88+
}
89+
90+
func TestObjFileIsUpToDateObjNewer(t *testing.T) {
91+
sourceFile := tempFile(t, "source")
92+
defer sourceFile.RemoveAll()
93+
94+
time.Sleep(time.Second)
95+
96+
objFile := tempFile(t, "obj")
97+
defer objFile.RemoveAll()
98+
depFile := tempFile(t, "dep")
99+
defer depFile.RemoveAll()
100+
101+
upToDate, err := ObjFileIsUpToDate(sourceFile, objFile, depFile)
102+
require.NoError(t, err)
103+
require.True(t, upToDate)
104+
}
105+
106+
func TestObjFileIsUpToDateDepIsNewer(t *testing.T) {
107+
sourceFile := tempFile(t, "source")
108+
defer sourceFile.RemoveAll()
109+
110+
time.Sleep(time.Second)
111+
112+
objFile := tempFile(t, "obj")
113+
defer objFile.RemoveAll()
114+
depFile := tempFile(t, "dep")
115+
defer depFile.RemoveAll()
116+
117+
time.Sleep(time.Second)
118+
119+
headerFile := tempFile(t, "header")
120+
defer headerFile.RemoveAll()
121+
122+
data := objFile.String() + ": \\\n\t" + sourceFile.String() + " \\\n\t" + headerFile.String()
123+
depFile.WriteFile([]byte(data))
124+
125+
upToDate, err := ObjFileIsUpToDate(sourceFile, objFile, depFile)
126+
require.NoError(t, err)
127+
require.False(t, upToDate)
128+
}
129+
130+
func TestObjFileIsUpToDateDepIsOlder(t *testing.T) {
131+
sourceFile := tempFile(t, "source")
132+
defer sourceFile.RemoveAll()
133+
134+
headerFile := tempFile(t, "header")
135+
defer headerFile.RemoveAll()
136+
137+
time.Sleep(time.Second)
138+
139+
objFile := tempFile(t, "obj")
140+
defer objFile.RemoveAll()
141+
depFile := tempFile(t, "dep")
142+
defer depFile.RemoveAll()
143+
144+
res := objFile.String() + ": \\\n\t" + sourceFile.String() + " \\\n\t" + headerFile.String()
145+
depFile.WriteFile([]byte(res))
146+
147+
upToDate, err := ObjFileIsUpToDate(sourceFile, objFile, depFile)
148+
require.NoError(t, err)
149+
require.True(t, upToDate)
150+
}
151+
152+
func TestObjFileIsUpToDateDepIsWrong(t *testing.T) {
153+
sourceFile := tempFile(t, "source")
154+
defer sourceFile.RemoveAll()
155+
156+
time.Sleep(time.Second)
157+
158+
objFile := tempFile(t, "obj")
159+
defer objFile.RemoveAll()
160+
depFile := tempFile(t, "dep")
161+
defer depFile.RemoveAll()
162+
163+
time.Sleep(time.Second)
164+
165+
headerFile := tempFile(t, "header")
166+
defer headerFile.RemoveAll()
167+
168+
res := sourceFile.String() + ": \\\n\t" + sourceFile.String() + " \\\n\t" + headerFile.String()
169+
depFile.WriteFile([]byte(res))
170+
171+
upToDate, err := ObjFileIsUpToDate(sourceFile, objFile, depFile)
172+
require.NoError(t, err)
173+
require.False(t, upToDate)
174+
}

‎internal/integrationtest/compile_4/compile_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,15 @@ func testBuilderBridgeExample(t *testing.T, env *integrationtest.Environment, cl
387387

388388
// Simulate a library use in libraries build path
389389
require.NoError(t, buildPath.Join("libraries", "SPI").MkdirAll())
390+
require.NoError(t, buildPath.Join("libraries", "dummy_file").WriteFile([]byte{}))
390391

391392
// Build again...
392393
_, err = tryBuild(t, env, cli, "arduino:avr:leonardo", &buildOptions{NoClean: true})
393394
require.NoError(t, err)
394395

395396
require.False(t, buildPath.Join("libraries", "SPI").Exist())
396397
require.True(t, buildPath.Join("libraries", "Bridge").Exist())
398+
require.True(t, buildPath.Join("libraries", "dummy_file").Exist())
397399
})
398400

399401
t.Run("Preprocess", func(t *testing.T) {

‎legacy/builder/test/builder_test.go

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,9 @@ func cleanUpBuilderTestContext(t *testing.T, ctx *types.Context) {
3838
}
3939
}
4040

41-
type skipContextPreparationStepName string
42-
43-
const skipLibraries = skipContextPreparationStepName("libraries")
44-
45-
func prepareBuilderTestContext(t *testing.T, ctx *types.Context, sketchPath *paths.Path, fqbnString string, skips ...skipContextPreparationStepName) *types.Context {
41+
func prepareBuilderTestContext(t *testing.T, ctx *types.Context, sketchPath *paths.Path, fqbnString string) *types.Context {
4642
DownloadCoresAndToolsAndLibraries(t)
4743

48-
stepToSkip := map[skipContextPreparationStepName]bool{}
49-
for _, skip := range skips {
50-
stepToSkip[skip] = true
51-
}
52-
5344
if ctx == nil {
5445
ctx = &types.Context{}
5546
}
@@ -123,7 +114,6 @@ func prepareBuilderTestContext(t *testing.T, ctx *types.Context, sketchPath *pat
123114
_, err = pme.FindToolsRequiredForBuild(targetPlatform, buildPlatform)
124115
require.NoError(t, err)
125116

126-
127117
ctx.Builder, err = bldr.NewBuilder(
128118
sk, boardBuildProperties, buildPath, false, nil, 0, nil,
129119
ctx.HardwareDirs, ctx.BuiltInToolsDirs, ctx.OtherLibrariesDirs,
@@ -133,21 +123,19 @@ func prepareBuilderTestContext(t *testing.T, ctx *types.Context, sketchPath *pat
133123
ctx.PackageManager = pme
134124
}
135125

136-
if !stepToSkip[skipLibraries] {
137-
lm, libsResolver, _, err := detector.LibrariesLoader(
138-
false, nil,
139-
ctx.BuiltInLibrariesDirs, nil, ctx.OtherLibrariesDirs,
140-
actualPlatform, targetPlatform,
141-
)
142-
require.NoError(t, err)
126+
lm, libsResolver, _, err := detector.LibrariesLoader(
127+
false, nil,
128+
ctx.BuiltInLibrariesDirs, nil, ctx.OtherLibrariesDirs,
129+
actualPlatform, targetPlatform,
130+
)
131+
require.NoError(t, err)
143132

144-
ctx.SketchLibrariesDetector = detector.NewSketchLibrariesDetector(
145-
lm, libsResolver,
146-
false,
147-
false,
148-
builderLogger,
149-
)
150-
}
133+
ctx.SketchLibrariesDetector = detector.NewSketchLibrariesDetector(
134+
lm, libsResolver,
135+
false,
136+
false,
137+
builderLogger,
138+
)
151139

152140
return ctx
153141
}

‎legacy/builder/test/builder_utils_test.go

Lines changed: 0 additions & 156 deletions
This file was deleted.

‎legacy/builder/test/helper.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,10 @@ import (
2020
"testing"
2121

2222
"github.com/arduino/arduino-cli/arduino/cores"
23-
"github.com/arduino/arduino-cli/arduino/libraries"
2423
paths "github.com/arduino/go-paths-helper"
2524
"github.com/stretchr/testify/require"
2625
)
2726

28-
func Abs(t *testing.T, rel *paths.Path) *paths.Path {
29-
absPath, err := rel.Abs()
30-
require.NoError(t, err)
31-
return absPath
32-
}
33-
3427
func SetupBuildPath(t *testing.T) *paths.Path {
3528
buildPath, err := paths.MkTempDir("", "test_build_path")
3629
require.NoError(t, err)
@@ -42,15 +35,3 @@ func parseFQBN(t *testing.T, fqbnIn string) *cores.FQBN {
4235
require.NoError(t, err)
4336
return fqbn
4437
}
45-
46-
type ByLibraryName []*libraries.Library
47-
48-
func (s ByLibraryName) Len() int {
49-
return len(s)
50-
}
51-
func (s ByLibraryName) Swap(i, j int) {
52-
s[i], s[j] = s[j], s[i]
53-
}
54-
func (s ByLibraryName) Less(i, j int) bool {
55-
return s[i].Name < s[j].Name
56-
}

‎legacy/builder/test/libraries_loader_test.go

Lines changed: 0 additions & 275 deletions
This file was deleted.

‎legacy/builder/test/merge_sketch_with_bootloader_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ func TestMergeSketchWithBootloaderWhenNoBootloaderAvailable(t *testing.T) {
148148
require.False(t, exist)
149149
}
150150

151+
// TODO convert in a compile test and we check against the real .hex
151152
func TestMergeSketchWithBootloaderPathIsParameterized(t *testing.T) {
152153
ctx := &types.Context{
153154
HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"),

‎legacy/builder/test/setup_build_properties_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/stretchr/testify/require"
2626
)
2727

28+
// TODO maybe create a test that actually check all the keys
2829
func TestSetupBuildProperties(t *testing.T) {
2930
ctx := &types.Context{
3031
HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"),
@@ -71,6 +72,7 @@ func TestSetupBuildProperties(t *testing.T) {
7172
require.True(t, buildProperties.ContainsKey("extra.time.dst"))
7273
}
7374

75+
// TODO make this integration tests
7476
func TestSetupBuildPropertiesWithSomeCustomOverrides(t *testing.T) {
7577
ctx := &types.Context{
7678
HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"),
@@ -90,6 +92,7 @@ func TestSetupBuildPropertiesWithSomeCustomOverrides(t *testing.T) {
9092
require.Equal(t, "non existent path with space and a =", buildProperties.Get("tools.avrdude.config.path"))
9193
}
9294

95+
// TODO go to compile_4 that uses the custom_yum to compile and we also verify this properties
9396
func TestSetupBuildPropertiesUserHardware(t *testing.T) {
9497
ctx := &types.Context{
9598
HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "user_hardware"),

‎legacy/builder/test/tools_loader_test.go

Lines changed: 0 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,12 @@
1616
package test
1717

1818
import (
19-
"path/filepath"
20-
"sort"
2119
"testing"
2220

23-
"github.com/arduino/arduino-cli/arduino/cores"
24-
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
25-
"github.com/arduino/arduino-cli/legacy/builder/types"
2621
paths "github.com/arduino/go-paths-helper"
2722
"github.com/stretchr/testify/require"
2823
)
2924

30-
type ByToolIDAndVersion []*cores.ToolRelease
31-
32-
func (s ByToolIDAndVersion) Len() int {
33-
return len(s)
34-
}
35-
func (s ByToolIDAndVersion) Swap(i, j int) {
36-
s[i], s[j] = s[j], s[i]
37-
}
38-
func (s ByToolIDAndVersion) Less(i, j int) bool {
39-
if s[i].Tool.Name != s[j].Tool.Name {
40-
return s[i].Tool.Name < s[j].Tool.Name
41-
}
42-
if !s[i].Version.Equal(s[j].Version) {
43-
return s[i].Version.LessThan(s[j].Version)
44-
}
45-
return s[i].InstallDir.String() < s[j].InstallDir.String()
46-
}
47-
4825
func requireEquivalentPaths(t *testing.T, actual string, expected ...string) {
4926
if len(expected) == 1 {
5027
actualAbs, err := paths.New(actual).Abs()
@@ -60,134 +37,3 @@ func requireEquivalentPaths(t *testing.T, actual string, expected ...string) {
6037
require.Contains(t, expectedAbs.AsStrings(), actualAbs.String())
6138
}
6239
}
63-
64-
func TestLoadTools(t *testing.T) {
65-
ctx := &types.Context{
66-
HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware"),
67-
BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "tools_builtin"),
68-
}
69-
ctx = prepareBuilderTestContext(t, ctx, nil, "", skipLibraries)
70-
defer cleanUpBuilderTestContext(t, ctx)
71-
72-
tools := ctx.PackageManager.GetAllInstalledToolsReleases()
73-
require.Equal(t, 9, len(tools))
74-
75-
sort.Sort(ByToolIDAndVersion(tools))
76-
77-
idx := 0
78-
require.Equal(t, ":arduino-preprocessor@0.1.5", tools[idx].String())
79-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/arduino-preprocessor/0.1.5")
80-
idx++
81-
require.Equal(t, ":arm-none-eabi-gcc@4.8.3-2014q1", tools[idx].String())
82-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/arm-none-eabi-gcc/4.8.3-2014q1")
83-
idx++
84-
require.Equal(t, ":avr-gcc@4.8.1-arduino5", tools[idx].String())
85-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/avr-gcc/4.8.1-arduino5")
86-
idx++
87-
require.Equal(t, "arduino:avr-gcc@4.8.1-arduino5", tools[idx].String())
88-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "tools_builtin/avr")
89-
idx++
90-
require.Equal(t, ":avrdude@6.0.1-arduino5", tools[idx].String())
91-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/avrdude/6.0.1-arduino5")
92-
idx++
93-
require.Equal(t, "arduino:avrdude@6.0.1-arduino5", tools[idx].String())
94-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "tools_builtin/avr")
95-
idx++
96-
require.Equal(t, ":bossac@1.5-arduino", tools[idx].String())
97-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/bossac/1.5-arduino")
98-
idx++
99-
require.Equal(t, ":bossac@1.6.1-arduino", tools[idx].String())
100-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/bossac/1.6.1-arduino")
101-
idx++
102-
require.Equal(t, ":ctags@5.8-arduino11", tools[idx].String())
103-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/ctags/5.8-arduino11")
104-
}
105-
106-
func TestLoadToolsWithBoardManagerFolderStructure(t *testing.T) {
107-
ctx := &types.Context{
108-
HardwareDirs: paths.NewPathList("downloaded_board_manager_stuff"),
109-
}
110-
ctx = prepareBuilderTestContext(t, ctx, nil, "", skipLibraries)
111-
defer cleanUpBuilderTestContext(t, ctx)
112-
113-
tools := ctx.PackageManager.GetAllInstalledToolsReleases()
114-
require.Equal(t, 3, len(tools))
115-
116-
sort.Sort(ByToolIDAndVersion(tools))
117-
118-
idx := 0
119-
require.Equal(t, "arduino:CMSIS@4.0.0-atmel", tools[idx].String())
120-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_board_manager_stuff/arduino/tools/CMSIS/4.0.0-atmel")
121-
idx++
122-
require.Equal(t, "RFduino:arm-none-eabi-gcc@4.8.3-2014q1", tools[idx].String())
123-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_board_manager_stuff/RFduino/tools/arm-none-eabi-gcc/4.8.3-2014q1")
124-
idx++
125-
require.Equal(t, "arduino:openocd@0.9.0-arduino", tools[idx].String())
126-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_board_manager_stuff/arduino/tools/openocd/0.9.0-arduino")
127-
}
128-
129-
func TestLoadLotsOfTools(t *testing.T) {
130-
ctx := &types.Context{
131-
HardwareDirs: paths.NewPathList("downloaded_board_manager_stuff"),
132-
BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "tools_builtin"),
133-
}
134-
ctx = prepareBuilderTestContext(t, ctx, nil, "", skipLibraries)
135-
defer cleanUpBuilderTestContext(t, ctx)
136-
137-
tools := ctx.PackageManager.GetAllInstalledToolsReleases()
138-
require.Equal(t, 12, len(tools))
139-
140-
sort.Sort(ByToolIDAndVersion(tools))
141-
142-
idx := 0
143-
require.Equal(t, "arduino:CMSIS@4.0.0-atmel", tools[idx].String())
144-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_board_manager_stuff/arduino/tools/CMSIS/4.0.0-atmel")
145-
idx++
146-
require.Equal(t, ":arduino-preprocessor@0.1.5", tools[idx].String())
147-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/arduino-preprocessor/0.1.5")
148-
idx++
149-
require.Equal(t, "RFduino:arm-none-eabi-gcc@4.8.3-2014q1", tools[idx].String())
150-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_board_manager_stuff/RFduino/tools/arm-none-eabi-gcc/4.8.3-2014q1")
151-
idx++
152-
require.Equal(t, ":arm-none-eabi-gcc@4.8.3-2014q1", tools[idx].String())
153-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/arm-none-eabi-gcc/4.8.3-2014q1")
154-
idx++
155-
require.Equal(t, ":avr-gcc@4.8.1-arduino5", tools[idx].String())
156-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/avr-gcc/4.8.1-arduino5")
157-
idx++
158-
require.Equal(t, "arduino:avr-gcc@4.8.1-arduino5", tools[idx].String())
159-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "tools_builtin/avr")
160-
idx++
161-
require.Equal(t, ":avrdude@6.0.1-arduino5", tools[idx].String())
162-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/avrdude/6.0.1-arduino5")
163-
idx++
164-
require.Equal(t, "arduino:avrdude@6.0.1-arduino5", tools[idx].String())
165-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "tools_builtin/avr")
166-
idx++
167-
require.Equal(t, ":bossac@1.5-arduino", tools[idx].String())
168-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/bossac/1.5-arduino")
169-
idx++
170-
require.Equal(t, ":bossac@1.6.1-arduino", tools[idx].String())
171-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), tools[idx].InstallDir.String(), "downloaded_tools/bossac/1.6.1-arduino")
172-
idx++
173-
require.Equal(t, ":ctags@5.8-arduino11", tools[idx].String())
174-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_tools/ctags/5.8-arduino11")
175-
idx++
176-
require.Equal(t, "arduino:openocd@0.9.0-arduino", tools[idx].String())
177-
requireEquivalentPaths(t, tools[idx].InstallDir.String(), "downloaded_board_manager_stuff/arduino/tools/openocd/0.9.0-arduino")
178-
}
179-
180-
func TestAllToolsContextIsPopulated(t *testing.T) {
181-
pmb := packagemanager.NewBuilder(nil, nil, nil, nil, "")
182-
pmb.LoadHardwareFromDirectories(paths.NewPathList("downloaded_board_manager_stuff"))
183-
pmb.LoadToolsFromBundleDirectory(paths.New("downloaded_tools", "tools_builtin"))
184-
pm := pmb.Build()
185-
pme, release := pm.NewExplorer()
186-
defer release()
187-
188-
ctx := &types.Context{
189-
PackageManager: pme,
190-
}
191-
192-
require.NotEmpty(t, ctx.PackageManager.GetAllInstalledToolsReleases())
193-
}

‎legacy/builder/test/try_build_of_problematic_sketch_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ import (
2727
"github.com/stretchr/testify/require"
2828
)
2929

30-
// This is a sketch that fails to build on purpose
31-
//func TestTryBuild016(t *testing.T) {
32-
// tryBuild(t, paths.New("sketch_that_checks_if_SPI_has_transactions_and_includes_missing_Ethernet", "sketch.ino"))
33-
//}
34-
30+
// TODO add them in the compile_4
3531
func TestTryBuild033(t *testing.T) {
3632
tryBuild(t, paths.New("sketch_that_includes_arduino_h", "sketch_that_includes_arduino_h.ino"))
3733
}

‎legacy/builder/test/unused_compiled_libraries_remover_test.go

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.