airbnb/BuckSample

Running `make test` fails with Xcode 11.1

Closed this issue · 4 comments

I cloned the BuckSample to study and I can't run make test.

I made these steps:

  • make install_buck
  • make update_cocoapods
  • make project
  • make test

In the Xcode everything goes well, but in the terminal I receive this:

$ make test
tools/buck test //App:ExampleAppCITests --test-runner-env XCTOOL_TEST_ENV_LLVM_PROFILE_FILE="/Users/renatomendes/Developer/Personal/BuckSample/buck-out/tmp/code-%p.profraw%15x" \
		--config custom.other_cflags="\$(config custom.code_coverage_cflags)" \
		--config custom.other_cxxflags="\$(config custom.code_coverage_cxxflags)" \
		--config custom.other_ldflags="\$(config custom.code_coverage_ldflags)" \
		--config custom.other_swift_compiler_flags="\$(config custom.code_coverage_swift_compiler_flags)"
Building: finished in 0.0 sec (100%) 62/62 jobs, 0 updated
  Total time: 0.4 sec
Testing: finished in 1.9 sec
RESULTS FOR //App:ExampleAppCITests //App:UnitTests //App:UnitTestsWithHostApp
FAIL    <100ms  0 Passed   0 Skipped   1 Failed   Internal error from test runner
FAILURE Internal error from test runner main: Failed to query the list of test cases in the test bundle:
stdout:

stderr:
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=165):
Invalid device state

FAIL    <100ms  0 Passed   0 Skipped   1 Failed   Internal error from test runner
FAILURE Internal error from test runner main: Failed to query the list of test cases in the test bundle:
stdout:

stderr:
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=165):
Invalid device state

FAIL    <100ms  0 Passed   0 Skipped   1 Failed   Internal error from test runner
FAILURE Internal error from test runner main: Failed to query the list of test cases in the test bundle:
stdout:

stderr:
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=165):
Invalid device state

====TEST STATUS MESSAGES====
[2019-10-23 16:57:56.712][INFO] Collecting info for testables...
[2019-10-23 16:57:56.712][INFO] Collecting info for testables...
[2019-10-23 16:57:56.846][INFO] Collecting info for testables...
[2019-10-23 16:57:56.846][INFO] Collecting info for testables...
[2019-10-23 16:57:57.627][INFO] Collecting info for testables...
[2019-10-23 16:57:57.763][INFO] Collecting info for testables...
TESTS FAILED: 3 FAILURES
Failed target: //App:UnitTestsWithHostApp
FAIL Internal error from test runner
Failed target: //App:UnitTests
FAIL Internal error from test runner
Failed target: //App:ExampleAppCITests
FAIL Internal error from test runner
make: *** [test] Error 32

I'm doing something wrong?

No, you did everything right. We need to update xctool in this repo. I actually made a patch to facebook/xctool to address this problem (facebookarchive/xctool#767).

I will update it later. In the mean while, you can use the latest xctool from the open source repo. Thanks for notifying.

Thanks @qyang-nj

with the open source repo it works. :)

The slack channel is private? How can I get an invitation?

This issue is addressed by #125.

@Renatdz I sent an invitation to your gmail. Not sure if that will work.