From 148f715689faf36430b5f0a2ad580a8d228fe87f Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Tue, 22 Jan 2019 08:45:46 +0100
Subject: [PATCH] tools/compile_test_one_board: add tox.ini configuration file

tox.ini configures 3 checks on the python script: doctest (via pytest), pylint and flake8
---
 .../compile_and_test_for_board/.gitignore     |  2 ++
 dist/tools/compile_and_test_for_board/tox.ini | 27 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 dist/tools/compile_and_test_for_board/.gitignore
 create mode 100644 dist/tools/compile_and_test_for_board/tox.ini

diff --git a/dist/tools/compile_and_test_for_board/.gitignore b/dist/tools/compile_and_test_for_board/.gitignore
new file mode 100644
index 0000000000..92f3a8ec56
--- /dev/null
+++ b/dist/tools/compile_and_test_for_board/.gitignore
@@ -0,0 +1,2 @@
+# tox envs directory
+.tox
diff --git a/dist/tools/compile_and_test_for_board/tox.ini b/dist/tools/compile_and_test_for_board/tox.ini
new file mode 100644
index 0000000000..b3c89b9cac
--- /dev/null
+++ b/dist/tools/compile_and_test_for_board/tox.ini
@@ -0,0 +1,27 @@
+[tox]
+envlist = test,lint,flake8
+skipsdist = True
+
+[testenv]
+basepython = python3
+setenv =
+    script = compile_and_test_for_board.py
+commands =
+    test:       {[testenv:test]commands}
+    lint:       {[testenv:lint]commands}
+    flake8:     {[testenv:flake8]commands}
+
+[testenv:test]
+deps = pytest
+commands =
+    pytest -v --doctest-modules {env:script}
+
+[testenv:lint]
+deps = pylint
+commands =
+    pylint {env:script}
+
+[testenv:flake8]
+deps = flake8
+commands =
+    flake8 {env:script}
-- 
GitLab