From 9af491d2f6224e6f7dbb98aaf97dc4efedef27c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= <gaetan.harter@fu-berlin.de>
Date: Fri, 25 Jan 2019 18:58:42 +0100
Subject: [PATCH] tools/backport_pr: add tox.ini

Adapt tox file from `compile_and_test_for_board.py`.

`tox` is still not working without errors but gives way to start
refactoring.
---
 dist/tools/backport_pr/.gitignore |  2 ++
 dist/tools/backport_pr/tox.ini    | 32 +++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 dist/tools/backport_pr/.gitignore
 create mode 100644 dist/tools/backport_pr/tox.ini

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