facebookarchive / xctool

An extension for Apple's xcodebuild that makes it easier to test iOS and macOS apps.
Apache License 2.0
6.91k stars 737 forks source link

Run-test error #557

Closed Pluto-Y closed 9 years ago

Pluto-Y commented 9 years ago

This is what i got just now: === RUN-TESTS ===

[Info] Collecting info for testables... (1032 ms) 2015-08-19 12:41:01.246 xctool[83949:2121785] ** Assertion failure in cpu_type_t CpuTypeForTestBundleAtPath(NSString __strong)(), /tmp/xctool20150609-68762-h8zitt/xctool-0.2.4/xctool/xctool/XCToolUtil.m:877

2015-08-19 12:41:01.377 xctool[83949:2121785] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Bundle's executable code doesn't support nor i386, nor x86_64 CPU types. Bundle path: /Users/chipsea/Desktop/jenkins/workspace/scale_ios/build/Debug-iphoneos/btWeighTests.xctest, supported cpu types: ( 12, 16777228 ).' * First throw call stack: ( 0 CoreFoundation 0x00007fff8c47603c exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff8c10876e objc_exception_throw + 43 2 CoreFoundation 0x00007fff8c475e1a +[NSException raise:format:arguments:] + 106 3 Foundation 0x00007fff9034c753 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 169 4 xctool 0x000000010ca49316 CpuTypeForTestBundleAtPath + 577 5 xctool 0x000000010ca4b2f9 -[OCUnitTestRunner initWithBuildSettings:focusedTestCases:allTestCases:arguments:environment:freshSimulator:resetSimulator:freshInstall:testTimeout:reporters:] + 493 6 xctool 0x000000010ca5abcf 158-[RunTestsAction blockForTestable:focusedTestCases:allTestCases:testableExecutionInfo:testableTarget:isApplicationTest:arguments:environment:testRunnerClass:]_block_invoke + 195 7 xctool 0x000000010ca5c991 __56-[RunTestsAction runTestables:options:xcodeSubjectInfo:]_block_invoke400 + 336 8 xctool 0x000000010ca5c142 -[RunTestsAction runTestables:options:xcodeSubjectInfo:] + 4913 9 xctool 0x000000010ca5a146 -[RunTestsAction performActionWithOptions:xcodeSubjectInfo:] + 1214 10 xctool 0x000000010ca44664 -[XCTool run] + 3329 11 xctool 0x000000010ca42fb3 main + 819 12 xctool 0x000000010ca401c4 start + 52 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6

The command line: xctool -project btWeigh.xcodeproj -scheme btWeighTests run-tests OBJROOT=build SYMROOT=build CONFIGURATION_BUILD_DIR=build/Debug-iphoneos -configuration Debug -sdk iphoneos8.4

ExtremeMan commented 9 years ago

We don't support running tests on real devices (see https://github.com/facebook/xctool/issues/326). You are building your project with iphoneos8.4 sdk that is why xctool fails. Replace with -sdk iphonesimulator and it should work!

ExtremeMan commented 9 years ago

Closing since author didn't appear here anymore. Please open new one issue if you still see a problem and provide requested details to help us debug a problem.