-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21120e0
commit 71e66b6
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
eval "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
|