Merge
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Wed, 23 May 2018 20:22:45 +0200
changeset 2017 c76d4be6f438
parent 2011 64268e87613e (current diff)
parent 2016 2a8cd24a14ca (diff)
child 2021 bcf346f558bd
child 2166 5ce6d08ff2c7
Merge
--- a/.pylint	Wed May 23 10:53:57 2018 +0200
+++ b/.pylint	Wed May 23 20:22:45 2018 +0200
@@ -110,7 +110,7 @@
 
 # List of additional names supposed to be defined in builtins. Remember that
 # you should avoid to define new builtins when possible.
-additional-builtins=_,website,JS
+additional-builtins=_,website,JS,cobalt
 
 # List of strings which can identify a callback function by name. A callback
 # name must start or end with one of those strings.
--- a/README.md	Wed May 23 10:53:57 2018 +0200
+++ b/README.md	Wed May 23 20:22:45 2018 +0200
@@ -19,7 +19,7 @@
 * # Ubuntu/Debian :
 sudo apt-get install build-essential bison flex autoconf
 sudo apt-get install python-wxgtk3.0 pyro mercurial
-sudo apt-get install python-nevow python-matplotlib python-lxml python-zeroconf
+sudo apt-get install python-nevow python-matplotlib python-lxml python-zeroconf python-cycler
 ```
 * Prepare
 ```
--- a/runtime/xenomai.py	Wed May 23 10:53:57 2018 +0200
+++ b/runtime/xenomai.py	Wed May 23 20:22:45 2018 +0200
@@ -1,16 +1,25 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# See COPYING.Runtime file for copyrights details.
+#
+
+from __future__ import absolute_import
 from ctypes import CDLL, RTLD_GLOBAL, pointer, c_int, POINTER, c_char, create_string_buffer
+
+
 def TryPreloadXenomai():
     """
     Xenomai 3 (at least for version <= 3.0.6) do not handle properly dlclose
     of shared objects whose dlopen did trigger xenomai_init.
-    As a workaround, this pre-loads xenomai libraries that need to be 
+    As a workaround, this pre-loads xenomai libraries that need to be
     initialized and call xenomai_init once for all.
-    
+
     Xenomai auto init of libs MUST be disabled (see --auto-init-solib in xeno-config)
     """
     try:
         for name in ["cobalt", "modechk", "copperplate", "alchemy"]:
             globals()[name] = CDLL("lib"+name+".so", mode=RTLD_GLOBAL)
-        cobalt.xenomai_init(pointer(c_int(0)), pointer((POINTER(c_char)*2)(create_string_buffer("prog_name"), None)))  
-    except:
+        cobalt.xenomai_init(pointer(c_int(0)), pointer((POINTER(c_char)*2)(create_string_buffer("prog_name"), None)))
+    except Exception:
         pass
--- a/tests/tools/check_source.sh	Wed May 23 10:53:57 2018 +0200
+++ b/tests/tools/check_source.sh	Wed May 23 20:22:45 2018 +0200
@@ -34,9 +34,11 @@
 
 compile_checks()
 {
-    echo "Syntax checking..."
+    echo "Syntax checking using python ..."
     py_files=$(find . -name '*.py')
 
+    python --version
+
     # remove compiled Python files
     find . -name '*.pyc' -exec rm -f {} \;
 
@@ -48,6 +50,8 @@
             set_exit_error
         fi
     done
+    echo "DONE"
+    echo ""
 }
 
 # pep8 was renamed to pycodestyle
@@ -60,6 +64,8 @@
         echo "pep8/pycodestyle is not found"
         set_exit_error
     fi
+    echo -n "pep8 version: "
+    $pep8 --version
 }
 
 pep8_checks_default()
@@ -91,6 +97,9 @@
     if [ $? -ne 0 ]; then
         set_exit_error
     fi
+
+    echo "DONE"
+    echo ""
 }
 
 
@@ -159,6 +168,9 @@
     if [ $? -ne 0 ]; then
         set_exit_error
     fi
+
+    echo "DONE"
+    echo ""
 }
 
 flake8_checks()
@@ -172,10 +184,16 @@
         return
     fi
 
+    echo -n "flake8 version: "
+    flake8 --version
+
     flake8 --max-line-length=300  --exclude=build --builtins="_" ./
     if [ $? -ne 0 ]; then
         set_exit_error
     fi
+
+    echo "DONE"
+    echo ""
 }
 
 pylint_checks()
@@ -188,6 +206,7 @@
         set_exit_error
         return
     fi
+    pylint --version
 
     export PYTHONPATH="$PWD/../CanFestival-3/objdictgen":$PYTHONPATH
 
@@ -291,6 +310,9 @@
     if [ $? -ne 0 ]; then
         set_exit_error
     fi
+
+    echo "DONE"
+    echo ""
 }
 
 main()