aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/errors_test.go
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-07-17 03:23:59 -0700
committerTobias Bosch <tbosch@google.com>2019-07-18 08:23:16 +0000
commit22c32b40be54a9e4062655f90908f98b11e73966 (patch)
treec9cba15f22bafea60a69a676936de944df81290f /compiler_wrapper/errors_test.go
parent0fc0acdd69e58273ba8987cba9afac2304454561 (diff)
downloadtoolchain-utils-22c32b40be54a9e4062655f90908f98b11e73966.tar.gz
Add json mapping for command and commandResult.
Also exports the fields on these structs so that json can read/write them. BUG=chromium:773875 TEST=unit test Change-Id: I0efead41693dd35548738a0b3a3e5c71c97c319c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1706790 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Tobias Bosch <tbosch@google.com>
Diffstat (limited to 'compiler_wrapper/errors_test.go')
-rw-r--r--compiler_wrapper/errors_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler_wrapper/errors_test.go b/compiler_wrapper/errors_test.go
index 29c941df..979f2d33 100644
--- a/compiler_wrapper/errors_test.go
+++ b/compiler_wrapper/errors_test.go
@@ -50,7 +50,7 @@ func TestSubprocessExitCodeError(t *testing.T) {
}
func TestSubprocessCCacheError(t *testing.T) {
- _, err := wrapSubprocessErrorWithSourceLoc(&command{path: "/usr/bin/ccache"}, syscall.ENOENT)
+ _, err := wrapSubprocessErrorWithSourceLoc(&command{Path: "/usr/bin/ccache"}, syscall.ENOENT)
if _, ok := err.(userError); !ok {
t.Errorf("unexpected error type. Got: %T", err)
}
@@ -60,7 +60,7 @@ func TestSubprocessCCacheError(t *testing.T) {
}
func TestSubprocessGeneralError(t *testing.T) {
- cmd := &command{path: "somepath"}
+ cmd := &command{Path: "somepath"}
_, err := wrapSubprocessErrorWithSourceLoc(cmd, errors.New("someerror"))
if err.Error() != fmt.Sprintf("errors_test.go:64: failed to execute %#v: someerror", cmd) {
t.Errorf("Error message incorrect. Got: %s", err.Error())