Open lengyue524 opened 4 years ago
I have the same problem. I run the following command
xctool -workspace <path_to_workspace> -scheme <scheme_name> run-tests
But it always fails with the same error:
2020-07-01 10:16:36.000 xctool[89275:876917] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed while trying to gather build settings for your scheme; tried with actions: build, test, analyze. Errors above occured while running xcodebuild -showBuildSettings:
dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find:
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find:
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: stat() failed with errno=1
.
dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find:
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find:
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: stat() failed with errno=1
.
dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find:
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find:
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: stat() failed with errno=1
However, when I run the tests using xcodebuild the tests run as expected:
xcodebuild -workspace <path_to_workspace> -scheme <scheme_name test
Does anyone have a solution on how to run the tests using xctool
?
having the same issue as above with xcode 11 + Catalina. Has anyone figured it out?
run-tests get error: how to fix it? xcode 11 xctool version 0.3.7
xctool -workspace utProj.xcworkspace -scheme utProj run-tests
`[Info] Loading settings for scheme 'utProj' ...2020-06-10 17:54:16.075 xctool[46763:727865] *** Assertion failure in -[XcodeSubjectInfo buildSettingsForATarget], /tmp/xctool-20191211-22218-1r1jst1/xctool-0.3.7/xctool/xctool/XcodeSubjectInfo.m:853
2020-06-10 17:54:16.210 xctool[46763:727865] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed while trying to gather build settings for your scheme; tried with actions: build, test, analyze. Errors above occured while running xcodebuild -showBuildSettings: dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find: /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find: /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: stat() failed with errno=1 . dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find: /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find: /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: stat() failed with errno=1 . dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find: /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) dyld: warning: could not load inserted library '/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib' into hardened process because no suitable image found. Did find: /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: code signature in (/usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /usr/local/Cellar/xctool/0.3.7/libexec/lib/xcodebuild-fastsettings-shim.dylib: stat() failed with errno=1 . ' First throw call stack: ( 0 CoreFoundation 0x00007fff3662dbe7 __exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6f4055bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff36656d98 +[NSException raise:format:arguments:] + 88 3 Foundation 0x00007fff38d45e9d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191 4 xctool 0x000000010c4a8675 -[XcodeSubjectInfo buildSettingsForATarget] + 1182 5 xctool 0x000000010c4a948f -[XcodeSubjectInfo loadSubjectInfo] + 107 6 xctool 0x000000010c493268 -[Options validateAndReturnXcodeSubjectInfo:errorMessage:] + 3368 7 xctool 0x000000010c4838f0 -[XCTool run] + 2538 8 xctool 0x000000010c482547 main + 1506 9 xctool 0x000000010c47cbd4 start + 52 10 ??? 0x0000000000000006 0x0 + 6 ) libc++abi.dylib: terminating with uncaught exception of type NSException [1] 46763 abort xctool -workspace utProj.xcworkspace -scheme utProj run-tests`