Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 373e871

Browse files
committed
Added integration test
1 parent 916e795 commit 373e871

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎internal/integrationtest/compile_1/compile_test.go‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"encoding/json"
2222
"fmt"
2323
"os"
24+
"regexp"
2425
"sort"
2526
"strings"
2627
"testing"
@@ -830,8 +831,17 @@ func TestCompileWithArchivesAndLongPaths(t *testing.T) {
830831
sketchPath := paths.New(libOutput)
831832
sketchPath = sketchPath.Join("examples", "ArduinoIoTCloud-Advanced")
832833

833-
_, _, err = cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml")
834-
require.NoError(t, err)
834+
t.Run("Compile", func(t *testing.T) {
835+
_, _, err = cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml")
836+
require.NoError(t, err)
837+
})
838+
839+
t.Run("CheckCachingOfFolderArchives", func(t *testing.T) {
840+
// Run compile again and check if the archive is re-used (cached)
841+
out, _, err := cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml", "-v")
842+
require.NoError(t, err)
843+
require.True(t, regexp.MustCompile(`(?m)^Using previously compiled file:.*libraries.ArduinoIoTCloud.objs\.a$`).Match(out))
844+
})
835845
}
836846

837847
func TestCompileWithPrecompileLibrary(t *testing.T) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /