bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Target //tools/objc:ios_test_on_bazel is missing

Open trevorgray opened this issue 11 years ago • 6 comments

I'm trying to write an ios_test however get an error that the build rule must depend on //tools/objc:ios_test_on_bazel even though this rule does not exist.

bazel build examples/objc:example_test
ERROR: /Users/trevorgray/code/src/github.com/google/bazel/examples/objc/BUILD:97:1: every rule of type ios_test implicitly depends upon the target '//tools/objc:ios_test_on_bazel',  but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?.
ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.091s

trevorgray avatar Apr 26 '15 18:04 trevorgray

I think this is referring to the ios test runner, which is still missing in Bazel - i.e., it's not currently possible to write ios_test rules (which is very unfortunate). I'm not sure what the current status is and most of the people involved are at a summit this week.

On Sun, Apr 26, 2015 at 8:06 PM, Trevor Gray [email protected] wrote:

I'm trying to write an ios_test however get an error that the build rule must depend on //tools/objc:ios_test_on_bazel even though this rule does not exist.

bazel build examples/objc:example_test ERROR: /Users/trevorgray/code/src/github.com/google/bazel/examples/objc/BUILD:97:1: every rule of type ios_test implicitly depends upon the target '//tools/objc:ios_test_on_bazel', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?. ERROR: Loading failed; build aborted. INFO: Elapsed time: 0.091s

— Reply to this email directly or view it on GitHub https://github.com/google/bazel/issues/162.

ulfjack avatar Apr 27 '15 10:04 ulfjack

Assigning to Daniel for following the issue.

damienmg avatar May 04 '15 09:05 damienmg

I think this is gone. I don't see a example_test rule in examples/objc/BUILD anymore.

$ output/bazel build examples/objc:example_test ERROR: no such target '//examples/objc:example_test': target 'example_test' not declared in package 'examples/objc' defined by /Users/tfarina/bazel/examples/objc/BUILD. INFO: Elapsed time: 0.030s

Should we just close this now?

tfarina avatar Jul 03 '15 01:07 tfarina

Peter will be finishing the work on that on. The work on it is almost finished thanks to Daniel.

damienmg avatar Jul 03 '15 06:07 damienmg

I believe XC tests should now be working. Please feel free to revive this if you run into issues. I'll work on adding a basic test to our example tutorial.

c-parsons avatar May 17 '16 17:05 c-parsons

@c-parsons I'm looking at PrenotCalculator right now and I don't see any test examples. Would it be possible to add an example?

adamhowardprice avatar Feb 15 '17 16:02 adamhowardprice