diff mbox

[1/5] docker: pass additional args to manage.py test

Message ID 20170711184139.94122-1-sean@farley.io
State Accepted
Headers show

Commit Message

Sean Farley July 11, 2017, 6:41 p.m. UTC
Signed-off-by: Sean Farley <sean@farley.io>
---
 tools/docker/entrypoint.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Stephen Finucane July 12, 2017, 8:50 a.m. UTC | #1
On Tue, 2017-07-11 at 11:41 -0700, Sean Farley wrote:
> Signed-off-by: Sean Farley <sean@farley.io>

I tend to use tox (via '--quick-tox') myself, but this looks good to me.

Reviewed-by: Stephen Finucane <stephen@that.guru>

...applied.
Sean Farley July 12, 2017, 6:19 p.m. UTC | #2
Stephen Finucane <stephen@that.guru> writes:

> On Tue, 2017-07-11 at 11:41 -0700, Sean Farley wrote:
>> Signed-off-by: Sean Farley <sean@farley.io>
>
> I tend to use tox (via '--quick-tox') myself, but this looks good to me.

Ah, cool, I'll try that out.
Daniel Axtens July 12, 2017, 11:32 p.m. UTC | #3
Sean Farley <sean@farley.io> writes:

> Signed-off-by: Sean Farley <sean@farley.io>
> ---
>  tools/docker/entrypoint.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
> index 949d8af..2f413b0 100755
> --- a/tools/docker/entrypoint.sh
> +++ b/tools/docker/entrypoint.sh
> @@ -84,10 +84,12 @@ if [ $# -eq 0 ]; then
>  elif [ "$1" == "--shell" ]; then
>      exec bash
>  elif [ "$1" == "--quick-test" ]; then
> +    shift
>      export PW_SKIP_BROWSER_TESTS=yes
> -    python3 manage.py test
> +    python3 manage.py test $@
>  elif [ "$1" == "--test" ]; then
> -    xvfb-run --server-args='-screen 0, 1024x768x16' python3 manage.py test
> +    shift
> +    xvfb-run --server-args='-screen 0, 1024x768x16' python3 manage.py test $@
>  elif [ "$1" == "--quick-tox" ]; then
>      shift
>      export PW_SKIP_BROWSER_TESTS=yes

Fanstastic - the inconsistencies from when I first wrote that keep
bugging me.

Reviewed-by: Daniel Axtens <dja@axtens.net>

We could merge this before or after 2.0, either is fine with me.

Regards,
Daniel

> -- 
> 2.13.2
>
> _______________________________________________
> Patchwork mailing list
> Patchwork@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork
diff mbox

Patch

diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
index 949d8af..2f413b0 100755
--- a/tools/docker/entrypoint.sh
+++ b/tools/docker/entrypoint.sh
@@ -84,10 +84,12 @@  if [ $# -eq 0 ]; then
 elif [ "$1" == "--shell" ]; then
     exec bash
 elif [ "$1" == "--quick-test" ]; then
+    shift
     export PW_SKIP_BROWSER_TESTS=yes
-    python3 manage.py test
+    python3 manage.py test $@
 elif [ "$1" == "--test" ]; then
-    xvfb-run --server-args='-screen 0, 1024x768x16' python3 manage.py test
+    shift
+    xvfb-run --server-args='-screen 0, 1024x768x16' python3 manage.py test $@
 elif [ "$1" == "--quick-tox" ]; then
     shift
     export PW_SKIP_BROWSER_TESTS=yes