blob: 967e7df9abaaee8346bf974a09b5fec5708e4917 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Run unit tests.
set -eu
readonly bin_dir="$(readlink -e -- "$(dirname -- "$0")")"
cd "${bin_dir}/../venv"
find . -name "*.pyc" -print0 | xargs -0 rm -f
while getopts v name; do
case $name in
v) verbose=1;;
?) printf "Usage: %s: [-v]\n" "$0" >&2; exit 2;;
exec "${bin_dir}/python_venv" -m unittest discover "${verbose:+-v}" -s cros_venv