新手问题 编译 TextMate 报错,/test_scm.run test_scm: 1 of 32 tests failed。

匿名 · 2014年11月05日 · 最后由 acaby 回复于 2015年08月24日 · 2266 次阅读

首先请相信我,我发帖提问前,认真读过分析过我的报错信息,但是实在是新手。

一步一步照着https://github.com/textmate/textmate README 做的。

本机环境:硬件:MacBookAir 2014 软件:Mac OS X 10.10 Yosemite(AppStore 上的所有软件都已更新至最新,包括 Xcode,command line tools 等)

回顾安装过程如下: 1⃣️ 安装 brew:ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2⃣️安装 prerequires:brew install ninja ragel boost multimarkdown hg capnp proctools 3⃣️编译:$ git submodule update --init
$ ./configure && ninja

然后就报错了,报错如下:

[772/1058] Run test ‘/Users/wutuofu/...TextMate/Frameworks/scm/test_scm’… FAILED: /Users/wutuofu/build/TextMate/Frameworks/scm/test_scm && touch /Users/wutuofu/build/TextMate/Frameworks/scm/test_scm.run test_scm: 1 of 32 tests failed: /Users/wutuofu/textmate_complied_x_10.10/Frameworks/scm/tests/t_git.cc:142: Expected (wc.status("folder") == scm::status::deleted), found (clean != deleted) [772/1058] Compile ‘Frameworks/theme/src/theme.cc’… ninja: build stopped: subcommand failed.

因为是刚买的 Mac,好多东西都不知道,所以请问,是不是少了什么 library,导致那个 test-scm 失败,然后 ninja 不能编译?

下编译好的版本吧 https://github.com/textmate/textmate/releases


如果想自己编译,我的机器上 test_scm 也总有问题,有可能是因为作者 git 的版本和大家的不同...

试试修改 Frameworks/scm/tests/t_git.cc , 把第 13 行改成 (加了个 mkdir -p)

std::string const script = text::format("{ cd '%1$s' && '%2$s' init && mkdir -p .git/info && '%2$s' config user.email '[email protected]' && '%2$s' config user.name 'Test Test' && touch .dummy && '%2$s' add .dummy && '%2$s' commit .dummy -mGetHead && %3$s ; } >/dev/null", jail.path().c_str(), git.c_str(), cmd.c_str());

虽然是坟贴. 测试部分好多都依赖 Frameworks/network/tests/t_download.cc 这个 当碰到网络不稳定就失败了. bin/gem_build里把run test 的部分都注释掉就好了。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号