diff --git a/wrapper/launch.sh b/wrapper/launch.sh new file mode 100755 index 0000000..9665abe --- /dev/null +++ b/wrapper/launch.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +eval "$@" diff --git a/wrapper/lib/condorSubmit.htc b/wrapper/lib/condorSubmit.htc new file mode 100644 index 0000000..18c0d86 --- /dev/null +++ b/wrapper/lib/condorSubmit.htc @@ -0,0 +1,10 @@ +should_transfer_files = YES +when_to_transfer_output = ON_EXIT +request_memory = 100G + +output = out.$(Process) +error = err.$(Process) +log = log.$(Process) + +queue 1 + diff --git a/wrapper/test.sh b/wrapper/test.sh new file mode 100644 index 0000000..1198f9f --- /dev/null +++ b/wrapper/test.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +#adapted from http://eradman.com/posts/ut-shell-scripts.html + +typeset -i tests_run=0 + +function try { this="$1"; } + +trap 'printf "$0: exit code $? on line $LINENO\nFAIL: $this\n"; exit 1' ERR + +#check returned value is what is expected +function assert { + let tests_run+=1 + [ "$1" = "$2" ] && { echo -n "."; return; } + printf "\nFAIL: $this\n'$1' != '$2'\n"; exit 1 +} + +#check the script fails as expected +function assert_fail { + let tests_run+=1 + echo $code + [ "${1//$2}" != "${1}" ] && { echo -n "."; return; } + printf "\nFAIL: $this\n '$1' exit code = 0\n"; exit 1 +} + +#check we are in an empty directory to avoid deleting files +if [ "`ls`" != "" ] + then + echo "ERROR: Run this script in an empty directory!!!!!" + exit 1; +fi + +echo; echo "PASS: $tests_run tests run" +