blob: 9c45a522513a669f3fa91d787d85da7cb196a4da [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/install_hooks.sh. Not runnable on CQ.
#
# Usage:
# $FUCHSIA_EMBEDDER_DIR/scripts/tests/install_hooks_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 install_hooks.sh from $FUCHSIA_EMBEDDER_DIR ...'
pushd $FUCHSIA_EMBEDDER_DIR
$FUCHSIA_EMBEDDER_DIR/scripts/install_hooks.sh
popd # $FUCHSIA_EMBEDDER_DIR
echo-info 'Testing install_hooks.sh from $HOME ...'
pushd $HOME
$FUCHSIA_EMBEDDER_DIR/scripts/install_hooks.sh
popd # $HOME