platform_build_soong/ui
Spandan Das 0506361a60 Add errorHints to stdout when read-only file system errors are detected
The source tree will eventually be made ReadOnly, and recipes that write
directly to the source tree will fail. Use a pattern-match approach on
the results of stdout/stderr to provide hints to the user in such a
scenario.

If multiple patterns are found in raw output, print error hint
corresponding to first pattern match. first pattern match is chosen
since the failing function will be at the top of the stack, and hence
will be logged first

Test: Wrote a unit test to assert errorhint is added to output.
Wrote an integration test that writes to a file in the source tree
1. When source_tree is RO, the recipe fails and an error hint is printed
to stdout
2. When source tree is RW, the recipe succeeds and no error hint is
printed

Bug: 174726238
Change-Id: Id67b48f8094cdf8a571c239ae469d60464a1e89c
2021-06-29 00:20:21 +00:00
..
build Add errorHints to stdout when read-only file system errors are detected 2021-06-29 00:20:21 +00:00
logger Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
metrics Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
status Add errorHints to stdout when read-only file system errors are detected 2021-06-29 00:20:21 +00:00
terminal Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
tracer Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00