As a dirty hack, I can run CC tests by doing somet...
# development
w
As a dirty hack, I can run CC tests by doing something like this:
Copy code
cc_binary(
    name="tests",
    dependencies=["./src:sources", "./tests:tests"]
)
Copy code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests is a Catch v2.13.9 host application.
Run with -? for options

-------------------------------------------------------------------------------
Additions are correct
-------------------------------------------------------------------------------
examples/cc/core/tests/greeter.cpp:4
...............................................................................

examples/cc/core/tests/greeter.cpp:7: FAILED:
  REQUIRE( add(1, 2) == 2 )
with expansion:
  3 == 2

===============================================================================
test cases: 1 | 1 failed
assertions: 2 | 1 passed | 1 failed
However, assuming I want to make a
cc_tests
target, would that expect to live inside my tests folder, and then infer the location of the sources? And would this inference happen because of an expected filesystem relativity?
So, I guess more specifically.
cc_tests
takes test sources, then infers the production sources/libraries they came from, creates a binary, and runs it?
w
saw this, but ran out of time to consider it.
@tdyas
is back from vacation next week (not pinging) and will almost certainly have thoughts here.
👍 1
w
I'm still moving forward with one approach, just to get it moving - the internals can be re-jigged later. Trying to get this setup on a project with about 12 sets of small libs + tests. That'll be my "this is ready for a PR" moment
👍 1