Commit Graph

30 Commits

Author SHA1 Message Date
Joe Onorato
88042fa0ad fix soongdbg missing args
Change-Id: I06226f2aee0e7f73e0fb55bd90a31577e6cf0092
2024-07-26 16:59:50 -07:00
Treehugger Robot
a2f2e80c08 Merge "Fix mistake made when moving installmod from shell function standalone script" into main 2024-07-26 00:15:44 +00:00
Joe Onorato
8726dcd228 Fix mistake made when moving installmod from shell function standalone script
Bug: 355509078
Test: run installmod
Change-Id: I6ac58e8b2d58463f50eef54c6c29ce3bd399d0da
2024-07-25 16:21:28 -07:00
Joe Onorato
451ceec4dd Fix afind command
afind "*.foo" didn't work because "*.foo" got expanded inside afind

Change-Id: Ia479ed6e50e64fe2ffdf1983050a6da91d6a06f0
2024-07-20 17:46:15 -07:00
Atneya Nair
30f3662693 dirmods: Update to take absolute paths
Dirmods currently expects a path relative to the top of the build. If
an abs path is passed, it will never match anything.

Modify so that if path is absolute, we fix-up the path relative to
ANDROID_BUILD_TOP.

Test: manual
Bug: trivial
Change-Id: Iad99228078dc693ab5f7957e007fe1bd5cea07d2
2024-07-18 12:28:11 -07:00
Treehugger Robot
ef2388e99f Merge "Add afind command." into main 2024-07-06 07:08:46 +00:00
Joe Onorato
b3eb9e58e0 Add afind command.
Wrapper for find that skips the .repo, .git and out directories.

Test: manual
Change-Id: I7f3b0f4e228060e2edb932f14d0ec5894a9e1240
2024-07-05 11:21:08 -07:00
Dan Willemsen
3c68b18f73 Use the correct ninja binary for the host in aninja
Change-Id: I79eb7fb397e9ae623a1cc2e67a472881767656f6
Test: `aninja -h` on Linux & Mac
2024-07-02 21:46:28 +00:00
Treehugger Robot
e28ee78351 Merge "Add --tag argument to soongdbg" into main 2024-06-20 19:10:34 +00:00
Joe Onorato
250c551a26 Add --tag argument to soongdbg
The --tag argument will filter the dependencies to just the given deptags
as it walks the graph.

Test: soongdbg deps --tag android/soong/android.defaultsDependencyTag framework-minus-apex
Test: soongdbg between --tag android/soong/android.defaultsDependencyTag framework-minus-apex framework-minus-apex-defaults
Change-Id: I566477ffcd9d5e4b3e57155f65e84999e4908c79
2024-06-20 11:05:17 -07:00
Zhuoyao Zhang
0edf1d38e2 Add run_tool_with_logging as a standalone scripts
As part of the build team's effort to cleanup envseup.sh.
Remove the run_tool_with_logging rundtion from envsetup.sh and add it
as a standalone script under build/soong/bin

Test: atest run_tool_with_logging
Test: manually do source envsetup.sh and run adb devices -l and check
the event log is sent to clearcut, tested with both bash and zsh

Bug: 342066042
Change-Id: I2fbc69a064832af61d75d14b0e33a62cb56186df
2024-06-06 00:18:29 +00:00
Cole Faust
ec701ded12 Cleanup dirmods, outmod, and pathmod
- Use argparse for parsing
- Correct copy/pasted documentation
- Misc small tweaks

Bug: 340648588
Test: manually
Change-Id: I11373bd25712b6880517efbb7aefabf70d29a771
2024-06-04 12:30:55 -07:00
Cole Faust
5f2be11396 Make pathmod give absolute paths
This was broken when pathmod was turned into a standalone script.

Bug: 340648588
Test: gomod frameworks-minus-apex from build/soong
Change-Id: Ibd5eaf2c29d232c1a7da432723f7c6b6fa8bce83
2024-06-04 12:14:35 -07:00
Joe Onorato
53f3057037 Add list_releases command
Bug: 340648588
Test: list_releases
Change-Id: Ibce4704c64620b74c24952f16c2be902d8483f02
2024-05-30 15:52:09 -07:00
Joe Onorato
c6e5a45667 Add standalone list_products and list_variants commands.
get_releases coming soon

Test: build/make/tools/envsetup/run_envsetup_tests
Bug: 340648588
Change-Id: I32e7b868d04656e39f277bb37661eadab9751d7c
2024-05-30 15:39:21 -07:00
Joe Onorato
5a62e76561 get_build_var and get_abs_build_var are now scripts
Bug: 340648588
Test: run the scripts. lunch.
Change-Id: Idc3395afe0dbec88abe7e8f46994eb2c5a22ee98
2024-05-24 14:37:52 -07:00
Joe Onorato
ded5d2de15 More envsetup.sh cleanup -- move these to standalone scripts
Bug: 340648588
Test: Run them
Change-Id: I11d086bcaa2f9eb52f7c556d94666321010b75fa
2024-05-24 14:37:52 -07:00
Joe Onorato
d636ea12bf build/soong side of move the module-info.json commands into standalone scripts.
Bug: 340648588
Test: run them
Change-Id: I5c072ee8481630327be9dccbbca501293a7b34cd
2024-05-24 14:37:52 -07:00
LaMont Jones
fa4ba22a41 Add build-flag-declarations tool
This will be used to gather build flag declarations

Bug: 328495189
Test: manual, TH
Change-Id: I155c26b1442347c4d433c9cbf22b94d944636702
2024-05-21 15:34:11 -07:00
Joe Onorato
5bcd43ed50 Make refreshmod a script instead of a shell function
Bug: 340648588
Test: refreshmod
Change-Id: I757fc442fb8161d99ddbcbc9ecb4d3d501c6a727
2024-05-18 07:57:01 -07:00
Joe Onorato
9a0a2fcb11 Convert envsetup.sh shell functions to scripts.
Bug: 340648588
Test: Run them
Change-Id: I19303ac08bd98619f0a8ee4ee5efb6d735538578
2024-05-18 07:56:54 -07:00
Joe Onorato
a67e6a7162 Move aninja and overrideflags from shell functions to real scripts
Trying to clean up cruft from envsetup.sh

Shell functions require re-sourcing envsetup.sh, and should be avoided
if possible.

Bug: 340648588
Test: try the scripts
Change-Id: I15ec39b0382d9dd60e290dae633e8730a8d18131
2024-05-14 15:13:27 -07:00
LaMont Jones
ff387eaacb release_config: various cleanup
- Allow scl and textproto data to coexist for now
- Print warnings to stderr instead of stdout.
- Improve formatting of output
- Set displays the new value for all configs, and what file changed.
- Use prettier error messages for better UX
- put build-flag on the path.

Bug: 328495189
Test: manual
Change-Id: I4c38860c2fb24db5111e0cecf790660a4ff2b8b2
2024-04-30 16:12:50 -07:00
Joe Onorato
2816c97d23 Add --depth and --reverse to soongdbg deps
Test: use the flags
Change-Id: If7edacae672eca974978cc211d6e385d5038bcc2
2024-02-09 17:11:46 -08:00
Joe Onorato
04b63b1870 Add option to show dependency tags in soongdbg
Test: soongdbg between --svg ~/Desktop/foo.svg --deptags android.content.pm.flags-aconfig PackageInstaller
Change-Id: I00786ff982ecff71e6f3cdc8d72bba5f23a093b5
2024-02-09 16:35:56 -08:00
Joe Onorato
b3ffad1992 Fix soongdbg deps
Test: soongdbg deps framework-platform-compat-config
Change-Id: I8a49e0f4efbd0ef68d5ae7fb403166c046112322
2024-02-09 14:39:45 -08:00
Joe Onorato
12e2cf72df Add soongdbg json to print the json for a module
Makes it easier to figure out your jq.

Test: soongdbg json SystemUI | jq -r '.source_file + ":" + (.source_line | tostring) + ": " + .name'
Change-Id: I3c6eb7fcefa5a27101ea49ddf2dcf59ab24f804b
2024-02-09 13:50:35 -08:00
Joe Onorato
be952da370 Add --svg and --dot args to soongdbg so you don't have to run graphviz by hand
Test: soongdbg between --svg ~/Desktop/foo.svg --label '"sdk_version="+.properties.Sdk_version' MODULE_1 MODULE_2
Change-Id: Idf5ee9a3ca2dc4b1fd3aa941fe641225336438fc
2024-02-09 11:43:57 -08:00
Joe Onorato
373dc18f85 Add --label argument to soongdbg to call jq for metadata
With this you can choose any of the debug data that soong prints to
display in your graph.

Test: soongdbg between android.content.pm.flags-aconfig PackageInstaller --label '"sdk_version="+.properties.Sdk_version'
Change-Id: I96a25beeb0f5ea0dfd024c51aef1c4f0b2ec046c
2024-02-09 11:12:19 -08:00
Joe Onorato
e5ed34746e Add new soongdbg command and a big json file full of soong debugging info.
In order to use soongdbg, you must run analysis with GENERATE_SOONG_DEBUG=true set
in the environment.

Test: GENERATE_SOONG_DEBUG=true m nothing ; soongdbg ...
Change-Id: If43676fe2784f05cd87c0ecb4a46ab676b91023f
2024-02-03 14:44:11 -08:00