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 2015/11/21 00:38:01 UTC
incubator-mynewt-newt git commit: Export 'selftest' identity for
target test cmd.
Repository: incubator-mynewt-newt
Updated Branches:
refs/heads/master 38dc3a5ee -> e5b282f9a
Export 'selftest' identity for target test cmd.
This is necessary for distinguishing between a package test and a test project.
For a test project, the project supplies the dependencies which satisfy the
capability requirements. For a package test, there is no project, so the egg
itself needs to specify which dependencies to use.
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/e5b282f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/e5b282f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/e5b282f9
Branch: refs/heads/master
Commit: e5b282f9a46dc9c905bf5e1be4fadc62f3725a6d
Parents: 38dc3a5
Author: Christopher Collins <cc...@gmail.com>
Authored: Fri Nov 20 15:36:19 2015 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Fri Nov 20 15:36:19 2015 -0800
----------------------------------------------------------------------
cli/clutch.go | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e5b282f9/cli/clutch.go
----------------------------------------------------------------------
diff --git a/cli/clutch.go b/cli/clutch.go
index 273c984..3d59fc3 100644
--- a/cli/clutch.go
+++ b/cli/clutch.go
@@ -685,8 +685,11 @@ func (clutch *Clutch) testsExist(egg *Egg) error {
func (clutch *Clutch) Test(t *Target, eggName string,
exitOnFailure bool) error {
- // The 'test' identity is implicitly exported during a package test.
- t.Identities["test"] = "test";
+ // A few identities are implicitly exported when the test command is used:
+ // * test: ensures that the test code gets compiled.
+ // * selftest: indicates that there is no project
+ t.Identities["test"] = "test"
+ t.Identities["selftest"] = "selftest"
egg, err := clutch.ResolveEggName(eggName)
if err != nil {