| #!/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/sync_engine_artifacts_to_revision.sh. Not runnable on CQ. |
| # |
| # Usage: |
| # $FUCHSIA_EMBEDDER_DIR/scripts/tests/sync_engine_artifacts_to_revision_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 |
| |
| current_flutter_engine_revision=$(cat $FUCHSIA_EMBEDDER_DIR/third_party/dart-pkg/internal/flutter/flutter/bin/internal/engine.version) |
| |
| echo-info 'Testing sync_engine_artifacts_to_revision.sh from $FUCHSIA_EMBEDDER_DIR ...' |
| $FUCHSIA_EMBEDDER_DIR/scripts/sync_engine_artifacts_to_revision.sh $current_flutter_engine_revision |
| |
| echo-info 'Testing sync_engine_artifacts_to_revision.sh --goma ...' |
| $FUCHSIA_EMBEDDER_DIR/scripts/sync_engine_artifacts_to_revision.sh $current_flutter_engine_revision --goma |
| |
| echo-info 'Testing sync_engine_artifacts_to_revision.sh --no-prebuilt-dart-sdk ...' |
| $FUCHSIA_EMBEDDER_DIR/scripts/sync_engine_artifacts_to_revision.sh $current_flutter_engine_revision --no-prebuilt-dart-sdk |
| |
| popd # $FUCHSIA_EMBEDDER_DIR |
| |
| echo-info 'Testing sync_engine_artifacts_to_revision.sh from $HOME ...' |
| pushd $HOME |
| $FUCHSIA_EMBEDDER_DIR/scripts/sync_engine_artifacts_to_revision.sh $current_flutter_engine_revision |
| popd # $HOME |