0

我正在尝试从命令行运行 GHUnitTest 案例。按照这里的所有步骤

我的 GHUnitTest 目标名称是GHUnitTests. 我在命令行上使用以下脚本

default: 

\# Set default make action here

\# xcodebuild -target GHUnitTests -configuration MyMainTarget -sdk iphonesimulator build
clean:
-rm -rf build/* 
test:  GHUNIT_CLI=1 xcodebuild -target GHUnitTests -configuration Debug -sdk iphonesimulator build`

$ make test在终端上运行它。但总是出现以下错误。

make: *没有规则使目标“测试”。停止。>

如何修复它。请帮忙

4

1 回答 1

0

我认为您可能只是从错误的目录运行“make test”。

让“make test”工作的第一步是在你的项目目录中,在你的 Makefile 旁边。

你的makefile应该看起来像这样(我在你的例子中看到它): https ://github.com/gh-unit/gh-unit/blob/master/Project-iOS/Makefile.example

如果您的项目目录是~/ios/app/MyApp/,那么您应该将 Makefile 保存到~/ios/app/MyApp/Makefile then

cd ~/ios/app/MyApp

然后

make test
于 2014-09-25T00:17:51.880 回答