summaryrefslogtreecommitdiff
path: root/ui
AgeCommit message (Collapse)Author
2021-04-12Remove the dependency on a number of env vars. Lukacs T. Berki
This is so that the way soong_build is invoked is simpler, which is in turn useful so that it can be invoked multiple times within a single build, which in turn will be used to invoke bp2build routinely (as opposed to manually when needed) Test: Presubmits. Change-Id: Iddaebb05ff7bcedc0db8273192bb31284b739920
2021-04-02Allow Bazel actions to see the SHELL variable. Rupert Shuttleworth
Test: TH Change-Id: I97ffe7ad84dfb8d58d0e6d022f73d97a73778129
2021-03-21Print the output from RBE bootstrap shutdown Kousik Kumar
The output from bootstrap would contain the a one-line summary of RBE download / upload stats. Bug: b/183007125 Change-Id: I90082a8433504e40bbf92992c3c8d1d656c49429
2021-03-18Merge "Allowlist RBE_num_retries_if_mismatched variable" Kousik Kumar
2021-03-17Allowlist RBE_num_retries_if_mismatched variable Kousik Kumar
This variable tells reproxy the number of times an action that mismatches between local and remote-executions should be run remotely to determine if the action is inherently non-deterministic. An action is considered non-deterministic if the number of unique output digests we get from the remote-run is > 1. Bug: b/178842439 Change-Id: I0d50eed29b801be67a7ede9b25ce7f4535980f05
2021-03-17Compile soong_build for debugging if needed. Lukacs T. Berki
That is, when SOONG_DELVE= is set. Test: "m nothing; SOONG_DELVE=port m nothing; m nothing" Change-Id: I16bd4e54e81b93202573935df134d413feea9bb2
2021-03-17Remove GeneratingPrimaryBuilder(). Lukacs T. Berki
It's replaced with a flag in bootstrap.Args . Test: "m nothing" (presubmits take a full workday these days) Change-Id: Ia0bfa2091013e389890e583c559006077806af99
2021-03-17Embed minibp into soong_ui. Lukacs T. Berki
This requires linking Blueprint into soong_ui. It lets us avoid the complicated dance of Ninja files and shell scripts: now the information as to how soong_build is built is passed directly to Blueprint using a struct that contains all the information the command line arguments used to contain. The ability to run Blueprint from the command line is kept (for now). Some variables in bootstrap/command.go needed public accessor functions because soong_build reads them. This will be disentangled by moving the flag parsing to soong_build. The presence of the flag definitions in Blueprint means that soong_ui now also accepts them. This is not a problem in practice because they are ignored and because soong_ui itself is hidden behind a few layers of shell scripts. Test: Presubmits + the new bootstrap_test.sh . Change-Id: I6dca478f356f56a8aee1e457d71439272351390b
2021-03-11Hard-wire the path to xcrun as /usr/bin/xcrun. Lukacs T. Berki
This lets us not leak $PATH to soong_build. It was only needed for Darwin tests anyway. Test: Will ask jingwen@ who has a Mac. Change-Id: I4647e41275b323fe6283580f8f92718c6229f23e
2021-03-11Merge "Fix the environment of soong_build:" Lukács T. Berki
2021-03-10Merge "Revert "Skip old file cleanup for non-full builds."" Colin Cross
2021-03-10Fix the environment of soong_build: Lukacs T. Berki
- Incorporate BAZEL_* variables in soong.environment.available - Set SOONG_DELVE when requested Test: Manual. Change-Id: I3ac675f4876220b788cc48d288b402ac6016c37b
2021-03-10Make $PATH available when building soong_build. Lukacs T. Berki
This is exclusively used by tests so it's awful, but Darwin builds are currently broken so let's unbreak them first then start thinking. Test: "m nothing" on Linux (I don't have access to a mac OS machine) Change-Id: I1ea9ca71a5aff36a3454282a4c87ad368138baaa
2021-03-09Revert "Skip old file cleanup for non-full builds." Colin Cross
This reverts commit 6e49493dac7647c1d078f6a780db0993933fc94d. FULL_BUILD is not set during the config stage, so this never calls cleanOldInstalledFiles. Bug: 168105598 Bug: 182008128 Test: manual Change-Id: I58a54f167763cdb77b3c1bd4f18f519fcaf8751a
2021-03-09Run Ninja in a clean environment. Lukacs T. Berki
This sandboxes Soong's tests better. Setting "TOP" is slightly ugly, but doing it properly would conflict with aosp/1609218. Test: Manual ("m nothing") Change-Id: Ie3d3cd17f116a5fe0ad25c670fc5ed9c33f8123b
2021-03-08Make it possible to debug soong_ui. Lukacs T. Berki
This works by setting the SOONG_UI_DELVE= environment variable to the port on which soong_ui should accept a Delve connection on. This is achieved by reusing the Delve execution logic between soong_ui and soong_build. Test: Manual. Change-Id: Id2c1d4b6faac1a4a3918c91030ce2239f7daf54f
2021-03-05Do not ignore error when writing environment file Paul Duffin
Test: m nothing Change-Id: I4281e22ae10a649b51b9fbed7f8c1554f18885b9
2021-03-04Merge "cd to / before running soong_build ." Lukács T. Berki
2021-03-03Rename vendor-ramdisk to vendor_ramdisk Petri Gynther
Rename to get consistent ramdisk directory naming in out/target/product/<name>: debug_ramdisk ramdisk vendor_debug_ramdisk vendor_ramdisk Test: build and inspect out/target/product/<name> Change-Id: Ib86e6509bd910e8c95bcb6e3f7bb639ebbfe3758
2021-03-03cd to / before running soong_build . Lukacs T. Berki
This lets one avoid any decisions as to when to chdir there during its execution and leads to better sandboxing because the pwd doesn't leak to init() functions anymore. Test: Manual. Change-Id: I1560da8ed3a621249426f9e8908aa890c21e13ba
2021-03-03Merge changes I3e6bc9b5,If9f8fb10 Colin Cross
* changes: Disable TestSendLog on the buildbots Remove global state from VNDK apexes
2021-03-02Disable TestSendLog on the buildbots Colin Cross
TestSendLog sometimes hangs on the buildbot, although it has never been reproduced locally. The cause appears to be a unix domain packet that was sent but never received. Skip the test in short mode for now, which will leave it manually runnable but not run it as part of the build. Fixes: 120596545 Test: m nothing Change-Id: I3e6bc9b5f1d9c15dc9a7294d98cbd917d0637c44
2021-03-02Move environment staleness check to soong_ui. Lukacs T. Berki
Also delete the now-unnecessary soong_env binary. Test: Manually. Also checked what happens when a used environment variable changes. Change-Id: Ib393e7f444e94819198c6cce4bcd8719d9fd9441
2021-02-06Add LOCAL_LICENSE_KINDS to build/soong Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp android/Android.bp android/soongconfig/Android.bp androidmk/Android.bp apex/Android.bp bazel/Android.bp bp2build/Android.bp bpf/Android.bp bpfix/Android.bp cc/Android.bp cc/config/Android.bp cc/libbuildversion/Android.bp cc/libbuildversion/tests/Android.bp cc/ndk_api_coverage_parser/Android.bp cc/ndkstubgen/Android.bp cc/symbolfile/Android.bp cmd/dep_fixer/Android.bp cmd/diff_target_files/Android.bp cmd/extract_apks/Android.bp cmd/extract_jar_packages/Android.bp cmd/extract_linker/Android.bp cmd/fileslist/Android.bp cmd/host_bionic_inject/Android.bp cmd/javac_wrapper/Android.bp cmd/merge_zips/Android.bp cmd/multiproduct_kati/Android.bp cmd/path_interposer/Android.bp cmd/pom2bp/Android.bp cmd/pom2mk/Android.bp cmd/sbox/Android.bp cmd/soong_build/Android.bp cmd/soong_env/Android.bp cmd/soong_ui/Android.bp cmd/zip2zip/Android.bp cmd/zipsync/Android.bp cuj/Android.bp dexpreopt/Android.bp dexpreopt/dexpreopt_gen/Android.bp env/Android.bp etc/Android.bp filesystem/Android.bp finder/Android.bp finder/cmd/Android.bp genrule/Android.bp jar/Android.bp java/Android.bp java/config/Android.bp kernel/Android.bp linkerconfig/Android.bp linkerconfig/proto/Android.bp makedeps/Android.bp partner/Android.bp phony/Android.bp python/Android.bp python/tests/Android.bp remoteexec/Android.bp rust/Android.bp rust/config/Android.bp scripts/Android.bp sdk/Android.bp sh/Android.bp shared/Android.bp symbol_inject/Android.bp symbol_inject/cmd/Android.bp sysprop/Android.bp tradefed/Android.bp ui/build/Android.bp ui/logger/Android.bp ui/metrics/Android.bp ui/metrics/proc/Android.bp ui/status/Android.bp ui/terminal/Android.bp ui/tracer/Android.bp xml/Android.bp zip/Android.bp zip/cmd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: finder/fs/Android.bp third_party/zip/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2021-01-29bp2build: fix running from clean checkout. Jingwen Chen
bp2build is a Soong mode that returns as soon as the BUILD files are generated. This causes it not generate the build.ninja file, which the Ninja process executing soong_build itself expects to produce as an output. If there isn't an existing build.ninja file generated from a previous build, GENERATE_BAZEL_FILES=true m nothing will fail. This CL generates the expected files as a workaround, and also makes GENERATE_BAZEL_FILES=true skip the Kati/Ninja steps in soong_ui since they aren't needed. Test: rm -rf out/ && GENERATE_BAZEL_FILES=true m nothing && m libc Fixes: 178683777 Change-Id: I2515ef7961682d2be5f096ed24831cc185165a67
2021-01-26Add FAILED: prefix to RBE Fatal error message Kousik Kumar
This error message it currently being logged to stdout which goes to build.log file . We want it to be logged to build_error.log file instead so that downstream systems that need to run based on the error message will continue to work. Test: Tested by running `m toybox` and ensuring that FAILED: prefix is at the beginning of the line. Bug: b/177221705 Change-Id: Ie0c9acee2739acf149384e33804b5fca3273c24f
2021-01-24Merge "Moving $OUT/vendor-ramdisk-debug.cpio.lz4 to intermediate dir" Treehugger Robot
2021-01-22Remove GKI artifacts on installclean Yo Chiang
Bug: 177495407 Test: m installclean && GKI prebuilts under OUT dir are removed Change-Id: I05f888376c7f2b253e9966c1a652063a6c4760d9
2021-01-20Moving $OUT/vendor-ramdisk-debug.cpio.lz4 to intermediate dir Bowgo Tsai
Therefore, no need to remove vendor-ramdisk-debug.cpio.lz4 for installclean as it will not be installed to $OUT dir. Bug: None Test: make vendorbootimage_debug Change-Id: Ib7fb9931c55a9bb24e5ca8c4a80bd72f7233c57f
2021-01-05Skip old file cleanup for non-full builds. Jaewoong Jung
There are few build targets that don't generate an installed file list, e.g. product-graph. Skip the old installed file cleanup step so that the func doesn't complain about a lack of the list file. Fixes: 168105598 Test: m product-graph Change-Id: Ib7dce6b801979bb565b74d6355143bac23b84fe6
2020-12-22Remove unnecessary snake case variables. Jaewoong Jung
Test: m nothing + TreeHugger Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
2020-12-18Merge "Read the proc status file when PID is given for metrics purpose." Patrice Arruda
2020-12-17Read the proc status file when PID is given for metrics purpose. Patrice Arruda
To measure the MaxRSS memory correctly, read the proc status file under /proc/<pid>/status and extract the MaxRSS value from it. The implementation is only available for Linux based distributions. Bug: b/169453825 Test: go test Change-Id: I32e3068fee7447f9ef5dfb5a8d8dcb6934e0af23
2020-12-15Add and update comments in ui/metrics/metrics.go. Patrice Arruda
The metrics.go had missing comments and also did minor code refactoring to be more in golang best practices. Bug: b/172917718 Test: m nothing. Change-Id: Id63e4af3f27b582fc13ef3f988ac5c8707fb9adf
2020-12-15Remove soong_metrics_proto from the import of the protobuf file. Patrice Arruda
No needed to define soong_metrics_proto since it is defined in the Android.bp file. Bug: b/172917718 Test: m nothing Change-Id: Ib5f4cd6d06c08660803cf070da544e9c2d1dce1f
2020-12-15Add setup_tools performance metrics to Soong protobuf file. Patrice Arruda
The setup_tools metrics has been missing since day one and is needed to track down slowness of setting up the build system. Bug: b/175706305 Test: m nothing and ran the printproto command to check that the setup_tools field has been set. Change-Id: Idc8a38fa830e0a906170feeede63435715eaa05b
2020-12-15Merge "Add and update comments in ui/metrics/event.go" Treehugger Robot
2020-12-15Add and update comments in ui/metrics/event.go Patrice Arruda
The event.go code was refactored to follow the best practices of golang code style. Bug: b/172918681 Test: go test ./ui/metrics Change-Id: Ic57d7cd576a9b146530ae37f03f4f5679d6cffef
2020-12-14Enable bazel profiling in soong_build. Patrice Arruda
Bazel is executed several times during the execution of soong_build. For each bazel execution, generate a profile and save under the BAZEL_METRICS_DIR which is defined in soong_ui. Bug: b/174479924 Test: * USE_BAZEL_ANALYSIS=1 USE_BAZEL=1 m nothing and checked if the cquery and graph build bazel profiles were generated. * Verified that the generated bazel profiles were uploaded to the local dev metrics pipeline. Change-Id: I3d20204484dc6c5a1525a5d3eec1d62cfb33535b
2020-12-11Merge "Allow Bazel to write to an external DIST_DIR (outside of OUT_DIR)." Treehugger Robot
2020-12-11Allow Bazel to write to an external DIST_DIR (outside of OUT_DIR). Rupert Shuttleworth
Also get Bazel to write real files there (not symlinks) so that the DIST_DIR can be independent. Test: Manually using e.g. DIST_DIR=/tmp/foo USE_BAZEL=1 m dist Change-Id: I39d5219500864c9ecc85f356a028e9b5bf2607f4
2020-12-10Allow uploading a directory of metrics files. Patrice Arruda
The upload functionality now supports directories to be uploaded for metrics purpose. Bug: b/174479728 Test: Wrote unit test case. Change-Id: I6906be4c1b7fd76ddf6ff7b94e48fe1c4209c59d
2020-12-09Merge "Provide an interface for shared paths between Soong and Soong UI." Treehugger Robot
2020-12-08Add dependency checker special case for out/build_date.txt. Rupert Shuttleworth
Test: Future TH presubmit. Change-Id: I4f80cf12be4aa1a3040b38ac7c6bed593aefd65e
2020-12-08Provide an interface for shared paths between Soong and Soong UI. Patrice Arruda
Code refactoring has been done for logs directory logic code since the bazel metrics directory depends on the log directory. For builds that did not specify a dist directory, the log directory is under out directory. With dist, the logs directory is under <dist dir>/logs. This matters for Android CI builds where the metrics files are placed under logs directory. With this change, the bazel metrics directory and corresponding files will be under <dist dir>/logs directory for Android CI builds. Bug: b/174479728 Test: * USE_BAZEL=1 m nothing (bazel_metrics dir in out dir) * m nothing (bazel_metrics dir deleted) * DIST_DIR=/tmp/build USE_BAZEL=1 m nothing dist (bazel_metrics is in /tmp/build/logs directory) Change-Id: Ic9e1ff49a1964fcaaf801bde2c19f33597ca1db4
2020-12-08Print both the implicit and explicit environment variables when running Bazel. Rupert Shuttleworth
Test: Manually via USE_BAZEL=1 use_rbe m. Change-Id: I9f0ac8875b47848fdea4ae97d107e4167c4a7f6e
2020-12-07Only print the Bazel command line once. Rupert Shuttleworth
Test: USE_BAZEL=1 m and USE_BAZEL=1 use_rbe m. Change-Id: I8413e92d91c906f884628bedac6955575cf86a1c
2020-12-07Use lstat instead of stat to avoid permissions issues when creating symlinks. Rupert Shuttleworth
Also refactor symlink code slightly and add some more error checking. Test: Manually. Change-Id: I75119707cdf497e5690ac57abd814c8f18cab1f8
2020-12-07Merge "Print the full Bazel command line (including env) for debugging ↵ Treehugger Robot
purposes."
2020-12-07Print the full Bazel command line (including env) for debugging purposes. Rupert Shuttleworth
Test: Manually ran USE_BAZEL=1 m and USE_BAZEL=1 use_rbe m and looked at the build output. Change-Id: Idbfdf8b00458fbd4b684cb0c1b58d6515909293c