-
Notifications
You must be signed in to change notification settings - Fork 70
/
run_tests.sh
executable file
·27 lines (23 loc) · 1.03 KB
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# - torch is expected to be already activated, ie run:
# source ~/torch/install/bin/torch-activate
if [[ ! -f data/mnist/train-labels-idx1-ubyte ]]; then {
echo downloading mnist data...
mkdir -p data/mnist
(cd data/mnist
wget http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz -O train-images-idx3-ubyte.gz
gunzip train-images-idx3-ubyte.gz
wget http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz -O train-labels-idx1-ubyte.gz
gunzip train-labels-idx1-ubyte.gz
# wget http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz -O t10k-images-idx3-ubyte.gz
# wget http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz -O t10k-labels-idx1-ubyte.gz
)
echo ...downloaded mnist data
} fi
if [[ x$RUNGDB != x ]]; then {
rungdb.sh python $(which py.test) test/test* $*
} elif [[ x$STDBUF != x ]]; then {
stdbuf --output=L py.test -sv test/test* $* | grep --line-buffered -v 'seconds =============' | tee test_outputs/tests_output.txt
} else {
py.test -sv test/test*.py
} fi