forked from nfs-ganesha/nfs-ganesha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_jenkins_sigmund.sh
executable file
·45 lines (33 loc) · 1023 Bytes
/
run_jenkins_sigmund.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
#!/bin/sh -x
#
#
# To be set externally:
# SERVERIP
# SIGMUND
if [[ -z $SERVERIP || -z $SIGMUND ]] ; then
echo "You must set SERVERIP and SIGMUND"
exit 1
fi
BASE=`pwd`
mkdir -p build
cd build
( cmake CCMAKE_BUILD_TYPE=Debug $BASE/src && make ) || exit 1
cd ..
# Make sure no other ganesha than the one we want to test is running
ssh $SERVERIP "pkill -9 ganesha.nfsd"
# Copy binaries
scp build/MainNFSD/ganesha.nfsd $SERVERIP:/tmp || exit 1
scp build/FSAL/FSAL_VFS/libfsalvfs.so.4.2.0 $SERVERIP:/tmp || exit 1
scp jenkins/ganesha.test.conf $SERVERIP:/tmp || exit 1
# start Ganesha remotely
ssh $SERVERIP "nohup /tmp/ganesha.nfsd -d -L /tmp/ganesha.log.$$ -f /tmp/ganesha.test.conf" &
# Wait 5 seconds
echo "Wait 60 seconds. The server must quit grace period"
sleep 60
# mount Ganesha
mount -o vers=3,lock $SERVERIP:/tmp /mnt || exit 1
# Run sigmund test as root
$SIGMUND nfs -j ./jenkins/sigmund_as_root.rc
# cleanup
umount /mnt
ssh $SERVERIP "pkill -9 ganesha.nfsd"