当前位置: 首页> 汽车> 车展 > 拷贝别人编译好的的aosp后自己编译报错FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks

拷贝别人编译好的的aosp后自己编译报错FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks

时间:2025/7/9 18:24:58来源:https://blog.csdn.net/ss55567/article/details/141718031 浏览次数: 0次

在使用scp -r拷贝别人的sdk后编译无法通过pathtools测试,原因是拷贝时把链接也当成了真实的文件或者目录,尤其是拷贝build目录时会残留之前别人编译的文件夹。

FAILED: out/soong/.bootstrap/blueprint-pathtools/test/test.passed
out/soong/.bootstrap/bin/gotestrunner -p ./build/blueprint/pathtools -f out/soong/.bootstrap/blueprint-pathtools/test/test.passed -- out/soong/.bootstrap/blueprint-pathtools/test/test -test.short
--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks (0.00s)--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os (0.00s)--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os/relpath (0.00s)--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os/relpath/. (0.00s)fs_test.go:287: want: [. a a/a], got [. a a/a b b/a c d]--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os/abspath (0.00s)--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os/abspath/. (0.00s)fs_test.go:287: want: [/mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/a /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/a/a], got [/mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/a /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/a/a /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/b /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/b/a /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/c /mnt/rk356x-android11-V1.1.5/build/blueprint/pathtools/testdata/dangling/d]--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os_relative_srcDir (0.00s)--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os_relative_srcDir/relpath (0.00s)--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os_relative_srcDir/relpath/. (0.00s)fs_test.go:287: want: [. a a/a], got [. a a/a b b/a c d]--- FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks/os_relative_srcDir/absp

解决方法,重新拷贝build或者其他提示xxx redefine重定义的文件夹。使用rsync代替scp,或者先压缩再拷贝。

rsync -avz -e ssh /path/to/source user@remote:/path/to/destination

-a 表示归档模式,递归复制,并保持符号链接、权限、时间戳等。
-z 表示压缩数据传输。
-e ssh 指定使用 ssh 作为传输协议。

使用cp时:可以使用 -P 或 --no-dereference 选项。cp 的选项说明-P 或 --no-dereference:这两个选项告诉 cp 在复制符号链接时,不要跟随符号链接指向的目标,而是将符号链接本身复制。

关键字:拷贝别人编译好的的aosp后自己编译报错FAIL: TestFs_ListDirsRecursiveDontFollowSymlinks

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: