8000 Fixed integration test by cmaglie · Pull Request #2895 · arduino/arduino-cli · GitHub
[go: up one dir, main page]

Skip to content

Fixed integration test #2895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
cmaglie committed Apr 22, 2025
commit 73056e9aa69d9d75a441150a40c36cd6349946df
8 changes: 4 additions & 4 deletions internal/integrationtest/compile_1/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down
0