blob: caeb4f15184a5d4a3c1d407a4aea2ecf2b250a39 [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 all workflow scripts. Not runnable on CQ.
#
# Usage:
# $FUCHSIA_EMBEDDER_DIR/scripts/tests/run_all.sh
set -e # Fail on any error.
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/helpers.sh || exit $?
tests=( "${FUCHSIA_EMBEDDER_DIR}"/src/embedder/*_unittests.cc )
for test in "${tests[@]}"
do
# Convert filename to test name by removing prefix path (73 characters)
# and file extension (3 chacarcters)
test_name=${test:73:-3}
echo-info "Running $test_name ..."
bazel test //src/embedder:${test_name}_pkg --config=fuchsia_x64
done