Route the output of an XCode run script phase to the XCode console?
Route the output of an XCode run script phase to the XCode console?
- Subject: Route the output of an XCode run script phase to the XCode console?
- From: Per Bull Holmen <email@hidden>
- Date: Thu, 05 Apr 2012 13:39:59 +0200
Hi
I am trying out a new framework for Unit tests, that builds and
executable file that runs the actual tests. This works fine when I
just want to run the unit tests. Anyway, I would also like to generate
test coverage files using gcov. I have made it work, but not exactly
the way I wanted. Many required xcode variables doesn't seem available
in the Run action in the scheme, so I had to move the actual running
of the unit tests into a Run Script build phase instead. This is what
the run script phase now looks like:
#Run tests and store results into path/to/source-files/TestReport
"${CONFIGURATION_BUILD_DIR}/${EXECUTABLE_NAME}" # >
"${SRCROOT}/${TARGET_NAME}/TestReport"
#Run gcov and store results into directory at path/to/source-files/Coverage
mkdir -p "${SRCROOT}/${TARGET_NAME}/Coverage"
pushd "${SRCROOT}/${TARGET_NAME}/Coverage"
gcov -o ${OBJECT_FILE_DIR_normal}/i386 ${OBJECT_FILE_DIR_normal}/i386/*.gcda
popd
It is this line....
"${CONFIGURATION_BUILD_DIR}/${EXECUTABLE_NAME}" # >
"${SRCROOT}/${TARGET_NAME}/TestReport"
.... that I'd like to change a bit. Currently, I can route the output
to a file, or to the build log. I would like, for convenience, to also
be able to route it right to the xcode console, the one where you get
the outputs of executables run the "normal way". I have virtually no
experience with shell commands and scripts, so I am quite astonished I
have even gotten this far. So, can anyone help me on this last step,
to get the output right to the xcode console instead? Alternatively,
is there another way of doing this you would recommend more?
Per
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden