test: execute CIT with Bazel#48
Conversation
1aac2f5 to
2b190f9
Compare
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
2b190f9 to
e283498
Compare
src/rust/rust_kvs/tests/README.md
Outdated
| All tests are kept in separate files as the working directory is always | ||
| changed. If there is more than one test in a file both tests are run in | ||
| parallel and use the same working directory which will led to wrong results. | ||
|
|
There was a problem hiding this comment.
TBH I think it'd be better to remove this README.md file and add a proper one to the root of repository.
- This
README.mddoesn't contain anything useful. - It's better to have all basic information in one place.
- You can copy the one from orch repo, with minor changes it should do just fine.
There was a problem hiding this comment.
done, please check new readme
| deps = __cit_deps, | ||
| ) | ||
|
|
||
| rust_test( |
There was a problem hiding this comment.
I'm not fond of having a target for every file, but TBH couldn't find a way to do it better without breaking existing cargo test runs.
There was a problem hiding this comment.
me too, so far the only way I found to group tests is by using test suite and I think this will be our way of running all component tests at once:
bazel test //src/rust/rust_kvs:cit
Created bazel targets for component integration tests. Groupped them under one test suite.
enable autoformatting bazel files on save
e283498 to
f3ea1d4
Compare
|
|
||
| ```bash | ||
| sudo apt-get update | ||
| sudo apt-get install -y curl build-essential protobuf-compiler libclang-dev |
There was a problem hiding this comment.
Did You check those deps are relevant?
There was a problem hiding this comment.
yes, I checked it out in docker
| Build all targets: | ||
|
|
||
| ```bash | ||
| bazel build //... |
There was a problem hiding this comment.
I'm not sure if this will work in this repo right now.
There was a problem hiding this comment.
Docs are the only that don't. But in general that command shall be always working. Created ticket - #52
README.md
Outdated
| ```bash | ||
| cargo run --help | ||
| ``` | ||
| ``` |
There was a problem hiding this comment.
moved to project root added info about bazel, cargo, testing and cli tool
f3ea1d4 to
eb2fdea
Compare
|
LGTM |
…bazel test: execute CIT with Bazel
Note:
Bazel requires one test target per integration test file to match Cargo’s behavior. This is why you can’t use a single glob for all cit_.rs files in one rust_test target. If you use glob(["tests/cit_*.rs"]) as srcs in a single rust_test, Bazel tries to build all those files as one crate, but there’s no single crate root, so it fails with errors like “Couldn't find lib.rs”.