Commit graph

626 commits

Author SHA1 Message Date
Sam Delmerico
e31d7de7b0 insert --config=bp2build before -- in b args
Bazel also supports `--foo bar` as another way to mean `--foo=bar`,
The current implementation would accidentally catch that and make it
`--foo --config=bp2build bar`. This CL instead requires that additional
arguments to the target come after a `--`.

E.g.
```
b run --args-for-bazel //foo -- --args-for-foo
```

Test: b build //build/bazel/scripts/difftool:difftool
Test: b run //build/bazel/scripts/difftool/difftool.py --level=FINE /tmp/legacyBuildFiles /tmp/bazelBuildFiles --file_type=object
Change-Id: I534caab04e4c919d4e7b6dc83b8a88e020626b18
2022-08-30 10:22:22 -04:00
Jingwen Chen
e7b2c97c6a Revert "skip soong tests by default for b command"
This reverts commit 56e576dc12.

Reason for revert: breaks `b cquery //foo:bar` - it strips out `//foo:bar`.

Change-Id: I92d8b1c2732efad3160d26ee78116eccc9f8e48a
2022-08-30 08:54:06 +00:00
Sam Delmerico
56e576dc12 skip soong tests by default for b command
It doesn't really make sense to incur the cost of running Soong tests to
Bazel users. We can shave off 20 seconds from the local critical path
during clean builds (or if Soong itself has changed) by enabling
--skip-soong-tests in the b command.

Test: b build '...'
Test: b build '...' --run-soong-tests
Bug: 240231596
Change-Id: I77d652502dc000908166e13045aa3e245c2e762c
2022-08-25 14:13:21 -04:00
Cole Faust
f376161d5a Merge "Move the --config flag in the b command earlier" 2022-08-24 00:31:52 +00:00
Frederick Mayle
e59a87946f envsetup.sh: partly fix syswrite
The grep doesn't work because "Reboot" is capitalized in the
enable-verity output. Now, syswrite gets farther, but fails before the
final remount.

    $ syswrite
    adbd is already running as root
    Successfully disabled verity
    Enabled overlayfs
    rebooting
    restarting adbd as root
    error: closed

Test: ran syswrite on freshly flashed device
Change-Id: I26aaa6278d76dcab56fd4bde3d70ac7841ae2a3b
2022-08-22 22:40:23 +00:00
Cole Faust
a68f5166fa Move the --config flag in the b command earlier
Having the --config flag at the end of a bazel command
will make it get passed to the command you're running
with b run instead of bazel.

Fixes: 242759256
Test: Manually
Change-Id: I6d23a0b022fdee5f822a873c1578674d1eab39c0
2022-08-18 19:41:43 -07:00
LaMont Jones
d2655af162 Merge "orchestrator: inner-tree path can be a list." am: ef1d2f06c6
Original change: https://android-review.googlesource.com/c/platform/build/+/2138856

Change-Id: I75c88dcbbac1caf69727a08c400679909aa7c968
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 17:05:53 +00:00
LaMont Jones
c39e502774 orchestrator: inner-tree path can be a list.
Shared trees are supported by specifying the inner-tree as a list in the
mcombo file.  This change enables that work.

Bug: None
Test: manual, unittests pass

Change-Id: I161d707d0aada66d134b49b158bf538f0e2a2572
2022-08-03 20:51:04 +00:00
Treehugger Robot
337805bef5 Merge "[Bugfix][Coredump] Fix coredump_enable() in envsetup.sh" am: f6aae1608d am: cbc5cc8500
Original change: https://android-review.googlesource.com/c/platform/build/+/2107828

Change-Id: I107ca4170c93c22120bb1bbd0db2c4703d83d60d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 22:33:55 +00:00
Treehugger Robot
cbc5cc8500 Merge "[Bugfix][Coredump] Fix coredump_enable() in envsetup.sh" am: f6aae1608d
Original change: https://android-review.googlesource.com/c/platform/build/+/2107828

Change-Id: Ic93e452300e3b919dcdcd92c165838bedb5d4e52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 22:15:30 +00:00
Treehugger Robot
f6aae1608d Merge "[Bugfix][Coredump] Fix coredump_enable() in envsetup.sh" 2022-06-02 21:53:40 +00:00
Anton Hansson
ee35c25629 Merge "Change default arch for banchan to arm64" am: 3f65d6d834 am: 10129759b5
Original change: https://android-review.googlesource.com/c/platform/build/+/2105084

Change-Id: I5ae8d4e3bb2cacd79380e9dbd86e3f13d176d462
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 11:16:17 +00:00
Anton Hansson
10129759b5 Merge "Change default arch for banchan to arm64" am: 3f65d6d834
Original change: https://android-review.googlesource.com/c/platform/build/+/2105084

Change-Id: I71afcacff56545940e25a92ab26c9914c2bdf353
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 09:32:52 +00:00
Anton Hansson
3f65d6d834 Merge "Change default arch for banchan to arm64" 2022-05-31 09:12:24 +00:00
xi yu
addf4833b6 [Bugfix][Coredump] Fix coredump_enable() in envsetup.sh
-P means PID to affect (default $PPID), while -p means Pipe buffer (512 bytes), we should use -P here.

Bug: 234049197

Test: Perform ". build/envsetup.sh" in host, then run "coredump_enable $PID".

Change-Id: Id373f2a7adc56d6a40720ec900b2561c9dbea2b1
2022-05-27 04:58:22 +00:00
Usta Shrestha
8c2f467697 Merge "Allow sourcing envsetup from anywhere" am: 0e46244250 am: 596a630c65
Original change: https://android-review.googlesource.com/c/platform/build/+/2097636

Change-Id: I1470f163980b57d0c56f9dcb00f3692b3f8c8cc7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 18:08:31 +00:00
Usta Shrestha
596a630c65 Merge "Allow sourcing envsetup from anywhere" am: 0e46244250
Original change: https://android-review.googlesource.com/c/platform/build/+/2097636

Change-Id: Ifd8b3f9d5556a05713ae6d9043d7047b42fb5b27
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 17:29:31 +00:00
Anton Hansson
0328e32621 Change default arch for banchan to arm64
Devices that only support 32-bit are very uncommon. Default
to the arch that module authors are most likely to be using.

Test: banchan com.android.sdkext | grep TARGET_PRODUCT
Test: banchan com.android.sdkext arm | grep TARGET_PRODUCT
Test: banchan com.android.sdkext arm64 | grep TARGET_PRODUCT
Change-Id: I31734660318eabbe3279214980b5cdecb55ab80b
2022-05-24 15:47:40 +00:00
Usta Shrestha
1433fb357b Allow sourcing envsetup from anywhere
Bug: 232555676
Test: cd build && source envsetup.sh
Change-Id: I8491628406e494f31589249d1cc851b672dd7cae
2022-05-23 18:50:52 +00:00
Treehugger Robot
10e1b73e6e Merge "Checkpoint new build orchestrator" am: a96be433c4 am: c7de0493f1
Original change: https://android-review.googlesource.com/c/platform/build/+/2096153

Change-Id: Iea29dc64f0a6dc2a7859e4aad16261635641a002
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 23:59:16 +00:00
Treehugger Robot
c7de0493f1 Merge "Checkpoint new build orchestrator" am: a96be433c4
Original change: https://android-review.googlesource.com/c/platform/build/+/2096153

Change-Id: Id670437d8bb08dff6cac932cee28986a3c0bd20a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 23:37:59 +00:00
Joe Onorato
7cf6f97775 Checkpoint new build orchestrator
Test: rm -rf out && multitree_build
Change-Id: Ic274182f0925f30d56227597b65e5b9ef3b19707
2022-05-12 12:12:38 -07:00
Treehugger Robot
9a37e45746 Merge "envsetup.sh: fix adb tab completion" am: 1ef63b944e am: d436fa704b
Original change: https://android-review.googlesource.com/c/platform/build/+/2087123

Change-Id: I025a3b394d5c877426136f26d0a8ebc8e0f0d882
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 09:28:18 +00:00
Treehugger Robot
d436fa704b Merge "envsetup.sh: fix adb tab completion" am: 1ef63b944e
Original change: https://android-review.googlesource.com/c/platform/build/+/2087123

Change-Id: I9324867e6b23d6288150ac045bcfb724a381de08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 09:07:17 +00:00
Mårten Kongstad
cb5c73fd9e envsetup.sh: fix adb tab completion
The adb module has been moved from system/core to packages/modules/adb.
Update the path to the adb tab completion script accordingly.

Also teach envsetup.sh to complain if completion files are not found.

Test: manual: adb tab completion works
Test: source build/envsetup.sh && declare -F _adb
Change-Id: I7d6fda3813b95e64de7b1953675f66659e750c31
2022-05-04 14:47:20 +00:00
Treehugger Robot
ed826115b7 Merge "revert addition of --skip-soong-test flag" am: 9bc50689c9 am: 3cbef527f0 am: def5eefbb7
Original change: https://android-review.googlesource.com/c/platform/build/+/2060119

Change-Id: I7f60617cc3da425444049cb8f7786a858181f3e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-11 17:22:14 +00:00
Treehugger Robot
3cbef527f0 Merge "revert addition of --skip-soong-test flag" am: 9bc50689c9
Original change: https://android-review.googlesource.com/c/platform/build/+/2060119

Change-Id: I5bea9a572c1257509131f042df2efc196cd87fa3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-11 16:37:41 +00:00
Sam Delmerico
9d67a905b7 revert addition of --skip-soong-test flag
aosp/2045666 attempted to permit passing the `--skip-soong-tests` flag
through the `b` command to `soong_ui`, but it has been causing problems.

Test: b build '...' --skip-soong-tests is not recognized
Test: build/bazel/ci/bp2build.sh
Change-Id: I02487841d8081218dc941cb04bfa1a9e148ab6af
2022-04-11 12:27:10 +00:00
Treehugger Robot
b233bcfe39 Merge "Implement multitree lunch" am: 9d1b28ed10 am: 1080b9f3f6 am: 9ebe2e2729
Original change: https://android-review.googlesource.com/c/platform/build/+/2060107

Change-Id: Iec70a4739c1b93050b3d4827b409c554da0dd2d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-09 03:13:22 +00:00
Treehugger Robot
1080b9f3f6 Merge "Implement multitree lunch" am: 9d1b28ed10
Original change: https://android-review.googlesource.com/c/platform/build/+/2060107

Change-Id: I8f1f7fc98a0e521a9e3347d1b140eefa657857a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-09 00:41:56 +00:00
Treehugger Robot
9d1b28ed10 Merge "Implement multitree lunch" 2022-04-09 00:19:03 +00:00
Joe Onorato
824608c33d Implement multitree lunch
Test: (cd build/make/orchestrator/core ; ./test_lunch.py)
Change-Id: I4ba36a79abd13c42b986e3ba0d6d599c1cc73cb0
2022-04-08 13:42:55 -07:00
Treehugger Robot
4e72e7557f Merge "prevent unintended m bp2build "" when running b" am: 54dbc8c36a am: 83cd363614 am: 7a1cca449f
Original change: https://android-review.googlesource.com/c/platform/build/+/2055109

Change-Id: I32e8c53f9dfd4f7e2dd5edccaf118fec9a513f36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 20:44:35 +00:00
Treehugger Robot
83cd363614 Merge "prevent unintended m bp2build "" when running b" am: 54dbc8c36a
Original change: https://android-review.googlesource.com/c/platform/build/+/2055109

Change-Id: I654dd587a07486f03d8ab1aa761c1f972e3fada1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 19:47:47 +00:00
Sam Delmerico
89a4702555 prevent unintended m bp2build "" when running b
cl/2045666 allowed the --skip-soong-tests flag to pass through
invocations of the `b` command to soong_ui. But when the flag was
missing, an extra `""` argument was passed instead which caused soong_ui
to invoke a build of the droid target.

Test: m clean && b build '...'  # verify Soong does not run a build
Change-Id: I7b99437d225786eb1698a88d0c755ce897550e70
2022-04-05 13:47:32 +00:00
Treehugger Robot
a92032b7c6 Merge "add flag to skip soong tests for b command" am: 375dd60d5a am: 9244deabb0 am: 6fa65aef1c
Original change: https://android-review.googlesource.com/c/platform/build/+/2045666

Change-Id: I9b51987a12706961df931277d186c5a467c239bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 20:43:50 +00:00
Treehugger Robot
6fa65aef1c Merge "add flag to skip soong tests for b command" am: 375dd60d5a am: 9244deabb0
Original change: https://android-review.googlesource.com/c/platform/build/+/2045666

Change-Id: Ia62bc9642e7f2d2a688a19e5ca166987acb36057
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 20:20:13 +00:00
Sam Delmerico
ef43149136 add flag to skip soong tests for b command
Sometimes it is very handy during testing to temporarily skip Soong
tests, but there is not easy method to allow this without changing the
envsetup.sh file and re-sourcing before/after enabling/disabling the
skip-tests flag.

Test: b build '...' --skip-soong-tests
Change-Id: I6dcad3ba0336cfd1c4d2c4357b852900792445c3
2022-03-29 14:39:33 +00:00
Will Burr
79626450f0 Merge "envsetup.sh: Update text in lunch menu for clarity" am: 44adfa7f8c am: 0b828a50c7 am: c838e15827 am: 0bc5e16871
Original change: https://android-review.googlesource.com/c/platform/build/+/1974422

Change-Id: I20ec8376a69d29454a5d365d9e45052cba5e7ddf
2022-02-09 20:37:03 +00:00
Will Burr
0bc5e16871 Merge "envsetup.sh: Update text in lunch menu for clarity" am: 44adfa7f8c am: 0b828a50c7 am: c838e15827
Original change: https://android-review.googlesource.com/c/platform/build/+/1974422

Change-Id: I6f2c3d6aa414773e6aa737800a886762801112cd
2022-02-09 20:22:05 +00:00
Will Burr
404012020f envsetup.sh: Update text in lunch menu for clarity
Updates the lunch menu text to make it clearer that the choices in lunch
menu are not fully comprehensive. As the list comes from common lunch
choices the text now refers to 'common combinations' and informs that
you can 'specify your own'. This should help developers who are unsure
why they cannot find their desired lunch target in the list.

Change-Id: Ib9d55ee46b7037c30a8f4b43fdd552ea66e887e8
Test: source build/envsetup.sh && lunch
2022-02-09 15:25:17 +00:00
Presubmit Automerger Backend
4dd821f386 [automerge] Add a keys argument to tapas 2p: 5ff4380b5d
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/16804130

Bug: 216553104
Change-Id: Ibc4ef4f682bbdb50c3aef23ee9cf4e68c247f7de
Merged-In: I2161be9e15f99713e11d22901d6eb7ad3c420093
2022-02-07 18:50:33 +00:00
Colin Cross
5ff4380b5d Add a keys argument to tapas
Add a keys argument to tapas that allows specifying devkeys to
use internal aosp_devkeys_* products that use the internal
devkeys, which will allow building unbundled apps that use platform
keys for testing.

Bug: 216553104
Test: tapas CarMediaApp devkeys
Change-Id: I2161be9e15f99713e11d22901d6eb7ad3c420093
Merged-In: I2161be9e15f99713e11d22901d6eb7ad3c420093
2022-02-07 18:50:22 +00:00
Colin Cross
7f49a67d0d Add a keys argument to tapas
Add a keys argument to tapas that allows specifying devkeys to
use internal aosp_devkeys_* products that use the internal
devkeys, which will allow building unbundled apps that use platform
keys for testing.

Bug: 216553104
Test: tapas CarMediaApp devkeys
Change-Id: I2161be9e15f99713e11d22901d6eb7ad3c420093
2022-01-28 16:56:43 +00:00
Treehugger Robot
2495360637 Merge "Ensure there are no empty paths in ANDROID_BUILD_PATHS and PATH." am: 46bd6ec0f6 am: 1ec033c132 am: 8676adc660 am: fd8a495fff
Original change: https://android-review.googlesource.com/c/platform/build/+/1900564

Change-Id: I5557c20f12bb9d17c9a09ee4b1a325bcd66f0515
2021-11-24 20:35:52 +00:00
Martin Stjernholm
6a012266a1 Ensure there are no empty paths in ANDROID_BUILD_PATHS and PATH.
Test: lunch armv8
      - Check that PATH has no "::".
      - Check that an executable script in CWD doesn't get executed.
Change-Id: I3a97eb661c614ff2e09723e9ccca0bdeb63dbdc5
2021-11-24 14:59:15 +00:00
Kousik Kumar
d086b0918a Merge "Remove unnecessary RBE sourcing in envsetup.sh" am: 8bd19a4143 am: 49433fefde am: 3a42b842ba am: 49fd1bb0b3 am: 2fb7d4ab03
Original change: https://android-review.googlesource.com/c/platform/build/+/1877136

Change-Id: I237f25a6ba0f0a32b42742b83164861d13862825
2021-11-09 21:39:54 +00:00
Kousik Kumar
bd9b9b0226 Remove unnecessary RBE sourcing in envsetup.sh
We no longer need these since we switched to config files and I missed removing them. So removing them now

Bug: b/202340353
Change-Id: Ibab8ab8d4a45e01d2c98632ccee2684ea600ff69
2021-11-01 01:36:03 -04:00
Treehugger Robot
7f5cee09f9 Merge "Support -s in installmod command" am: 8cdc80bc24 am: 12f85f31e3 am: e7af6fa1e6 am: 493776ffd7 am: 82a39a7d70
Original change: https://android-review.googlesource.com/c/platform/build/+/1869665

Change-Id: Ia6ce242ae4012af90def209d8c6fe5d4cf78809c
2021-10-26 02:27:14 +00:00
Cole Faust
3e1923867a Support -s in installmod command
The -s flag must be passed before the adb command,
as in `adb -s emulator-5554 install myapp.apk`
instead of `adb install -s emulator-5554 myapp.apk`.
Parse it and move it to the correct location if it
exists.

Test: Manually
Change-Id: I4b296d7fe4efbe3b25d21d33a8082b321787651a
2021-10-25 13:43:48 -07:00