1

it's very strange, when i set the "test after build" to "yes" in "build settings", the project can't build successfully. but set to "no" , I press the "CMD+U" in keyboard, the test can executes successfully.

i want to run the UT cases in jenkins, so i must set the "test after build" to "yes". or input TEST_AFTER_BUILD=YES in command line, but both of them all failed, when i building the project.

I had excuted 20 cases, the 10 of them were failed when i had set the "test after build" to yes. if i set the "test after build" to "no" first, execute the cases from xcode and press the "CMD+U" in keyboard, all of 20 cases were passed.

Any ideas?

thank you,

Siro

Jasper Blues
  • 28,258
  • 22
  • 102
  • 185
Siro
  • 21
  • 3
  • What is the build error? – Jasper Blues May 25 '13 at 11:14
  • the build error is: i had excuted 20 cases, the 10 of them were failed when i had set the "test after build" to yes. if i set the "test after build" to "no" first, execute the cases from xcode and press the "CMD+U" in keyboard, all of 20 cases were passed. – Siro May 26 '13 at 12:38
  • Anything to do with documents directory or loading resources? – Jasper Blues May 26 '13 at 16:02
  • i have checked the target's dependence and import library, it's no problem.but the case invoke method will connect the internet and use multithreading, whether it isn't has enough time to run the invoked method? – Siro May 28 '13 at 03:08

1 Answers1

1

Taking a stab in the dark, since we don't have the build error as yet:

When you set TEST_AFTER_BUILD to YES, you usually have to also set BUILD_ACTIVE_ARCHITECTURE_ONLY to 'NO' and add x86_64 to the valid architectures.

I have an example of a build script that produces test reports, code coverage, api docs, etc here:

Jasper Blues
  • 28,258
  • 22
  • 102
  • 185