You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2026/10/26 14:07:59 UTC

(mynewt-newt) branch master updated: newt/toolchain: Fix missing deps file test on Windows

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


The following commit(s) were added to refs/heads/master by this push:
     new 54950116 newt/toolchain: Fix missing deps file test on Windows
54950116 is described below

commit 549501169d81280e98a53d49023e12c624fb58b1
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Sat Oct 24 17:50:45 2026 +0200

    newt/toolchain: Fix missing deps file test on Windows
    
    Project base path always uses forward slashes, but the test used the
    native temporary directory path as compiler base directory. On
    Windows the source path prefix was not stripped and the object path
    ended up containing a drive letter, e.g. "...\bin\C:".
    
    Same issue as fixed for TestCompileRequiredCorruptDepsFile.
    
    Assisted-by: Claude:claude-opus-5-5
---
 newt/toolchain/deps_test.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/newt/toolchain/deps_test.go b/newt/toolchain/deps_test.go
index a98070dd..eb0f756a 100644
--- a/newt/toolchain/deps_test.go
+++ b/newt/toolchain/deps_test.go
@@ -186,7 +186,8 @@ func TestCompileGeneratesDepsFile(t *testing.T) {
 // An object file without dependency file (e.g., built by an older newt) must
 // be rebuilt, as it is not known which headers it depends on.
 func TestCompileRequiredMissingDepsFile(t *testing.T) {
-	dir := t.TempDir()
+	// Project base path always uses forward slashes.
+	dir := filepath.ToSlash(t.TempDir())
 	c := newTestCompiler()
 	c.ccPath = "cc"
 	c.baseDir = dir