Skip to content

Commit aa62661

Browse files
authored
[skip-changelog] Fixed integration test (#2895)
1. Fix ArduinoIoTCloud version to 2.4.1 (the latest versions have fewer files and do not trigger the objs.a creation) 2. Merge two parallel tests because they actually need to be performed sequentially since we are checking that the compiled artifacts on the former are reused on the latter.
1 parent 36a4190 commit aa62661

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/integrationtest/compile_1/compile_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,9 @@ func TestCompileWithArchivesAndLongPaths(t *testing.T) {
850850
require.NoError(t, err)
851851

852852
// Install test library
853-
_, _, err = cli.Run("lib", "install", "ArduinoIoTCloud", "--config-file", "arduino-cli.yaml")
853+
// (We must use ArduinoIOTCloud@2.4.1 because it has a folder with a lot of files
854+
// that will trigger the creation of an objs.a archive)
855+
_, _, err = cli.Run("lib", "install", "ArduinoIoTCloud@2.4.1", "--config-file", "arduino-cli.yaml")
854856
require.NoError(t, err)
855857

856858
stdout, _, err := cli.Run("lib", "examples", "ArduinoIoTCloud", "--json", "--config-file", "arduino-cli.yaml")
@@ -859,12 +861,10 @@ func TestCompileWithArchivesAndLongPaths(t *testing.T) {
859861
sketchPath := paths.New(libOutput)
860862
sketchPath = sketchPath.Join("examples", "ArduinoIoTCloud-Advanced")
861863

862-
t.Run("Compile", func(t *testing.T) {
864+
t.Run("CheckCachingOfFolderArchives", func(t *testing.T) {
863865
_, _, err = cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml")
864866
require.NoError(t, err)
865-
})
866867

867-
t.Run("CheckCachingOfFolderArchives", func(t *testing.T) {
868868
// Run compile again and check if the archive is re-used (cached)
869869
out, _, err := cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml", "-v")
870870
require.NoError(t, err)

0 commit comments

Comments
 (0)