From 73056e9aa69d9d75a441150a40c36cd6349946df Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 22 Apr 2025 13:07:18 +0200 Subject: [PATCH] Fixed integration test 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. --- internal/integrationtest/compile_1/compile_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/integrationtest/compile_1/compile_test.go b/internal/integrationtest/compile_1/compile_test.go index fb726bc5c12..b380f563ccc 100644 --- a/internal/integrationtest/compile_1/compile_test.go +++ b/internal/integrationtest/compile_1/compile_test.go @@ -850,7 +850,9 @@ func TestCompileWithArchivesAndLongPaths(t *testing.T) { require.NoError(t, err) // Install test library - _, _, err = cli.Run("lib", "install", "ArduinoIoTCloud", "--config-file", "arduino-cli.yaml") + // (We must use ArduinoIOTCloud@2.4.1 because it has a folder with a lot of files + // that will trigger the creation of an objs.a archive) + _, _, err = cli.Run("lib", "install", "ArduinoIoTCloud@2.4.1", "--config-file", "arduino-cli.yaml") require.NoError(t, err) stdout, _, err := cli.Run("lib", "examples", "ArduinoIoTCloud", "--json", "--config-file", "arduino-cli.yaml") @@ -859,12 +861,10 @@ func TestCompileWithArchivesAndLongPaths(t *testing.T) { sketchPath := paths.New(libOutput) sketchPath = sketchPath.Join("examples", "ArduinoIoTCloud-Advanced") - t.Run("Compile", func(t *testing.T) { + t.Run("CheckCachingOfFolderArchives", func(t *testing.T) { _, _, err = cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml") require.NoError(t, err) - }) - t.Run("CheckCachingOfFolderArchives", func(t *testing.T) { // Run compile again and check if the archive is re-used (cached) out, _, err := cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml", "-v") require.NoError(t, err)