1#!/bin/bash 2 3# Copyright 2021 The Tint Authors. 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17set -e # Fail on any error. 18 19SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" 20 21function usage() { 22 echo "test-all.sh is a simple wrapper around <tint>/tools/test-runner that" 23 echo "injects the <tint>/test directory as the second command line argument" 24 echo 25 echo "Usage of <tint>/tools/test-runner:" 26 "${SCRIPT_DIR}/../tools/test-runner" --help 27} 28 29TINT="$1" 30 31if [ -z "$TINT" ]; then 32 echo "error: missing argument: location of the 'tint' executable" 33 echo 34 usage 35 exit 1 36fi 37if [ ! -x "$TINT" ]; then 38 echo "error: invalid argument: location of the 'tint' executable" 39 echo 40 usage 41 exit 1 42fi 43 44"${SCRIPT_DIR}/../tools/test-runner" "${@:2}" "${TINT}" "${SCRIPT_DIR}" 45