diff --git a/scripts/zmap_test_suite.sh b/scripts/zmap_test_suite.sh index 2c348543dcab43fd3f075ec1ae9d1b053158bdf0..cacfdd053b78c9f1a528db8dfaa86d131e32675a 100755 --- a/scripts/zmap_test_suite.sh +++ b/scripts/zmap_test_suite.sh @@ -35,6 +35,10 @@ fi RELEASE_LOCATION=. } +zmap_message_out "Easier if we cd to $BASE_DIR" + +zmap_cd $BASE_DIR + # If you're in the scripts directory this file is in and would like to # test this script you'll need to run the following commands. @@ -92,8 +96,9 @@ zmap_message_out "got pid of '$X_APP_PID'" } # Set the file names +ZMAP_CONFIG_DIR=$BASE_DIR +ZMAP_CONFIG=$ZMAP_CONFIG_DIR/$USER.ZMap -ZMAP_CONFIG=/tmp/$USER.ZMap COMMAND_FILE=${USER}-xremote_gui.cmd CONFIG_FILE=${USER}-xremote.ini @@ -118,6 +123,7 @@ CONTEXT_FORMAT=context # N.B. Substitution _will_ occur in this HERE doc. cat <<EOF > $ZMAP_CONFIG || zmap_message_exit "Failed to write '$ZMAP_CONFIG'" +# Generated by $0 [ZMap] show_mainwindow=true [logging] @@ -128,9 +134,10 @@ EOF # N.B. Substitution _will_ occur in this HERE doc. cat <<EOF > $CONFIG_FILE || zmap_message_exit "Failed to write '$CONFIG_FILE'" +# Generated by $0 [programs] zmap-exe=$PROGRAM_PATH/zmap -zmap-options=--conf_dir /tmp --conf_file $USER.ZMap +zmap-options=--conf_dir $ZMAP_CONFIG_DIR --conf_file $USER.ZMap sgifaceserver-exe=$PROGRAM_PATH/sgifaceserver sgifaceserver-options=-readonly $DATABASE_LOCATION $PORT 0:0 @@ -174,6 +181,10 @@ $PROGRAM_PATH/xremote_gui \ --config-file $CONFIG_FILE \ --command-file $COMMAND_FILE || zmap_message_exit "Failed runing xremote_gui" +zmap_x11_restore_enviroment + +# We've finished with X now. +kill -9 $X_APP_PID # Now there should be # a) dumpfiles [$SEQUENCE.gff & $SEQUENCE.context] @@ -181,9 +192,17 @@ $PROGRAM_PATH/xremote_gui \ # c) no zmap process # d) no sgifaceserver process -zmap_x11_restore_enviroment -kill -9 $X_APP_PID + +# Now we need to test stuff. + +# grep CRITICAL zmap.log + +# diff $SEQUENCE.context gold.context + +# diff $SEQUENCE.gff gold.gff + + zmap_message_out "Reached end of '$SCRIPT_NAME'"