blob: ca49d4cce2647189ee7dc0a0e981b5ca5e978ad9 [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/update_fuchsia_sdk.sh. Not runnable on CQ.
#
# Usage:
# $FUCHSIA_EMBEDDER_DIR/scripts/tests/update_fuchsia_sdk_test.sh
set -e # Fail on any error.
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/helpers.sh || exit $?
echo-info 'Testing update_fuchsia_sdk.sh --no-version-bump --cleanup from $FUCHSIA_EMBEDDER_DIR ...'
pushd $FUCHSIA_EMBEDDER_DIR
$FUCHSIA_EMBEDDER_DIR/scripts/update_fuchsia_sdk.sh --no-version-bump --cleanup
popd # $FUCHSIA_EMBEDDER_DIR
echo-info 'Testing update_fuchsia_sdk.sh --no-version-bump --cleanup from $HOME ...'
pushd $HOME
$FUCHSIA_EMBEDDER_DIR/scripts/update_fuchsia_sdk.sh --no-version-bump --cleanup
popd # $HOME