This is an automated email from the ASF dual-hosted git repository.

sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit 31fd989a627e6eb6959113c77b2747e6c8024a35
Author: Szymon Janc <[email protected]>
AuthorDate: Fri Oct 9 15:11:27 2026 +0200

    newt/cli: Fix matching unit tests of a package
    
    Unit test packages were matched by plain name prefix, so testing
    e.g. sys/log also ran tests from sys/logcfg. Require a path
    separator after the package name.
    
    Assisted-by: Claude:claude-opus-5-5
---
 newt/cli/build_cmds.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newt/cli/build_cmds.go b/newt/cli/build_cmds.go
index 406080fa..1b080bad 100644
--- a/newt/cli/build_cmds.go
+++ b/newt/cli/build_cmds.go
@@ -93,7 +93,7 @@ func pkgToUnitTests(pack *pkg.LocalPackage) 
[]*pkg.LocalPackage {
        result := []*pkg.LocalPackage{}
        for p, _ := range testablePkgs() {
                if p.Type() == pkg.PACKAGE_TYPE_UNITTEST &&
-                       strings.HasPrefix(p.FullName(), pack.FullName()) {
+                       strings.HasPrefix(p.FullName(), pack.FullName()+"/") {
 
                        result = append(result, p)
                }

Reply via email to