[CRIU] [PATCH] [v2] zdtm: use flake8 to verify zdtm.py
Andrew Vagin
avagin at virtuozzo.com
Fri Jun 3 09:41:42 PDT 2016
On Fri, Jun 03, 2016 at 09:06:51AM -0600, Tycho Andersen wrote:
> Hey Andrey,
>
> On Fri, Jun 03, 2016 at 05:33:48AM +0300, Andrey Vagin wrote:
> > From: Andrew Vagin <avagin at virtuozzo.com>
> >
> > and fix various warnings. For example, we mix tab and space indentations.
> >
> > v2: add flake8.cfg
> >
> > Cc: Tycho Andersen <tycho.andersen at canonical.com>
>
> Acked-by: Tycho Andersen <tycho.andersen at canonical.com>
>
> This looks great to me, thanks for doing it. My only other suggestion
> would be to add it to travis, so that builds fail. Something like,
It's here already
diff --git a/scripts/travis-tests b/scripts/travis-tests
index cb6ac1e..d579d9b 100755
--- a/scripts/travis-tests
+++ b/scripts/travis-tests
@@ -11,3 +11,6 @@ chmod a+x $HOME
make
make -C test/zdtm
python test/zdtm.py run -a -f h,ns -x 'cgroup*'
+
+pip install flake8
+make lint
>
> From 17bc6d48113ac3b4f5505f400bea9cb886652fc2 Mon Sep 17 00:00:00 2001
> From: Tycho Andersen <tycho.andersen at canonical.com>
> Date: Fri, 3 Jun 2016 09:05:46 -0600
> Subject: [PATCH] travis: run `make lint` to catch pep8 violations in zdtm.py
>
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> ---
> scripts/travis-tests | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/travis-tests b/scripts/travis-tests
> index fc7d050..b8fd7c0 100755
> --- a/scripts/travis-tests
> +++ b/scripts/travis-tests
> @@ -4,8 +4,9 @@ set -x -e
> test "$1" = "x86_64" || exit 0
>
> apt-get update -qq
> -apt-get install -qq protobuf-c-compiler libprotobuf-c0-dev libaio-dev libprotobuf-dev protobuf-compiler python-ipaddr libcap-dev libnl-3-dev
> +apt-get install -qq protobuf-c-compiler libprotobuf-c0-dev libaio-dev libprotobuf-dev protobuf-compiler python-ipaddr libcap-dev libnl-3-dev flake8
> chmod a+x $HOME
> make
> +make lint
> make -C test/zdtm
> python test/zdtm.py run -a -f h,ns -x 'cgroup*'
> --
> 2.7.4
More information about the CRIU
mailing list