about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--INSTALL.md17
-rw-r--r--README.md2
-rwxr-xr-xrun_tests.sh3
-rwxr-xr-xtest/test_suite.sh12
5 files changed, 29 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index d6c227e..5088ec4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ doc/manual.blg
 doc/manual.log
 doc/manual.out
 doc/manual.toc
+contrib/
diff --git a/INSTALL.md b/INSTALL.md
index de6558b..e4da6ff 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -52,3 +52,20 @@ path. E.g. on GNU Guix with shared libs this may work
 to run GEMMA tests
 
     make check
+
+## Run tests
+
+GEMMA uses the shunit2 test framework (version 2.0) and can be found
+[here](https://github.com/genenetwork/shunit2)
+
+In the source tree:
+
+    git clone https://github.com/genenetwork/shunit2 contrib/shunit2
+
+and run
+
+    make check
+
+or
+
+    ./run_tests.sh
diff --git a/README.md b/README.md
index 0dfac6c..fe37f1a 100644
--- a/README.md
+++ b/README.md
@@ -84,7 +84,7 @@ statistics, please cite:
 
 + Xiang Zhou (2016). [A unified framework for variance component
 estimation with summary statistics in genome-wide association
-studies.](https://doi.org/10.1101/042846) *bioRxiv* 042846.
+studies.](https://doi.org/10.1101/042846) *Annals of Applied Statistics*, in press.
 
 ## License
 
diff --git a/run_tests.sh b/run_tests.sh
index e8b7d49..181f687 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -1,7 +1,6 @@
 #!/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
+# download shunit2 in order to run tests (see INSTALL.md)
 
 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
index d65bf40..f1a1c6f 100755
--- a/test/test_suite.sh
+++ b/test/test_suite.sh
@@ -40,9 +40,15 @@ testMultivariateLinearMixedModel() {
 }
 
 shunit2=`which shunit2`
-if [ -x "$shunit2" ]; then
+if [ -e "../contrib/shunit2/source/2.0/src/shell/shunit2" ]; then
+    echo try to run the locally installed shunit2
+    . ../contrib/shunit2/source/2.0/src/shell/shunit2
+elif [ -e "../shunit2-2.0.3/src/shell/shunit2" ]; then
+    echo try to run the older locally installed shunit2
+    . ../shunit2-2.0.3/src/shell/shunit2
+elif [ -x "$shunit2" ]; then
+    echo run system shunit2
     . $shunit2
 else
-    # try to run the locally installed shunit2
-    . ../shunit2-2.0.3/src/shell/shunit2
+    echo "Can not find shunit2 - see INSTALL.md"
 fi