• Home
  • Raw
  • Download

Lines Matching +full:unit +full:- +full:tests

9 #     http://www.apache.org/licenses/LICENSE-2.0
23 # $ ./test.sh py-unit # run Python unit tests
24 # $ ./test.sh all # all tests
26 # If no function is provided all of the unit tests will be run.
28 set -o nounset
29 set -o pipefail
30 set -o errexit
39 # Fully Automated Tests
42 # Run all Python unit tests.
46 # $ ./test.sh py-unit tests/fastrand_test.py
48 # TODO: Separate out deterministic tests from statistical tests (which may
50 py-unit() {
53 if test $# -gt 0; then
58 # -e: exit at first failure
59 find $REPO_ROOT -name \*_test.py | sh -x -e
64 if test $exit_code -eq 0; then
65 echo 'ALL TESTS PASSED'
70 set -o errexit
73 # All tests
75 banner "Running Python unit tests"
76 py-unit
79 banner "Running R unit tests"
80 r-unit
88 py-lint
92 doc-lint
95 python-lint() {
98 if pep8 --ignore=E111 "$@"; then
108 py-lint() {
109 which pep8 >/dev/null || die "pep8 not installed ('sudo apt-get install pep8' on Ubuntu)"
111 # - Skip _tmp dir, because we are downloading cpplint.py there, and it has
113 # - Exclude setup.py, because it's a config file and uses "invalid" 'name =
116 \( -name _tmp -a -prune \) -o \
117 \( -name \*.py -a -print \) \
118 | grep -v /setup.py \
119 | xargs --verbose -- $0 python-lint
122 r-unit() {
123 set -o xtrace # show tests we're running
126 tests/compare_dist_test.R
128 tests/gen_counts_test.R
130 tests/gen_true_values_test.R
137 doc-lint() {
141 # -e: show only errors and warnings
142 # -q: quiet
143 tidy -e -q $doc || true
149 spell-all() {
155 # Smoke Tests. These can be manually run.
158 gen-true-values() {
165 tests/gen_true_values.R \
167 wc -l $out
171 if test $# -eq 0 ; then