From d6098a5f318543b525878c6cf45ddfe8ec923d9d Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 16 Jul 2017 11:05:39 +0000 Subject: sunit2: added instructions --- .gitignore | 1 + INSTALL.md | 17 +++++++++++++++++ run_tests.sh | 3 +-- test/test_suite.sh | 12 +++++++++--- 4 files changed, 28 insertions(+), 5 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/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 -- cgit v1.2.3