tests.sh 309 字节
Newer Older
S
update  
superjom 已提交
1 2 3
#!/bin/bash
set -ex

S
init  
superjom 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
mode=$1

backend_test() {
    sudo pip install numpy
    mkdir -p build
    cd build
    cmake ..
    make
    make test
}

frontend_test() {
    cd frontend
    npm install
    npm run build
}

echo "mode" $mode

if [ $mode = "backend" ]; then
    backend_test
else
    frontend_test
fi