blob: 13f156d7124fbb871eb5bc19e213e54ccc5b44db [file] [log] [blame]
Sam Delmerico4ee85082022-09-09 17:21:25 -04001# Copyright (C) 2022 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# These commands are expected to always return successfully
16
17trap 'exit 1' ERR
18
19source $(dirname $0)/../envsetup.sh
20
Jingwen Chen6db4d4f2022-10-27 12:52:17 +000021# lunch required to set up PATH to use b
22lunch aosp_arm64
23
Sam Delmerico4ee85082022-09-09 17:21:25 -040024test_target=//build/bazel/scripts/difftool:difftool
25
Sam Delmerico4ee85082022-09-09 17:21:25 -040026b build "$test_target"
27b build "$test_target" --run-soong-tests
28b build --run-soong-tests "$test_target"
29b --run-soong-tests build "$test_target"
Cole Faustf2b0c732022-12-02 10:48:24 -080030# Test that the bazel server can be restarted once shut down. If run in a
31# docker container, you need to run the docker container with --init or
32# have some other process as PID 1 that can reap zombies.
33b shutdown
Sam Delmerico4f6ca1a2022-09-21 15:29:16 -040034b cquery 'kind(test, //build/bazel/examples/android_app/...)' --config=android
Sam Delmericod0c8cf02022-09-22 14:10:40 -040035b run $test_target -- --help >/dev/null
Jingwen Chen83eeebb2022-10-05 02:27:07 +000036
37# Workflow tests for bmod
38bmod libm
39b run $(bmod fastboot) -- help
40b build $(bmod libm) $(bmod libcutils) --config=android