File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,18 @@ func FindRepositoryRootPath(t *testing.T) *paths.Path {
47
47
return repoRootPath
48
48
}
49
49
50
+ // FindArduinoCLIPath returns the path to the arduino-cli executable
51
+ func FindArduinoCLIPath (t * testing.T ) * paths.Path {
52
+ return FindRepositoryRootPath (t ).Join ("arduino-cli" )
53
+ }
54
+
50
55
// CreateArduinoCLIWithEnvironment performs the minimum amount of actions
51
56
// to build the default test environment.
52
57
func CreateArduinoCLIWithEnvironment (t * testing.T ) (* Environment , * ArduinoCLI ) {
53
58
env := NewEnvironment (t )
54
59
55
60
cli := NewArduinoCliWithinEnvironment (env , & ArduinoCLIConfig {
56
- ArduinoCLIPath : FindRepositoryRootPath ( t ). Join ( "arduino-cli" ),
61
+ ArduinoCLIPath : FindArduinoCLIPath ( t ),
57
62
UseSharedStagingFolder : true ,
58
63
})
59
64
Original file line number Diff line number Diff line change @@ -23,8 +23,11 @@ import (
23
23
)
24
24
25
25
func TestCacheClean (t * testing.T ) {
26
- // Clean the cache under arduino caching file directory which is "<Arduino configure file path>/staging"
27
- env , cli := integrationtest .CreateArduinoCLIWithEnvironment (t )
26
+ // This test do not use shared download directory becuase it will be cleaned up with 'cache clean' command
27
+ env := integrationtest .NewEnvironment (t )
28
+ cli := integrationtest .NewArduinoCliWithinEnvironment (env , & integrationtest.ArduinoCLIConfig {
29
+ ArduinoCLIPath : integrationtest .FindArduinoCLIPath (t ),
30
+ })
28
31
defer env .CleanUp ()
29
32
30
33
_ , _ , err := cli .Run ("cache" , "clean" )
You can’t perform that action at this time.
0 commit comments