명령 줄을 통해 Xcode 유닛 테스트를 실행하려고합니다. 결국 Jenkins에 CI를 연결합니다. 작업 공간은이 개 프로젝트를 포함Xcode 유닛 테스트를 명령 줄에서 실행하는 중 오류가 발생했습니다.
CommonProject (여러 응용 프로그램에 사용되는 공유 라이브러리)
이 MainProject이
MainProject가 CommonProject에서 라이브러리를 사용을, 그래서 의존성이있다. 각 프로젝트에는 별도의 xcodeproj 파일이 있습니다.
그래서 MainProject와 관련된 단위 테스트를 실행해야합니다. 이 명령을 사용하여 주 프로젝트 디렉토리의 터미널에서 단위 테스트를 실행합니다.
xcodebuild test -scheme MainProject -configuration Debug -sdk iphonesimulator7.0 -destination OS=7.0,name="iPad"
다음과 같은 오류가 발생합니다. 단위 테스트를 실행하는 일반적인 프로젝트를 요구하기 때문에
ld: warning: directory not found for option '-L/development/MainProject/../../../../Library/Developer/Xcode/DerivedData/MainProject-frbbgalqmolpaxcdmzssejnssluu/Build/Products/Debug-iphoneos'
ld: warning: directory not found for option '-F/development/MainProject/../../../../Library/Developer/Xcode/DerivedData/DTCoreText-fgbvjplplkeyyghcvrfbmvoetoiq/Build/Products/Debug-iphoneos'
ld: library not found for -lCommonProject
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** TEST FAILED **
The following build commands failed:
Ld /Library/Developer/Xcode/DerivedData/MainProject-bxpugeyjdgrcfcgxxpttwlgmfrma/Build/Products/Debug-iphonesimulator/MainProject.app/MainProject normal i386
, 그들이 별도의 디렉토리에 있기 때문에 그것을 필요로하는 파일을 찾을 수 없습니다. 누구든지 전에이 문제가 있었거나 그것을 해결할 수있는 아이디어가 있습니까?
! 내가해야했던 유일한 추가 작업은 환경 설정 -> 위치, 고급을 사용하여 빌드 위치를 공유 폴더로 설정하는 것이 었습니다. 나는 그 위치를 configuration_build_dir에 사용했다. 감사. – tomg101