Make it explicit that we will build *and* install all the modules under
the directories. And that 'mm[m]' is now the same as 'mm[m][a]'.
Test: hmm
Change-Id: I86c42229f8cdc24922fb3014777ad13d72a1c0ea
zsh doesn't split variables (by default), but it will split command
output. bash will split both. Apparently a portable way to do this in
both is to just turn it into another command: "$(echo $var)".
Test: source build/envsetup.sh; lunch (see list; repeat in bash and zsh)
Change-Id: I9716a8d77aefdf05da8923deb9e37e0b6132b549
Arrays are zero indexed in bash and one indexed in zsh by default. This
leads to an off-by-one issue in the `godir` and `choosevariant` commands: when
prompted to chose an option, in order to pick option "n" you have to input
"n+1".
In those two specific instances, by using "substring expansion" instead of
array indexing, one can get consistent behaviour between bash and zsh
(equivalent to zero indexing).
Test: manual -
# godir
$ zsh
$ source build/envsetup.sh
$ godir SurfaceFlinger # There should be many options
# Pick 1, check that you end up in the right location
$ godir SurfaceFlinger.cpp # There should be only one possibility
# make sure you end up in the right location
# repeat with bash (to ensure compatibility is not broken)
# choosevariant
$ zsh
$ source build/envsetup.h
$ choosevariant # pick whatever variant you want
$ printconfig # make sure the variant matches your choice
# repeat with bash (to ensure compatibility is not broken)
Change-Id: I998d8fb48b708066b6db28a2129a2b09785fb0b1
Right now, leaks are disabled globally on host. This is problematic
because:
a). people write leaks in new code
b). if we fix leaks in old code, it doesn't get tested
c). fixing leaks in old code is harder because when we set
ASAN_OPTIONS="" locally, other targets start hitting errors,
and we have to set __asan_default_options there
Fixes: 141313466
Test: host ASAN build passes
Change-Id: I89298c7518c016e6a30884c75d7b791db16a5217
Get the lunch choices before starting to print the lunch menu prompt
so that it doesn't sit at `Lunch menu... pick a combo:` with no
choices for a few seconds.
Fixes: 138719635
Test: lunch
Change-Id: I2bb373ec037bff0ab1d7e4f5ff8a8bd3b57f3263
Currently when switching between internal to aosp, PYTHONPATH will be
contaminated. This CL is to ensure PYTHONPATH will be as clean as
opening a new terminal and source/lunch.
Bug: 121106770
Test: internal:
$ source build/envsetup.sh; lunch; echo $PYTHONPATH| sed 's/:/\n/g'
will see VENDOR_PYTHONPATH in PYTHONPATH.
switch to aosp:
$ source build/envsetup.sh; lunch; echo $PYTHONPATH| sed 's/:/\n/g'
won't see VENDOR_PYTHONPATH in PYTHONPATH.
Change-Id: Id1916673000ee3fad55e9611d0c47cc80de86645
Fix this error:
rprichard@cashew:/x/aosp/out/target/product/walleye/system/bin$ ls
bash: ./ls: cannot execute binary file: Exec format error
Bug: none
Test: lunch a target, "echo $PATH | grep ::"
Test: lunch an arm target, cd $OUT/system/bin, ls (
Change-Id: I2c0d5ece85964dffa14d6ac8df168dd4e733162e
This reverts commit 610b6302cf.
Reason for revert: m mlibc from root dir works. Create a tmp dir and then cd in to tmp. Run the same command and it fails.
Change-Id: I0f0c056d7e668da621ae99d347a055ecdf2dec07
The functionality of m* envsetup.sh commands has been implemented in
soong_ui. The bash functionality of m* commands can be replaced by
soong's modules-in* build commands.
Fixes: b/130049705
Test: * Loaded the envsetup.sh on a new environment
* Executed each m* command.
* Verified with "type <build command>" to make sure
the function generation is correct.
* Ran on Darwin environment.
Change-Id: I8792e4f1f1727aba2ca6ee4bdfe657f6ac42302a
Very few vendorsetup.sh files are needed anymore, since add_lunch_combo
has been deprecated. So add a way so that only approved vendorsetup.sh
files can be loaded into the shell, and others will be skipped.
This further limits the amount of code that can run outside the build
sandbox, and makes this list more visible to tree maintainers before
they're used instead of after.
Test: no allowed-vendorsetup_sh-files
Test: empty allowed-vendorsetup_sh-files
Test: one file in allowed-vendorsetup_sh-files
Test: two files in allowed-vendorsetup_sh-files
Test: non-present file in allowed-vendorsetup_sh-files
Change-Id: Ia23d1c9d11a7295d5be5abd10cf56edbdec80483
Remove atest/acloud/aidegen functions and append prebuilt path
in PATH. Use local built by default; if there is no local built,
use the prebuilt one instead.
Bug:
Test: $ source build/envsetup.sh; lunch
$ echo $PATH|sed 's/:/\n/g' | egrep "out|asuite"
# will see out/host prioritises prebuilts/asuite.
Change-Id: I1e5869bcb81cf7058cf8971f480a47d2c8f8b6f0
If ANDROID_QUIET_BUILD environment variable is set, do not print
build timing and colorized summary result.
Test: treehugger
Change-Id: I7ae3f8eb407df470837560706f06e5785911828c
Remove atest/acloud/aidegen functions and append prebuilt path
in PATH. Use local built by default; if there is no local built,
use the prebuilt one instead.
Bug:
Test: $ source build/envsetup.sh; lunch
$ echo $PATH|sed 's/:/\n/g' | egrep "out|asuite"
# will see out/host prioritises prebuilts/asuite.
Change-Id: I16c3e85c195b878d3c629149afbd96636ed1f0e1
When target directories are specified, mmm now scans their parent
direcotries to when searching for build config files. Also make it look
more like mm as minor refactoring.
Bug: 62899341
Test: Manual builds.
Change-Id: Ic9c081090e1baeb0849508e9086f2976b108c0ee
After running "lunch" multiple times, the global variable
PYTHONPATH grows larger and larger with repetively content.
This patch is to prevent PYTHONPATH from prepending redundant path.
Bug: b/121110600
Test: $ source build/envsetup.sh && lunch
$ echo $PYTHONPATH | sed 's/:/\n/g'
$ lunch; lunch
$ echo $PYTHONPATH | sed 's/:/\n/g' # not growing.
Change-Id: Ifc36d071fb63bb1494bb0a94fdff477a41708c74
A function name with dashes is apparently not universally recognized
by shell versions/variants(?). Using underscore in place of dashes
solves this problem.
Test: ./development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libGLESv1_CM
Change-Id: Id7d701600760140dae9e4762a11f4abd64947d10
Usage:
...aosp/$ gomod libbase
...aosp/system/core/base$
Using in alias:
alias g=gomod
complete -F _complete-android-module-names g
...aosp/$ g libbase
...aosp/system/core/base$
Nothing in Android keeps an up to date index of all Android modules
and their locations between builds. However, there is a target
'module-info.json' which is used to contain some of that information.
This module can be updated using the command 'refreshmod' added
here, but it will also be updated during a normal Android build.
This also adds auto-complete for m.
Bug: N/A
Test: manual
Change-Id: I06b0b87c308b9fe2798dbc29225906cc30fe59fe
toybox xxd treats -ps as -p -s with a missing argument to -s, rather
than as a bizarre synonym for -p.
Test: manual
Change-Id: Ia576861588a4ddeac9885bce8d718929b74f31b1
There are plenty of .hpp files in the AOSP sources.
$ find . -name \*.hpp | wc -l
2430
They were already grepped in cgrep(), but were missing in
sgrep and treegrep.
Test: manual - run the script
Change-Id: I1fb3f576f6cdcc2b492e2beadf11ced98cb3938e
Atest will run in the sequence of built -> prebuilt -> source code.
Bug: b/118801769
Test: source build/envsetup.sh; lunch
and atest will run in the appearing sequence above.
Change-Id: I0494aeab99c390c31bb02641c6c1c11afd5642a2
I call "compinit -i" in my .zshrc, to allow loading autocompletion from
"unsafe" locations. envsetup.sh breaks that. Change behavior to only
call compinit if bash-style completion is not already enabled.
This is a minimal fix; an alternative would be to rely on the user
to call 'bashcompinit' in their .zshrc instead, and just skip all
autocomplete functionality if they don't.
Test: manual - source ./envsetup.sh in {bash, zsh, zsh -f} and test
completion for lunch
Change-Id: Ibb10eb68a96d69c19b9db9b21e0546fe8ae299b2
(zsh)$ source build/envsetup.sh; lunch 23
will result in selecting #22 because array in zsh starts from 1
instead of 0. This CL is to fix this issue.
Bug: b/117202855
Test: below commands should have the same output:
(zsh)$ source build/envsetup.sh; lunch 23
(zsh)$ source build/envsetup.sh; lunch aosp_walleye-userdebug
Change-Id: I0570585417878bc7c73eda0e1a416232fe147fb4
Now Atest can autocomplete module names, dir and filenames with
tab completion, and zsh users can benefit from it.
Bug: 110629292
Test: In both bash and zsh environments:
source build/envsetup.sh && lunch aosp_arm-eng
atest <tab><tab> # has candidates
adb <tab><tab> # has candidates
ENVSETUP_NO_COMPLETION=atest:adb . build/envsetup.sh && lunch aosp_arm-eng
atest <tab><tab> # no candidates
adb <tab><tab> # no candidates
Change-Id: Ib1c9e02feeb8aaf75c0b97821ae26e13ba8df350
Make it so that these can be used in other scripts by moving them from
functions defined in envsetup.sh to standalone scripts.
Test: stacks zygote64
Change-Id: Id8e5ce5b4da80e57f4226eb34edaf82b87393834