All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 265047ce authored by David Johnson's avatar David Johnson

Handle test dirs vs test names correctly.

(Note new extra argument to test-hadoop.sh .)
parent c2f35500
Pipeline #1895 passed with stage
in 2 seconds
...@@ -38,12 +38,13 @@ file, currently). ...@@ -38,12 +38,13 @@ file, currently).
You can run ``test-hadoop.sh`` as follows:: You can run ``test-hadoop.sh`` as follows::
USAGE: test-hadoop.sh <testdir> <user-tenant> <service-tenant> <networkname> USAGE: test-hadoop.sh <testdir> <testname> <user-tenant> <service-tenant> <networkname>
<bridgename> <num-slaves> [<hadoop-args>] <bridgename> <num-slaves> [<hadoop-args>]
The `testdir` argument specifies a directory where results from the test The `testdir` argument specifies a directory where results from the test
(logfiles, OpenVSwitch flow tables, etc) are placed. If this directory (logfiles, OpenVSwitch flow tables, etc) are placed. If this directory
doesn't exist, it will be created. `user-tenant` and `service-tenant` doesn't exist, it will be created. The `testname` allows you to prefix
the result subdirectories with a name. `user-tenant` and `service-tenant`
are project names; the user tenant will host nodes and a workflow agent; are project names; the user tenant will host nodes and a workflow agent;
the service tenant will host only a service workflow agent that installs the service tenant will host only a service workflow agent that installs
Hadoop. `networkname` is the virtual shared OpenStack Capnet network Hadoop. `networkname` is the virtual shared OpenStack Capnet network
...@@ -58,8 +59,8 @@ you specify two slaves, you'll wind up with four VMs. You could do that ...@@ -58,8 +59,8 @@ you specify two slaves, you'll wind up with four VMs. You could do that
like this:: like this::
cd /root/setup/capnet/networking-capnet/cloudlab cd /root/setup/capnet/networking-capnet/cloudlab
mkdir test1 mkdir testdir
tests/test-hadoop.sh test1 tenant-0 service-0 capnetlan-1 br-capnetlan-1 2 tests/test-hadoop.sh testdir test1 tenant-0 service-0 capnetlan-1 br-capnetlan-1 2
Once you've run the test, you can run the cleanup scripts. Once you've run the test, you can run the cleanup scripts.
``test-cleanup-tenant.sh`` removes all nodes and workflow agents from a ``test-cleanup-tenant.sh`` removes all nodes and workflow agents from a
......
...@@ -24,8 +24,8 @@ DIRNAME=`dirname $0` ...@@ -24,8 +24,8 @@ DIRNAME=`dirname $0`
. "$DIRNAME/test-lib.sh" . "$DIRNAME/test-lib.sh"
. "$SETUPLIB" . "$SETUPLIB"
if [ $# -lt 6 ]; then if [ $# -lt 7 ]; then
echo "USAGE: $0 <testdir> <user-tenant> <service-tenant> <networkname>" echo "USAGE: $0 <testdir> <testname> <user-tenant> <service-tenant> <networkname>"
echo " <bridgename> <num-slaves> [<hadoop-args>]" echo " <bridgename> <num-slaves> [<hadoop-args>]"
exit 1 exit 1
fi fi
...@@ -38,6 +38,8 @@ FASTBOOT=0 ...@@ -38,6 +38,8 @@ FASTBOOT=0
TESTDIR=$1 TESTDIR=$1
shift shift
TESTNAME=$1
shift
UTENANT=$1 UTENANT=$1
shift shift
STENANT=$1 STENANT=$1
...@@ -67,9 +69,10 @@ PNHOSTS="$PCHOSTS" ...@@ -67,9 +69,10 @@ PNHOSTS="$PCHOSTS"
fqdn=`getfqdn $NETWORKMANAGER` fqdn=`getfqdn $NETWORKMANAGER`
PNHOSTS="-H $fqdn $PCHOSTS" PNHOSTS="-H $fqdn $PCHOSTS"
echo "*** Testing hadoop: $TESTDIR $UTENANT $STENANT $NETWORK $BRIDGE $NSLAVES \"$ARGS\" ..." echo "*** Testing hadoop: $TESTDIR $TESTNAME $UTENANT $STENANT $NETWORK $BRIDGE $NSLAVES \"$ARGS\" ..."
mkdir -p $TESTDIR mkdir -p $TESTDIR
cd $TESTDIR
# NB: Be admin when we fire off wfas... # NB: Be admin when we fire off wfas...
. "$OURDIR/admin-openrc.sh" . "$OURDIR/admin-openrc.sh"
......
...@@ -11,7 +11,9 @@ DIRNAME=`dirname $0` ...@@ -11,7 +11,9 @@ DIRNAME=`dirname $0`
. "$DIRNAME/test-lib.sh" . "$DIRNAME/test-lib.sh"
. "$SETUPLIB" . "$SETUPLIB"
TESTBASEDIRNAME="test" HOMEDIR=`readlink -f ~`
TESTBASEDIRNAME="$HOMEDIR/capnet-tests"
TESTBASENAME="test"
SIZES="50 100 150 200" SIZES="50 100 150 200"
ITERATIONS=5 ITERATIONS=5
UTENANT="tenant-0" UTENANT="tenant-0"
...@@ -22,6 +24,9 @@ BRIDGE="br-capnetlan-1" ...@@ -22,6 +24,9 @@ BRIDGE="br-capnetlan-1"
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then
TESTBASEDIRNAME="$1" TESTBASEDIRNAME="$1"
fi fi
if [ $# -gt 2 ]; then
TESTBASENAME="$2"
fi
for size in $SIZES ; do for size in $SIZES ; do
j=0 j=0
...@@ -55,11 +60,12 @@ for size in $SIZES ; do ...@@ -55,11 +60,12 @@ for size in $SIZES ; do
# Ok, run the test. # Ok, run the test.
# #
echo "Running test-$size-$j ..." echo "Running test-$size-$j ..."
testname="${TESTBASEDIRNAME}-${size}-${j}" testname="${TESTBASENAME}-${size}-${j}"
mkdir -p "$testname" testdir="${TESTBASEDIRNAME}/${TESTBASENAME}"
$DIRNAME/test-hadoop.sh $testname $UTENANT $STENANT \ mkdir -p "$testdir"
$DIRNAME/test-hadoop.sh "$testdir" "$testname" $UTENANT $STENANT \
$NETWORK $BRIDGE $size | tee $testname/test.log 2>&1 $NETWORK $BRIDGE $size | tee $testname/test.log 2>&1
echo "Finished test-$size-$j ..." echo "Finished $testname (results in $TESTBASEDIRNAME/$testname)..."
done done
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment