1
mirror of https://github.com/home-assistant/core synced 2024-10-04 07:58:43 +02:00
ha-core/script/test_docker

17 lines
488 B
Plaintext
Raw Normal View History

#!/bin/sh
# Executes the tests with tox in a docker container.
# Every argument is passed to tox to allow running only a subset of tests.
# The following example will only run media_player tests:
# ./test_docker -- tests/components/media_player/
# Stop on errors
set -e
cd "$(dirname "$0")/.."
docker build -t home-assistant-test -f virtualization/Docker/Dockerfile.dev .
docker run --rm \
-v `pwd`/.tox/:/usr/src/app/.tox/ \
-t -i home-assistant-test \
tox -e py36 ${@:2}