Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 57 lines (43 sloc) 1.055 kb
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
1 #!/bin/bash
2
46bbee1 @buzztroll copy propagation passing tests initial tests.
buzztroll authored
3
f488bae @buzztroll pychecker output
buzztroll authored
4 function wait_for_ready()
5 {
6 for i in `seq 1 10`
7 do
8 sleep 30
9 ${NIMBUS_HOME}/bin/nimbus-nodes -l
10 if [ $? -eq 0 ]; then
11 return
12 fi
13 done
14
15 echo "We could not get nimbus nodes to work after 10 tries"
16 }
17
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
18 tests="cc-prop2-test.py cc-unprop-md5test.py cc-propsamename-test.py cc-unprop-readwrite-test.py cc-prop-test.py cc-unprop-size-test.py cc-submit-common-unprop-size-test.py"
19
5affef0 @buzztroll copy tests
buzztroll authored
20 old='scp'
21 new='cp'
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
22
23 conf="${NIMBUS_HOME}/services/etc/nimbus/workspace-service/other/authz-callout-ACTIVE.xml"
24
25 bkup=`mktemp`
26 cp $conf $bkup
27
5affef0 @buzztroll copy tests
buzztroll authored
28 echo "setting up nimbus to use the cp propagation adapter"
29
30 cmd="sed -i s^$old^$new^ $conf"
31 echo $cmd
32 $cmd
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
33 ${NIMBUS_HOME}/bin/nimbusctl restart
f488bae @buzztroll pychecker output
buzztroll authored
34 wait_for_ready
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
35
5affef0 @buzztroll copy tests
buzztroll authored
36 function on_exit()
37 {
38 echo "return to default propagation adapter"
39 mv $bkup $conf
40 ${NIMBUS_HOME}/bin/nimbusctl restart
f488bae @buzztroll pychecker output
buzztroll authored
41 wait_for_ready
5affef0 @buzztroll copy tests
buzztroll authored
42 }
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
43
5affef0 @buzztroll copy tests
buzztroll authored
44 trap on_exit EXIT
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
45
46 for tst in $tests
47 do
48 echo "running $tst"
5affef0 @buzztroll copy tests
buzztroll authored
49 ./$tst
50 if [ $? -ne 0 ]; then
51 echo "FAILED"
52 exit 1
53 fi
09e8c07 @buzztroll trying to test out copy adapter
buzztroll authored
54 done
55
5affef0 @buzztroll copy tests
buzztroll authored
56 exit 0
Something went wrong with that request. Please try again.