You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/03/15 01:26:39 UTC

[03/50] [abbrv] incubator-mynewt-newt git commit: Fix testing of remote packages.

Fix testing of remote packages.


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/de61a049
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/de61a049
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/de61a049

Branch: refs/heads/master
Commit: de61a049a26680b42fce681183551e6a8cc9957f
Parents: 21aa917
Author: Christopher Collins <cc...@apache.org>
Authored: Fri Mar 11 13:47:35 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Fri Mar 11 13:47:35 2016 -0800

----------------------------------------------------------------------
 newt/builder/build.go  |  2 ++
 newt/cli/build_cmds.go | 10 +++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/de61a049/newt/builder/build.go
----------------------------------------------------------------------
diff --git a/newt/builder/build.go b/newt/builder/build.go
index c53133d..a0af1c1 100644
--- a/newt/builder/build.go
+++ b/newt/builder/build.go
@@ -481,6 +481,8 @@ func (b *Builder) Test(p *pkg.LocalPackage) error {
 		return err
 	}
 
+	util.StatusMessage(util.VERBOSITY_DEFAULT, "Executing test: %s\n",
+		testFilename)
 	if _, err := util.ShellCommand(testFilename); err != nil {
 		return util.NewNewtError("Test failure: " + err.Error())
 	}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/de61a049/newt/cli/build_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/build_cmds.go b/newt/cli/build_cmds.go
index 307a094..f83b170 100644
--- a/newt/cli/build_cmds.go
+++ b/newt/cli/build_cmds.go
@@ -168,10 +168,14 @@ func testRunCmd(cmd *cobra.Command, args []string) {
 
 		// The package under test needs to be resolved again now that the
 		// project has been reset.
-		pack, err = ResolvePackage(pack.Name())
-		if err == nil {
-			err = b.Test(pack)
+		newPack, err := ResolvePackage(pack.FullName())
+		if err != nil {
+			NewtUsage(nil, util.NewNewtError("Failed to resolve package: "+
+				pack.Name()))
 		}
+		pack = newPack
+
+		err = b.Test(pack)
 		if err == nil {
 			passedPkgs = append(passedPkgs, pack)
 		} else {