Skip to content

Commit 708343b

Browse files
committed
This is not currently needed since there are no patchset to be applied in the current test suite. We'll find an alternative implementation if patching is needed in the future. Fix #147 Signed-off-by: Cristian Maglie <[email protected]>
1 parent faaafbf commit 708343b

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ Once done, run the following commands:
6767
go get github.com/go-errors/errors
6868
go get github.com/stretchr/testify
6969
go get github.com/jstemmer/go-junit-report
70-
go get golang.org/x/codereview/patch
7170
go build arduino.cc/arduino-builder
7271
```
7372

src/arduino.cc/builder/test/helper_tools_downloader.go

+13-9
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import (
3838
"encoding/json"
3939
"fmt"
4040
"github.com/go-errors/errors"
41-
"golang.org/x/codereview/patch"
4241
"io"
4342
"io/ioutil"
4443
"net/http"
@@ -145,14 +144,19 @@ func patchFiles(t *testing.T) {
145144

146145
for _, file := range files {
147146
if filepath.Ext(file.Name()) == ".patch" {
148-
data, err := ioutil.ReadFile(Abs(t, filepath.Join(PATCHES_FOLDER, file.Name())))
149-
NoError(t, err)
150-
patchSet, err := patch.Parse(data)
151-
NoError(t, err)
152-
operations, err := patchSet.Apply(ioutil.ReadFile)
153-
for _, op := range operations {
154-
utils.WriteFileBytes(op.Dst, op.Data)
155-
}
147+
panic("Patching for downloaded tools is not available! (see https://github.com/arduino/arduino-builder/issues/147)")
148+
// XXX: find an alternative to x/codereview/patch
149+
// https://github.com/arduino/arduino-builder/issues/147
150+
/*
151+
data, err := ioutil.ReadFile(Abs(t, filepath.Join(PATCHES_FOLDER, file.Name())))
152+
NoError(t, err)
153+
patchSet, err := patch.Parse(data)
154+
NoError(t, err)
155+
operations, err := patchSet.Apply(ioutil.ReadFile)
156+
for _, op := range operations {
157+
utils.WriteFileBytes(op.Dst, op.Data)
158+
}
159+
*/
156160
}
157161
}
158162
}

0 commit comments

Comments
 (0)