Permalink
Browse files

more testing framework for cloud client test

  • Loading branch information...
BuzzTroll
BuzzTroll committed Aug 13, 2010
1 parent 8d25635 commit 8fe5c30dd006e63c8f502f53d1d5bf0d1aa43fc7
Showing with 71 additions and 6 deletions.
  1. +35 −0 tests/autoconfig-decisions.sh.in
  2. +10 −5 tests/bt-nimbus.sh
  3. +12 −1 tests/cc1-test.sh
  4. +14 −0 tests/install-nim.py
@@ -0,0 +1,35 @@
+# This file is sourced by "autoconfig-adjustments.sh" before it runs.
+
+# File contents injected @ Fri Aug 13 10:57:25 CDT 2010
+
+NIMBUS_CONFIG_CONTAINER_RUNNER="@WHO@"
+export NIMBUS_CONFIG_CONTAINER_RUNNER
+
+NIMBUS_CONFIG_VMM_RUNNER="@WHO@"
+export NIMBUS_CONFIG_VMM_RUNNER
+
+NIMBUS_CONFIG_VMM_RUN_KEY="@KEY@"
+export NIMBUS_CONFIG_VMM_RUN_KEY
+
+NIMBUS_CONFIG_CONTAINER_HOSTNAME="localhost"
+export NIMBUS_CONFIG_CONTAINER_HOSTNAME
+
+NIMBUS_CONFIG_SSH_USE_CONTACT_STRING="@WHO@@localhost"
+export NIMBUS_CONFIG_SSH_USE_CONTACT_STRING
+
+NIMBUS_CONFIG_SSH_USE_CONTACT_PORT="22"
+export NIMBUS_CONFIG_SSH_USE_CONTACT_PORT
+
+NIMBUS_CONFIG_TEST_VMM="localhost"
+export NIMBUS_CONFIG_TEST_VMM
+
+NIMBUS_CONFIG_TEST_VMM_RAM="256"
+export NIMBUS_CONFIG_TEST_VMM_RAM
+
+NIMBUS_CONFIG_VMM_CONTROL_EXE="/home/nimbus/nimbus-controls-2.5/workspace-control/bin/workspace-control.sh"
+export NIMBUS_CONFIG_VMM_CONTROL_EXE
+
+NIMBUS_CONFIG_VMM_CONTROL_TMPDIR="/home/nimbus/nimbus-controls-2.5/workspace-control/var/workspace-control/tmp"
+export NIMBUS_CONFIG_VMM_CONTROL_TMPDIR
+
+
View
@@ -83,40 +83,45 @@ echo $key
cp $install_dir/var/ca/ca-certs/* lib/certs/
cp $cp conf/
+
+mv ~/.nimbus ~/.nimbus.bak
mkdir ~/.nimbus
+mkdir ~/.globus
cp $cert ~/.nimbus/
cp $key ~/.nimbus/
-./bin/grid-proxy-init.sh
+cp -r ~/.nimbus ~/.globus
+./bin/grid-proxy-init.sh
echo "========================================="
echo "Starting the services"
echo "========================================="
cd $install_dir
+pkill cumulus
./bin/nimbusctl restart
if [ $? -ne 0 ]; then
echo "something somewhere went wrong. look through the output above"
exit 1
fi
+echo $work_dir
+export NIMBUS_HOME=$install_dir
+export NIMBUS_TEST_USER=$user_name
echo "========================================="
echo "Run tests...."
echo "========================================="
cd $src_dir
for t in *test.sh
do
- ./t
+ ./$t
if [ $? -ne 0 ]; then
echo "the test $t failed"
exit 1
fi
done
-echo $work_dir
-export NIMBUS_HOME=$install_dir
-export NIMBUS_TEST_USER=$user_name
#rm -rf $work_dir
#mv ~/.ssh/authorized_keys.back ~/.ssh/authorized_keys
View
@@ -1,6 +1,7 @@
#!/bin/bash
cd $CLOUD_CLIENT_HOME
+./bin/grid-proxy-init.sh
./bin/cloud-client.sh --transfer --sourcefile /etc/group
if [ $? -ne 0 ]; then
echo "upload failed"
@@ -11,11 +12,21 @@ if [ $? -ne 0 ]; then
echo "list failed"
exit 1
fi
-./bin/cloud-client.sh --run --hours .2 --name group
+handle_line=`./bin/cloud-client.sh --run --hours .2 --name group | tail -n 1`
if [ $? -ne 0 ]; then
echo "run failed"
exit 1
fi
+echo $handle_line
+handle=`echo $handle_line | sed "s/.*Running: //" | sed "s/'//g"`
+echo "++"
+echo $handle
+./bin/cloud-client.sh --terminate --handle $handle
+if [ $? -ne 0 ]; then
+ echo "terminate failed"
+ exit 1
+fi
+
exit 0
View
@@ -0,0 +1,14 @@
+import pexpect
+import sys
+
+cmd = "%s %s" % (sys.argv[1], sys.argv[2])
+logfile = sys.stdout
+child = pexpect.spawn (cmd, timeout=800, maxread=200000, logfile=logfile)
+child.expect ('CA Name:')
+print child.before
+child.sendline ('CA')
+child.expect ('Hostname:')
+print child.before
+child.sendline ('localhost')
+x = child.readlines()
+print x

0 comments on commit 8fe5c30

Please sign in to comment.