Not able to run GHUnit test from command line

130 views Asked by At

I am trying to run GHUnitTest cases from command line. Following all steps from Here

My GHUnitTest target name is GHUnitTests. And I using following script on command line

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`

Runnig it using $ make test on terminal. But getting the following error always.

make: * No rule to make target `test'. Stop.>

How to fix it. Plz help

1

There are 1 answers

0
gjgjgj On

I think you're probably just running "make test" from the wrong directory.

The first step to getting 'make test' to work is to be in your project directory, next to your Makefile.

Your makefile should look something like this (which I see it does in your example): https://github.com/gh-unit/gh-unit/blob/master/Project-iOS/Makefile.example

If your project directory is ~/ios/app/MyApp/, then you should have saved the Makefile to ~/ios/app/MyApp/Makefile then

cd ~/ios/app/MyApp

then

make test