blob: ff4c0755881b57c20d23065bf7bec6260dfaf25d [file] [log] [blame]
#!/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.
#
# Runs local tests for scripts/build_and_copy_engine_artifacts.sh. Not runnable on CQ.
#
# Usage:
# $FUCHSIA_EMBEDDER_DIR/scripts/tests/build_and_copy_engine_artifacts_test.sh
set -e # Fail on any error.
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/helpers.sh || exit $?
pushd $FUCHSIA_EMBEDDER_DIR
echo-info 'Testing build_and_copy_engine_artifacts.sh from $FUCHSIA_EMBEDDER_DIR ...'
$FUCHSIA_EMBEDDER_DIR/scripts/build_and_copy_engine_artifacts.sh
echo-info 'Testing build_and_copy_engine_artifacts.sh --goma ...'
$FUCHSIA_EMBEDDER_DIR/scripts/build_and_copy_engine_artifacts.sh --goma
echo-info 'Testing build_and_copy_engine_artifacts.sh --no-prebuilt-dart-sdk ...'
$FUCHSIA_EMBEDDER_DIR/scripts/build_and_copy_engine_artifacts.sh --no-prebuilt-dart-sdk
echo-info 'Testing build_and_copy_engine_artifacts.sh --cpu arm64 ...'
$FUCHSIA_EMBEDDER_DIR/scripts/build_and_copy_engine_artifacts.sh --cpu arm64
popd # $FUCHSIA_EMBEDDER_DIR
echo-info 'Testing build_and_copy_engine_artifacts.sh from $HOME ...'
pushd $HOME
$FUCHSIA_EMBEDDER_DIR/scripts/build_and_copy_engine_artifacts.sh
popd # $HOME