diff options
Diffstat (limited to 'check')
-rwxr-xr-x | check | 70 |
1 files changed, 54 insertions, 16 deletions
@@ -30,37 +30,75 @@ title() } -title Unit tests -python3 -m CoverageTestRunner --ignore-missing-from=without-tests ick2 +title Remote or local yarns? +remote=no +if [ "$#" -gt 0 ] +then + case "$1" in + https://*) + remote=yes + remote_url="$1" + shift 1 + ;; + local) + remote=no + shift 1 + ;; + *) + echo "Don't understand args: $@" 1>&2 + exit 1 + ;; + esac +fi +if [ "$remote" = no ] +then + echo "Run yarns against a locally managed instance" +else + echo "Run yarns against remote instance $remote_url" +fi -if [ -e .git ] +if [ "$remote" = no ] then - sources="$(git ls-files | grep -Fvxf copyright-exceptions)" + title Unit tests + python3 -m CoverageTestRunner --ignore-missing-from=without-tests ick2 - title Copyright statements - copyright-statement-lint $sources + if [ -e .git ] + then + sources="$(git ls-files | grep -Fvxf copyright-exceptions)" - title Copyright licences - ./is-agpl3+ $sources -fi + title Copyright statements + copyright-statement-lint $sources -python_sources="ick_controller.py worker_manager ick2" + title Copyright licences + ./is-agpl3+ $sources + fi -title pycodestyle -pycodestyle ick2 $python_sources + python_sources="ick_controller.py worker_manager ick2" -title pylint -pylint3 --rcfile pylint.conf $python_sources + title pycodestyle + pycodestyle ick2 $python_sources + + title pylint + pylint3 --rcfile pylint.conf $python_sources +fi title Yarns -yarn yarns/*.yarn \ +if [ "$remote" = no ] +then + impl=yarns/900-local.yarn + args="" +else + impl=yarns/900-remote.yarn + args="--env ICK_URL=$remote_url" +fi +yarn yarns/[^9]*.yarn yarns/900-implements.yarn "$impl" \ --shell python2 \ --shell-arg '' \ --shell-library yarns/lib.py \ --cd-datadir \ + $args \ "$@" - title OK echo "All tests pass" |