#!/bin/sh # # test binary xplor distribution # # XPLOR_DIR=/opt/exp_soft/enmr/CIRMMP/xplor-nih/2.21/64 if [ "$USER" = "root" ]; then echo "You are running these tests as user 'root.'" echo " This is not necessary and is, in fact, dangerous." echo echo "Please, run this script as a normal unprivileged user, to" echo "avoid the possibility of damaging your system." exit 1 fi PATH="$XPLOR_DIR/bin:/usr/bin:/bin:$PATH"; export PATH ARCH=`uname -sr |sed 's/ /_/g'` if [ `uname` = "Linux" ]; then ARCH=`uname -sr | sed 's/\.[0-9a-z]\+\(-.\+\)\?$/_/' | \ sed 's/ /_/g'``uname -m` fi if [ -d $XPLOR_DIR/bin.$ARCH ]; then arch=$ARCH else #see if arch is in equivList arch=`grep $ARCH $XPLOR_DIR/arch/equivList|cut -d' ' -f1` fi [ "$TMPDIR" = "" ] && TMPDIR=/tmp WORKDIR=$TMPDIR/$USER-xplorNIH-test/$ARCH rm -rf $WORKDIR [ -d $WORKDIR ] || mkdirhier $WORKDIR failures="" echo "Running XPLOR tests:" (cd test env ARCH=$arch TESTDIR=`pwd` PATH=$XPLOR_DIR/test:$PATH \ ./runTests --run-dir $WORKDIR/xplor \ `cat f77Tests` `cat c++Tests` pyCmd tclCmd) if [ $? -eq 0 ]; then #cleanup rm -rf $WORKDIR/xplor else failures="$failures XPLOR" fi if [ -d $XPLOR_DIR/python ]; then echo "Running Python tests:" (cd python/tests; \ env ARCH=$arch PATH=$XPLOR_DIR/bin:$XPLOR_DIR/test:$PATH \ runTests --command "xplor -py" --run-dir $WORKDIR/python\ --suffix py `sed 's/\.py//g'