Xcode unit test not work after `pod install`(LLVM Profile Error)

Viewed 199

Xcode version: 13.1

I am trying to use unit test but not work well.

When before pod install norm unit test work well like below.

    import XCTest
...
>   func testPrint(){
          print("test")
    }

But It's not all. I use my code. so import it.

    import XCTest
    @testable import MY_PROJECT_NAME

>   func testPrint(){
          print("test")
    }

And I use lots of libraries, pod install or pod update and then,

When I run the unit test, It pending(suspend?) Testing... about 10~(min) and finally I got this logs

LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set

I don't know and could not find

  • What file is written
  • Where to set Filename

I searched here but I don't know what to set.

  • MY_PROJECT.xcodeproj/xcshareddate/MY_PROJECT.xcscheme
  • MY_PROJECT.xcodeproj/xcuserdata/MY_MAC_NAME.xcuserdatad/xcschemes/xcschememanagement.plist

What can I try?

1 Answers

I used Podfile wrong.

before

platform :ios, '12.0'
target 'PROJECT' do
  use_frameworks!
  
  # libraries ...
    
    target 'PROJECTTests' do
      
        # ...
      end

end

after

platform :ios, '12.0'
use_frameworks!
target 'PROJECT' do

  # libraries ...

end
target 'PROJECTTests' do
      
  # libraries ...
end
Related