diff --git a/benchmarks/time-test.sh b/benchmarks/time-test.sh index 99550cf03d..6e2055c7ab 100755 --- a/benchmarks/time-test.sh +++ b/benchmarks/time-test.sh @@ -214,7 +214,7 @@ test-print-header() { --print-header --rusage --stdout DUMMY --tsv --field a --field b assert $? -eq 0 - set -x + #set -x head _tmp/time-test-1 } @@ -253,23 +253,8 @@ test-time-helper() { assert $? -eq 2 } - -all-passing() { - test-usage - test-csv - test-tsv - test-append - # Spews some errors - test-bad-tsv-chars - test-stdout - test-rusage - test-maxrss - test-print-header - - test-time-helper - - echo - echo "All tests in $0 passed." +soil-run() { + run-test-funcs } "$@" diff --git a/soil/worker.sh b/soil/worker.sh index baf71a4385..b24d39a9fa 100755 --- a/soil/worker.sh +++ b/soil/worker.sh @@ -102,24 +102,24 @@ dev-minimal-tasks() { # (task_name, script, action, result_html) cat </dev/null || true # dogfood for OSH -source test/common.sh # $OSH, run-all +source test/common.sh # $OSH, run-test-funcs readonly GOLD_DIR='test/gold' @@ -152,20 +152,16 @@ FAIL-test-ostype() { } # TODO: -# - Add --allowed-failures mechanism -# - and maybe a timeout -# -# Does it make sense to have some sort of TAP-like test protocol? -# - Probably not when it's one test cases per process -# - But spec/ and spec/stateful have multiple test cases per file - -all-passing() { - test-func-manifest | xargs --verbose -- $0 run-all -} +# - Run the failing tests, and add an --allowed-failures mechanism +# - and a timeout for big-here-doc # TODO: Turn it into a table? run-for-release() { - run-other-suite-for-release gold all-passing + run-other-suite-for-release gold run-test-funcs +} + +soil-run() { + run-test-funcs } "$@" diff --git a/test/opyc.sh b/test/opyc.sh index dd743839d5..b6f89e8ab4 100755 --- a/test/opyc.sh +++ b/test/opyc.sh @@ -105,12 +105,8 @@ FAIL-test-help() { bin/opyc --help } -all-passing() { - test-func-manifest | xargs --verbose -- $0 run-all -} - run-for-release() { - run-other-suite-for-release opyc all-passing + run-other-suite-for-release opyc run-test-funcs } soil-run() { @@ -123,7 +119,7 @@ soil-run() { # Has to come after the previous step make _build/opy/py27.grammar.marshal - all-passing + run-test-funcs } diff --git a/test/osh-usage.sh b/test/osh-usage.sh index 228b59495f..3116fcccd6 100755 --- a/test/osh-usage.sh +++ b/test/osh-usage.sh @@ -182,12 +182,12 @@ test-version() { assert $? -eq 0 } -all-passing() { - test-func-manifest | xargs --verbose -- $0 run-all +run-for-release() { + run-other-suite-for-release osh-usage run-test-funcs } -run-for-release() { - run-other-suite-for-release osh-usage all-passing +soil-run() { + run-test-funcs } "$@" diff --git a/test/osh2oil.sh b/test/osh2oil.sh index 4bbdfd6abe..46a13a734c 100755 --- a/test/osh2oil.sh +++ b/test/osh2oil.sh @@ -1348,7 +1348,13 @@ list-all-tests() { } all-passing() { - run-all "${PASSING[@]}" + for t in "${PASSING[@]}"; do + $t + echo "OK $t" + done + + echo + echo "All $0 tests passed." } run-for-release() { diff --git a/test/oshc-deps.sh b/test/oshc-deps.sh index 9e696c546a..34711abf46 100755 --- a/test/oshc-deps.sh +++ b/test/oshc-deps.sh @@ -89,12 +89,12 @@ grep DEPS } -all-passing() { - test-func-manifest | xargs --verbose -- $0 run-all +run-for-release() { + run-other-suite-for-release oshc-deps run-test-funcs } -run-for-release() { - run-other-suite-for-release oshc-deps all-passing +soil-run() { + run-test-funcs } "$@"