Permalink
Browse files

test framework changes

  • Loading branch information...
1 parent fb1dca9 commit 446b50597fb3ff1b0cb716c38ee13c85828d9c69 BuzzTroll committed Aug 16, 2010
Showing with 35 additions and 6 deletions.
  1. +5 −4 tests/bt-nimbus.sh
  2. 0 tests/cc-list-test.py
  3. +2 −0 tests/cc1-test.sh
  4. +11 −0 tests/install-nim.py
  5. +17 −2 tests/make-test-env.sh
View
@@ -1,16 +1,18 @@
#!/bin/bash
work_dir=$1
+bkdate=`date +%s`
function on_exit()
{
-# rm -rf $work_dir
+ echo "Cleaning up! $bkdate"
+ rm -rf $work_dir
rm -rf ~/.nimbus
rm -rf ~/.globus
mv ~/.nimbus.$bkdate ~/.nimbus
mv ~/.globus.$bkdate ~/.globus
+ mv ~/.ssh.$bkdate ~/.ssh
}
-bkdate=`date +%s`
if [ "X$work_dir" == "X" ]; then
work_dir=`mktemp --tmpdir=$HOME -d -t tmp.XXXXXXXXXX`
mv ~/.ssh ~/.ssh.$bkdate
@@ -52,10 +54,9 @@ cd $src_dir
cnt="0"
error_cnt="0"
error_ts=""
-touch test.log
for t in *test.{sh,py}
do
- ./$t | tee -a test.log
+ ./$t 2>&1 | tee $t.log
if [ $PIPESTATUS -ne 0 ]; then
echo "$cnt parent tests passed (many more subtests were run)"
echo "the test $t failed"
View
0 tests/cc-list-test.py 100644 → 100755
No changes.
View
@@ -1,5 +1,7 @@
#!/bin/bash
+ls -l ~/.ssh/
+
cd $CLOUD_CLIENT_HOME
./bin/grid-proxy-init.sh
./bin/cloud-client.sh --delete --name group
View
@@ -1,5 +1,7 @@
import pexpect
import sys
+from ConfigParser import SafeConfigParser
+
cmd = "%s %s" % (sys.argv[1], sys.argv[2])
logfile = sys.stdout
@@ -12,3 +14,12 @@
child.sendline ('localhost')
x = child.readlines()
print x
+
+try:
+ print "setting up ssh knowhosts"
+ child = pexpect.spawn (cmd, timeout=8, maxread=20000, logfile=logfile)
+ child.expect ('(yes/no)?')
+ print child.before
+ child.sendline ('yes')
+except:
+ pass
View
@@ -7,6 +7,21 @@ if [ "X$work_dir" == "X" ]; then
exit 1
fi
+if [ -e $HOME/.ssh ]; then
+ echo "this will destroy your .ssh dir! please back it up first"
+ exit 1
+fi
+if [ -e $HOME/.globus ]; then
+ echo "this will destroy your .globus dir! please back it up first"
+ exit 1
+fi
+if [ -e $HOME/.nimbus ]; then
+ echo "this will destroy your .nimbus dir! please back it up first"
+ exit 1
+fi
+
+
+
bd=`dirname $0`
cd $bd
src_dir=`pwd`
@@ -38,13 +53,13 @@ echo "Configuring propagation only mode"
echo "========================================="
cp -r $repo_dir/nimbus/control/ $work_dir
-ssh-keygen -N "" -f $work_dir/keys
+ssh-keygen -N "" -f ~/.ssh/id_rsa
cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.back.$bkdate
touch ~/.ssh/authorized_keys
cat $work_dir/keys.pub >> ~/.ssh/authorized_keys
user=`whoami`
-sed -e "s^@KEY@^$work_dir/keys^" -e "s/@WHO@/$user/" $src_dir/autoconfig-decisions.sh.in > $install_dir/services/share/nimbus-autoconfig/autoconfig-decisions.sh
+sed -e "s^@KEY@^$HOME/.ssh/id_rsa^" -e "s/@WHO@/$user/" $src_dir/autoconfig-decisions.sh.in > $install_dir/services/share/nimbus-autoconfig/autoconfig-decisions.sh
cat $install_dir/services/share/nimbus-autoconfig/autoconfig-decisions.sh

0 comments on commit 446b505

Please sign in to comment.