[d-feet/wjt/fix-ci: 2/3] tests: run pycodestyle as a test



commit 598bddb178f39ccc5870ff65f99103930fdb8e2d
Author: Will Thompson <will willthompson co uk>
Date:   Tue Aug 6 15:37:18 2019 +0100

    tests: run pycodestyle as a test
    
    Previously it was run at the point where `meson` was invoked, which
    won't catch the case where you introduce a style violation after running
    `meson`.

 src/tests/meson.build | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/tests/meson.build b/src/tests/meson.build
index e6ebd55..b185953 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -18,10 +18,13 @@ test(
   workdir: meson.current_source_dir(),
 )
 
-run_command(
+test(
+  'check-code-style',
   find_program('pycodestyle-3', 'pycodestyle', 'pep8'),
-  '--exclude=".svn,CVS,.bzr,.hg,.git,__pycache__,.\#*"',
-  '--max-line-length=99',
-  '--ignore=E123,E402,W504',
-  src_dir,
+  args: [
+    '--exclude=".svn,CVS,.bzr,.hg,.git,__pycache__,.\#*"',
+    '--max-line-length=99',
+    '--ignore=E123,E402,W504',
+    src_dir,
+  ],
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]