#!/bin/sh # Copyrights : CNRS # Author : Oleg Lodygensky # Acknowledgment : XtremWeb-HEP is based on XtremWeb 1.8.0 by inria : http://www.xtremweb.net/ # Web : http://www.xtremweb-hep.org # # This file is part of XtremWeb-HEP. # # XtremWeb-HEP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # XtremWeb-HEP is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with XtremWeb-HEP. If not, see . # # # # File : xtremweb.testxml.sh # # Purpose : this is only intended to test XML representation # this is supposed to be run from source distribution # # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # ** DO NOT EDIT ** # ** This file is generated by install script ** # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< # PRG=$0 # # resolve symlinks # while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` if expr "$link" : '^/' 2> /dev/null >/dev/null; then PRG="$link" else PRG="`dirname $PRG`/$link" fi done progdir=`dirname $PRG` progname=`basename $0` currentDir=`pwd` cd $progdir ROOTDIR=`pwd`/../../ cd $currentDir ###################################################### # Main ###################################################### CFG="/opt/XWHEP-5.8.0/conf/xtremweb.client.conf" if [ ! -f $CFG ] ; then echo "can't find $CFG" exit 2 fi XWJAR=$ROOTDIR/build/dist/lib/xtremweb.jar if [ ! -f $XWJAR ] ; then echo "can't find $XWJAR" exit 2 fi ATTICJAR=$ROOTDIR/classes/attic-all-0.3.jar if [ ! -f $ATTICJAR ] ; then echo "can't find $XWJAR" exit 2 fi CP="$ATTICJAR:$XWJAR" for i in `ls $ROOTDIR/src/xtremweb/common/*Interface.java` ; do bs=`basename $i| cut -d '.' -f 1 ` [ "$bs" = "XMLRPCCommand" ] && continue echo $bs XML="/tmp/$bs.xml" echo "java -cp $CP xtremweb.common.$bs > $XML" java -cp $CP xtremweb.common.$bs | grep -E "^ $XML echo "java -cp $CP xtremweb.common.$bs $XML" java -cp $CP xtremweb.common.$bs $XML XMLNOHEADER="/tmp/$bs.xml-noheader" echo "cat $XML | sed 's///' | sed 's/<\/xwhep>//' > $XMLNOHEADER" cat $XML | sed 's///' | sed 's/<\/xwhep>//' > $XMLNOHEADER echo "java -cp $CP xtremweb.common.$bs $XMLNOHEADER" java -cp $CP xtremweb.common.$bs $XMLNOHEADER diff $XML $XMLNOHEADER # rm -f $XML $XMLNOHEADER done for i in `ls $ROOTDIR/src/xtremweb/communications/XMLRPCCommand*.java` ; do bs=`basename $i| cut -d '.' -f 1 ` [ "$bs" = "XMLRPCCommand" ] && continue echo $bs XML="/tmp/$bs.xml" echo "java -cp $CP xtremweb.communications.$bs $CFG > $XML" java -cp $CP xtremweb.communications.$bs $CFG | grep -E "^ $XML echo "java -cp $CP xtremweb.communications.$bs $CFG $XML" java -cp $CP xtremweb.communications.$bs $CFG $XML XMLNOHEADER="/tmp/$bs.xml-noheader" cat $XML | sed 's///' | sed 's/<\/xwhep>//' > $XMLNOHEADER echo "java -cp $CP xtremweb.communications.$bs $CFG $XMLNOHEADER" java -cp $CP xtremweb.communications.$bs $CFG $XMLNOHEADER done # # End Of File #