[test] fakebuild tool generates UploadRequests The new fakebuild tool emulates a build tool that streams out UploadRequests. This can be simpler than testing with ninja itself. rs-fakebuild.sh is an example of a tool wrapper whose sole purpose is to catch the RSPROXY_FIFO variable from rsproxy-wrap.sh. For ninja, rs-ninja.sh would looks very similar. fakebuild generates its own invocation Id, whereas ninja does not, so rs-ninja.sh (in future change) would need to pass a random uuid through a NINJA_BUILD_ID environment variable. This approach makes it easier to thread RSPROXY_FIFO through multiple levels of wrapping. Whe RSPROXY_FIFO is not set, normal build tool operation without request streaming is expected. scripts/BUILD.bazel: Adds tests that use fakebuild and the rs-fakebuild.sh prefix. requests.go, factored out from utils_for_test.go some functions for converting between UploadRequests and byte streams. Bug: 390427892 Change-Id: I777f3e459d1ab7cf16e9165ae28c3f62068af98a Reviewed-on: https://fuchsia-review.googlesource.com/c/rsclient/+/1362872 Reviewed-by: Jay Zhuang <jayzhuang@google.com> Commit-Queue: David Fang <fangism@google.com>
The rsclient repository contains tools that support the use of ResultStore services and API.
rsproxy acts as a bridge between build tools and the ResultStore service.
The first supported build tool is Fuchsia's fork of ninja.
rsclient builds with Bazel. We recommend using Bazelisk to use the version of Bazel currently supported by this code base.rsclient is supported for Linux, and is yet untested on other platforms.
Before working with the code base, we recommend installing the precommit hook once per git clone with:
./scripts/install_precommit.sh
This runs a variety of checks and automatic regeneration steps for you before committing local changes.
To build everything:
$ bazelisk build ...
To run tests:
$ bazelisk test ...
Not yet applicable.
Not yet applicable.