-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunction_test.sh
48 lines (39 loc) · 958 Bytes
/
function_test.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
set -x
set -o pipefail
export PS4='+{$LINENO `date "+%Y-%m-%d_%H:%M:%S"` :${FUNCNAME[0]}} '
cur=`dirname "${0}"`
cd "${cur}"
cur=`pwd`
NOSE_PATH=../thirdsrc/
if [ ! -d ./nose ]
then
cp ${NOSE_PATH}/nose.tar.gz ./
tar -xzvf nose.tar.gz
fi
cp ../mark ./
cp ../sandbox/*.sh ./
mkdir -p ./log
sh -x prepare_data.sh &>./log/prepare_data.log
# test start and stop nameserver
nosetests test_nameserver_start_stop.py -s -v -x &>./log/test_nameserver_start_stop.log
if [ $? -ne 0 ]
then
echo "test_nameserver_start_stop.py case FAIL, exit"
exit 1
fi
# use mark test read and write
nosetests test_put_read.py -s -v -x &>./log/test_put_read.log
if [ $? -ne 0 ]
then
echo "test_put_read.py case FAIL, exit"
exit 1
fi
# use bfs_client test file operate
nosetests test_file_operate.py -s -v -x &>./log/test_file_operate.log
if [ $? -ne 0 ]
then
echo "test_file_operate.py case FAIL, exit"
exit 1
fi
exit 0