ADDED tests/tests/manual_example/results/results.csv Index: tests/tests/manual_example/results/results.csv ================================================================== --- /dev/null +++ tests/tests/manual_example/results/results.csv @@ -0,0 +1,1 @@ +category, variable, expected, value, tol, units, comment ADDED tests/tests/manual_example/runsetupxterm.sh Index: tests/tests/manual_example/runsetupxterm.sh ================================================================== --- /dev/null +++ tests/tests/manual_example/runsetupxterm.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ $TARGETDISPLAY = "" || $TARGETHOST = "" || $TARGETDIR = "" || $TARGETUSER = "" ]]; then + msg="You must set the TARGETDISPLAY, TARGETHOST, TARGETDIR and TARGETUSER variables for manual tests" + echo $msg + megatest -test-status :state COMPLETED :status FAIL -m $msg + exit 1 +else + megatest -step setup :state start :status n/a + xterm -display $TARGETDISPLAY -e ./setupremote.sh + megatest -step setup :state end :status $? +fi + ADDED tests/tests/manual_example/setupremote.sh Index: tests/tests/manual_example/setupremote.sh ================================================================== --- /dev/null +++ tests/tests/manual_example/setupremote.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +megatest -step rsyncto :state start :status n/a +echo "First, lets populate your area with necessary files, you may be prompted for your Unix password several times" +rsync -avz $MT_TEST_RUN_DIR/ $TARGETUSER@$TARGETHOST:$TARGETDIR +megatest -step rsyncto :state end :status n/a + +megatest -step runtest :state start :status n/a +remotecmd="cd $TARGETDIR;xterm -display $TARGETDISPLAY" +echo Launching $remotecmd on $TARGETHOST as $TARGETUSER +ssh $TARGETUSER@$TARGETHOST $remotecmd +megatest -step runtest :state end :status $? + +megatest -step gatherdata :state start :status n/a +rsync -avz $TARGETUSER@$TARGETHOST:$TARGETDIR/results/ $MT_TEST_RUN_DIR/results/ +if [[ -e $MT_TEST_RUN_DIR/results/results.csv ]]; then + megatest -load-data < $MT_TEST_RUN_DIR/results/results.csv +fi + +if [[ -e $MT_TEST_RUN_DIR/results/final_results.log && $MT_TEST_RUN_DIR/final_results.logpro ]]; then + logpro $MT_TEST_RUN_DIR/final_results.logpro $MT_TEST_RUN_DIR/final_results.html < $MT_TEST_RUN_DIR/results/final_results.log + if [[ $? = 0 ]]; then + finalstatus=PASS + else + finalstatus=FAIL + fi + megatest -test-status :state COMPLETED :status $finalstatus -setlog final_results.html +fi ADDED tests/tests/manual_example/testconfig Index: tests/tests/manual_example/testconfig ================================================================== --- /dev/null +++ tests/tests/manual_example/testconfig @@ -0,0 +1,13 @@ +[setup] + +[ezsteps] +setup ./runsetupxterm.sh +# launch launchxterm + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass + using a simple logpro file. +tags first,single +reviewed 09/10/2011, by Matt