task_mxnet_tutorial_test.sh 446 Bytes
Newer Older
Minjie Wang's avatar
Minjie Wang committed
1
2
3
#!/bin/bash
# The working directory for this script will be "tests/scripts"

4
5
TUTORIAL_ROOT="../../tutorials"

Minjie Wang's avatar
Minjie Wang committed
6
7
8
9
10
function fail {
    echo FAIL: $@
    exit -1
}

11
12
13
pushd ${TUTORIAL_ROOT} > /dev/null
# Install requirements
pip3 install -r requirements.txt || fail "installing requirements"
Minjie Wang's avatar
Minjie Wang committed
14

15
16
# Test
export MPLBACKEND=Agg
17
for f in $(find . -name "*_mx.py")
Minjie Wang's avatar
Minjie Wang committed
18
19
20
21
do
    echo "Running tutorial ${f} ..."
    python3 $f || fail "run ${f}"
done
22
23

popd > /dev/null