Commit de5ac235 authored by Cristian Maglie's avatar Cristian Maglie

UploadsTests: go back to previous working directory after test

parent 66ce6f84
......@@ -521,7 +521,12 @@ func TestCompileCommands(t *testing.T) {
require.True(t, paths.New(test1).Join("Test1.arduino.avr.nano.hex").Exist())
// Build sketch with --output path
{
pwd, err := os.Getwd()
require.NoError(t, err)
defer func() { require.NoError(t, os.Chdir(pwd)) }()
require.NoError(t, os.Chdir(tmp))
exitCode, d = executeWithArgs(t, "compile", "-b", "arduino:avr:nano", "-o", "test", test1)
require.Zero(t, exitCode, "exit code")
require.Contains(t, string(d), "Sketch uses")
......@@ -542,6 +547,7 @@ func TestCompileCommands(t *testing.T) {
require.Zero(t, exitCode, "exit code")
require.Contains(t, string(d), "Sketch uses")
require.True(t, paths.New("anothertest", "test2.hex").Exist())
}
}
func TestInvalidCoreURL(t *testing.T) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment