run_test.sh 475 Bytes
Newer Older
moto's avatar
moto committed
1
2
3
4
5
6
7
8
#!/usr/bin/env bash

set -e

eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env

python -m torch.utils.collect_env
moto's avatar
moto committed
9
env | grep TORCHAUDIO || true
10

moto's avatar
moto committed
11
export PATH="${PWD}/third_party/install/bin/:${PATH}"
12

13
14
declare -a args=(
    '-v'
15
16
17
18
    '--cov=torchaudio'
    "--junitxml=${PWD}/test-results/junit.xml"
    '--durations' '20'
)
19

20
21
22
23
if [[ "${CUDA_TESTS_ONLY}" = "1" ]]; then
  args+=('-k' 'cuda or gpu')
fi

24
cd test
25
pytest "${args[@]}" torchaudio_unittest
26
coverage html