spotify / XCRemoteCache

Other
830 stars 53 forks source link

Prepare xccc before starting CCWrapper tests #81

Closed polac24 closed 2 years ago

polac24 commented 2 years ago

Our TemplateBasedCCWrapperBuilderTests unit tests sometimes get a timeout like:

/Users/runner/work/XCRemoteCache/XCRemoteCache/Tests/XCRemoteCacheTests/Commands/XCCCTests.swift:133: error: -[XCRemoteCacheTests.TemplateBasedCCWrapperBuilderTests testAddsExclusivlyToCompileHistory] : Asynchronous wait failed: Exceeded timeout of 10 seconds, with unfulfilled expectations: "Started xccc".

example

For some reason, the very first execution of a freshly compiled wrapper file (xccc) takes ~5s (on my machine) and on CI it may take more time. This PR compiles xccc before the first TemplateBasedCCWrapperBuilderTests test so our test cases can have smaller timeouts (the delay of the compilation + first invocation) does not contribute to the total case duration.

polac24 commented 2 years ago

Closing this PR because of long inactivity.