From 69b4b1fd25f93aadbad3e878f04a352a4a0ed1af Mon Sep 17 00:00:00 2001 From: Ross Lazarus Date: Sat, 22 May 2010 19:47:50 -0400 Subject: [PATCH] Require two paths for rgtest.sh galaxyroot and outroot test with a /tmp path for outroot...this script will recreate all the snp/wga test outputs if you ask it to - which may or may not be what you want... --- tools/rgenetics/rgEigPCA.xml | 2 +- tools/rgenetics/rgtest.sh | 27 +++++++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/tools/rgenetics/rgEigPCA.xml b/tools/rgenetics/rgEigPCA.xml index eb0885111f6..a595a81390e 100644 --- a/tools/rgenetics/rgEigPCA.xml +++ b/tools/rgenetics/rgEigPCA.xml @@ -48,7 +48,7 @@ - + diff --git a/tools/rgenetics/rgtest.sh b/tools/rgenetics/rgtest.sh index 2235e3d85ee..c9df93058f7 100755 --- a/tools/rgenetics/rgtest.sh +++ b/tools/rgenetics/rgtest.sh @@ -1,14 +1,33 @@ #!/bin/sh # script to generate all functional test outputs for each rgenetics tool # could be run at installation to ensure all dependencies are in place? -GALAXYROOT=`pwd` -echo "using $GALAXYROOT" +if test $# -lt 2 +then + echo "We need to agree on 2 parameters - GalaxyRoot and OutRoot - use paths to galaxy and galaxy to re-create all test outputs" + echo "or more prudently, galaxy and /tmp/foo for checking without updating all your test-data" + echo "Exiting with no changes" + exit 1 +fi +if [ $1 ] +then + GALAXYROOT=$1 +else + GALAXYROOT=`pwd` +fi +if [ $2 ] +then + OUTROOT=$2 +else + OUTROOT=`pwd` + OUTROOT="$OUTROOT/test-data" +fi +echo "using $GALAXYROOT as galaxyroot and $OUTROOT as outroot" # change this as needed for your local install INPATH="${GALAXYROOT}/test-data" BINPATH="${GALAXYROOT}/tool-data/rg/bin" TOOLPATH="${GALAXYROOT}/tools/rgenetics" -OROOT="${GALAXYROOT}/test-data/rgtestouts" -NORMALOROOT="${GALAXYROOT}/test-data" +OROOT="${OUTROOT}/test-data/rgtestouts" +NORMALOROOT="${OUTROOT}/test-data" mkdir -p $OROOT rm -rf $OROOT/* # needed for testing - but tool versions should be bumped if this is rerun?