task_unit_test.sh 707 Bytes
Newer Older
1
2
3
4
5
6
7
8
#!/bin/bash

function fail {
    echo FAIL: $@
    exit -1
}

function usage {
9
    echo "Usage: $0 backend device"
10
11
}

12
if [ $# -ne 2 ]; then
13
    usage
14
    fail "Error: must specify backend and device"
15
16
fi

Minjie Wang's avatar
Minjie Wang committed
17
export DGLBACKEND=$1
18
export DGLTESTDEV=$2
Minjie Wang's avatar
Minjie Wang committed
19
20
21
export DGL_LIBRARY_PATH=${PWD}/build
export PYTHONPATH=tests:${PWD}/python:$PYTHONPATH
export DGL_DOWNLOAD_DIR=${PWD}
22

23
python3 -m nose -v --with-xunit tests/compute || fail "compute"
24
25
python3 -m nose -v --with-xunit tests/graph_index || fail "graph_index"
python3 -m nose -v --with-xunit tests/$DGLBACKEND || fail "backend-specific"
26
27
28
29
export OMP_NUM_THREADS=1
if [ $2 != "gpu" ]; then
    python3 -m nose -v --with-xunit tests/distributed || fail "distributed"
fi