| #!/bin/bash |
| |
| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| set -e |
| |
| # This script is used by infra to validate the driver can be built and tests |
| # can pass. |
| |
| readonly REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/.. |
| readonly BAZELISK_TOOL="${REPO_ROOT}/tools/bazel" |
| |
| main() { |
| if [[ -d "${REPO_ROOT}/sdk" ]]; then |
| "$BAZELISK_TOOL" build --config=fuchsia_x64 third_party/iwlwifi:core |
| echo "Everything build and all tests passed." |
| else |
| # TODO(mangini): handle this appropriately when the DDK is published by |
| # infra in an accessible way. We need to keep this fallback state to avoid |
| # triggering CI/CQ since the build bot cannot build the driver until it has |
| # access to a valid DDK. |
| "$BAZELISK_TOOL" --version |
| echo "Not building now since the DDK is not available. Please re-run scripts/bootstrap.sh with the appropriate flag to generate the Blaze build rules." |
| fi |
| } |
| |
| main "$@" |