task_unit_test.sh 547 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

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

function usage {
    echo "Usage: $0 backend"
}

if [ $# -ne 1 ]; then
    usage
    fail "Error: must specify backend"
fi

BACKEND=$1
Minjie Wang's avatar
Minjie Wang committed
18
19
20
21
export DGLBACKEND=$1
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/$BACKEND || fail "backend-specific"
24
python3 -m nose -v --with-xunit tests/graph_index || fail "graph_index"
25
python3 -m nose -v --with-xunit tests/compute || fail "compute"