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

set -e

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

8
9
10
11
12
case "$(uname -s)" in
    Darwin*) os=MacOSX;;
    *) os=Linux
esac

moto's avatar
moto committed
13
python -m torch.utils.collect_env
14
15
16
if [ "${os}" == Linux ]; then
    cat /proc/cpuinfo
fi
17
export TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSION=1
moto's avatar
moto committed
18
export PATH="${PWD}/third_party/install/bin/:${PATH}"
19

20
21
declare -a args=(
    '-v'
22
23
24
25
    '--cov=torchaudio'
    "--junitxml=${PWD}/test-results/junit.xml"
    '--durations' '20'
)
26

27
cd test
28
pytest "${args[@]}" torchaudio_unittest