You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/04/28 02:09:32 UTC
[05/32] incubator-mynewt-newt git commit: Fix bug: test failure
details not displayed.
Fix bug: test failure details not displayed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/668f44ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/668f44ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/668f44ef
Branch: refs/heads/master
Commit: 668f44ef64c1d1164ca72900679db17e73729af5
Parents: 3b6ebe4
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Mar 24 21:18:48 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Mar 24 21:34:55 2016 -0700
----------------------------------------------------------------------
newt/Godeps/Godeps.json | 12 ++++++------
newt/builder/build.go | 6 +++++-
newt/cli/build_cmds.go | 2 ++
newt/vendor/mynewt.apache.org/newt/util/util.go | 2 +-
util/util.go | 2 +-
5 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/668f44ef/newt/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/newt/Godeps/Godeps.json b/newt/Godeps/Godeps.json
index 461731b..4f50a6e 100644
--- a/newt/Godeps/Godeps.json
+++ b/newt/Godeps/Godeps.json
@@ -57,18 +57,18 @@
},
{
"ImportPath": "mynewt.apache.org/newt/util",
- "Comment": "mynewt_0_8_0_b2_tag-8-g1f5bf0b",
- "Rev": "1f5bf0b3307517a0e848208077a83557c0550f5f"
+ "Comment": "mynewt_0_8_0_b2_tag-7-gaefa8ee",
+ "Rev": "aefa8eec5364a27fe2587d17e02a0291dfe8963a"
},
{
"ImportPath": "mynewt.apache.org/newt/viper",
- "Comment": "mynewt_0_8_0_b2_tag-8-g1f5bf0b",
- "Rev": "1f5bf0b3307517a0e848208077a83557c0550f5f"
+ "Comment": "mynewt_0_8_0_b2_tag-7-gaefa8ee",
+ "Rev": "aefa8eec5364a27fe2587d17e02a0291dfe8963a"
},
{
"ImportPath": "mynewt.apache.org/newt/yaml",
- "Comment": "mynewt_0_8_0_b2_tag-8-g1f5bf0b",
- "Rev": "1f5bf0b3307517a0e848208077a83557c0550f5f"
+ "Comment": "mynewt_0_8_0_b2_tag-7-gaefa8ee",
+ "Rev": "aefa8eec5364a27fe2587d17e02a0291dfe8963a"
}
]
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/668f44ef/newt/builder/build.go
----------------------------------------------------------------------
diff --git a/newt/builder/build.go b/newt/builder/build.go
index 74711f2..1e82f7b 100644
--- a/newt/builder/build.go
+++ b/newt/builder/build.go
@@ -20,6 +20,7 @@
package builder
import (
+ "fmt"
"os"
"path/filepath"
@@ -478,7 +479,10 @@ func (b *Builder) Test(p *pkg.LocalPackage) error {
util.StatusMessage(util.VERBOSITY_DEFAULT, "Executing test: %s\n",
testFilename)
if _, err := util.ShellCommand(testFilename); err != nil {
- return util.NewNewtError("Test failure: " + err.Error())
+ newtError := err.(*util.NewtError)
+ newtError.Text = fmt.Sprintf("Test failure (%s):\n%s", p.Name(),
+ newtError.Text)
+ return newtError
}
return nil
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/668f44ef/newt/cli/build_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/build_cmds.go b/newt/cli/build_cmds.go
index ba3faf6..1159a62 100644
--- a/newt/cli/build_cmds.go
+++ b/newt/cli/build_cmds.go
@@ -183,6 +183,8 @@ func testRunCmd(cmd *cobra.Command, args []string) {
if err == nil {
passedPkgs = append(passedPkgs, pack)
} else {
+ newtError := err.(*util.NewtError)
+ util.StatusMessage(util.VERBOSITY_QUIET, newtError.Text)
failedPkgs = append(failedPkgs, pack)
}
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/668f44ef/newt/vendor/mynewt.apache.org/newt/util/util.go
----------------------------------------------------------------------
diff --git a/newt/vendor/mynewt.apache.org/newt/util/util.go b/newt/vendor/mynewt.apache.org/newt/util/util.go
index d8a1a9a..75fc5f0 100644
--- a/newt/vendor/mynewt.apache.org/newt/util/util.go
+++ b/newt/vendor/mynewt.apache.org/newt/util/util.go
@@ -286,7 +286,7 @@ func ShellCommand(cmdStr string) ([]byte, error) {
o, err := cmd.CombinedOutput()
log.Debugf("o=%s", string(o))
if err != nil {
- return o, NewNewtError(err.Error())
+ return o, NewNewtError(string(o))
} else {
return o, nil
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/668f44ef/util/util.go
----------------------------------------------------------------------
diff --git a/util/util.go b/util/util.go
index d8a1a9a..75fc5f0 100644
--- a/util/util.go
+++ b/util/util.go
@@ -286,7 +286,7 @@ func ShellCommand(cmdStr string) ([]byte, error) {
o, err := cmd.CombinedOutput()
log.Debugf("o=%s", string(o))
if err != nil {
- return o, NewNewtError(err.Error())
+ return o, NewNewtError(string(o))
} else {
return o, nil
}