diff options
-rwxr-xr-x | run_tests.sh | 7 | ||||
-rwxr-xr-x | test/test_suite.sh | 17 |
2 files changed, 24 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 0000000..e8b7d49 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# download shunit2 in order to run tests: +# curl -L "https://dl.dropboxusercontent.com/u/7916095/shunit2-2.0.3.tgz" | tar zx --overwrite + +cd test +./test_suite.sh | tee /dev/stderr | grep -q 'success rate: 100%' diff --git a/test/test_suite.sh b/test/test_suite.sh new file mode 100755 index 0000000..c6aa38e --- /dev/null +++ b/test/test_suite.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +gemma=../bin/gemma + +testCenteredRelatednessMatrix() { + $gemma -g ../example/mouse_hs1940.geno.txt.gz -p ../example/mouse_hs1940.pheno.txt \ + -a ../example/mouse_hs1940.anno.txt -gk -o mouse_hs1940 + assertEquals "3763600" `wc -w < output/mouse_hs1940.cXX.txt` +} + +shunit2=`which shunit2` +if [ -x "$shunit2" ]; then + . $shunit2 +else + # try to run the locally installed shunit2 + . ../shunit2-2.0.3/src/shell/shunit2 +fi |