mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-08 11:57:44 +08:00
37 lines
774 B
Plaintext
37 lines
774 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
export PYTHONPATH=
|
||
|
export PATH=
|
||
|
|
||
|
OS=`uname -s`
|
||
|
|
||
|
rm_sync_data() {
|
||
|
rm -rf $1/ccnet.sock $1/seafile.ini $1/$1/logs $1/misc $1/seafile $1/seafile-data
|
||
|
}
|
||
|
|
||
|
run_test() {
|
||
|
nosetests -v -s test_cases/test_simple.py test_cases/test_release.py
|
||
|
if [ ${OS} != "Linux" -a ${OS} != "Darwin" ];
|
||
|
then
|
||
|
rm_sync_data cli1
|
||
|
rm_sync_data cli2
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
case $1 in
|
||
|
"test")
|
||
|
run_test
|
||
|
sleep 10
|
||
|
export ENCRYPTED_REPO=true
|
||
|
run_test;;
|
||
|
"clean")
|
||
|
if [ ${OS} = "Linux" -o ${OS} = "Darwin" ];
|
||
|
then
|
||
|
pkill -f "ccnet --daemon -c $(pwd)/cli1"
|
||
|
pkill -f "ccnet --daemon -c $(pwd)/cli2"
|
||
|
fi
|
||
|
rm -rf worktree1 worktree2
|
||
|
rm_sync_data cli1
|
||
|
rm_sync_data cli2;;
|
||
|
esac
|