2014-01-06 48 views
0

我試圖從命令行運行GHUnitTest例。 以下所有步驟從Here無法從命令行運行GHUnit測試

我的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:*沒有規則使目標`測試'。停止>

如何解決它。 Plz幫助

回答

0

我想你可能只是從錯誤的目錄運行「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 然後

cd ~/ios/app/MyApp 

then

make test