Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

cache Bazel test outputs

38 views
Skip to first unread message

Aayush Ostwal

unread,
Dec 17, 2024, 5:48:09 AM12/17/24
to bazel-discuss
Hey, 

I am running bazel test and have generated some outputs. And, I want to pass output dir as a test argument (currently its is `bazel info output_path`) - So, every time I run bazel test, as output dir changes, I runs all the test cases again.

I am looking for 
1. An env variable which I can read inside my code which is set by bazel at runtime
2. Once I have written some file there, I want them to cache it if tests are cached
3. How can I retrive those files, if my test cases are cahced.


Austin Schuh

unread,
Dec 18, 2024, 8:32:40 PM12/18/24
to Aayush Ostwal, bazel-discuss
TEST_UNDECLARED_OUTPUTS_DIR is how we have done something similar in the past.  It works with remote execution too.

Austin

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bazel-discuss/2fb0ea6c-4f7a-4f1a-b742-c95d8af0c31fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages