merge
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Mon, 11 Jun 2018 08:34:15 +0200
changeset 2021 bcf346f558bd
parent 2017 c76d4be6f438 (diff)
parent 2020 6dddf3070806 (current diff)
child 2165 02a2b5dee5e3
child 2189 49a6738b7c63
merge
--- a/.pylint	Fri Jun 08 13:28:00 2018 +0200
+++ b/.pylint	Mon Jun 11 08:34:15 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	Fri Jun 08 13:28:00 2018 +0200
+++ b/README.md	Mon Jun 11 08:34:15 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	Fri Jun 08 13:28:00 2018 +0200
+++ b/runtime/xenomai.py	Mon Jun 11 08:34:15 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	Fri Jun 08 13:28:00 2018 +0200
+++ b/tests/tools/check_source.sh	Mon Jun 11 08:34:15 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()