ccollins476ad closed pull request #166: newt test - test all descendent 
packages.
URL: https://github.com/apache/mynewt-newt/pull/166
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/newt/cli/build_cmds.go b/newt/cli/build_cmds.go
index c858e323..38355f24 100644
--- a/newt/cli/build_cmds.go
+++ b/newt/cli/build_cmds.go
@@ -88,11 +88,9 @@ func pkgToUnitTests(pack *pkg.LocalPackage) 
[]*pkg.LocalPackage {
        // Otherwise, return all the package's direct descendants that are unit
        // test packages.
        result := []*pkg.LocalPackage{}
-       srcPath := pack.BasePath()
        for p, _ := range testablePkgs() {
-               dirPath := filepath.ToSlash(filepath.Dir(p.BasePath()))
                if p.Type() == pkg.PACKAGE_TYPE_UNITTEST &&
-                       dirPath == srcPath {
+                       strings.HasPrefix(p.FullName(), pack.FullName()) {
 
                        result = append(result, p)
                }
@@ -383,7 +381,6 @@ func sizeRunCmd(cmd *cobra.Command, args []string, ram 
bool, flash bool, section
 
        var sections []string
 
-
        if ram {
                sections = append(sections, "RAM")
        }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to