test.sh 547 字节
Newer Older
T
tangfangzhi 已提交
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#!/bin/bash

function usage() {
    echo "$0"
    echo -e "\t -e enterprise edition"
    echo -e "\t -h help"
}

ent=0
while getopts "eh" opt; do
    case $opt in
        e)
            ent=1
            ;;
        h)
            usage
            exit 0
            ;;
        \?)
            echo "Invalid option: -$OPTARG"
            usage
            exit 0
            ;;
    esac
done

script_dir=`dirname $0`
cd ${script_dir}
PWD=`pwd`

if [ $ent -eq 0 ]; then
    cd ../../debug
else
    cd ../../../debug
fi

ctest -j8
ret=$?
exit $ret