From 9d23c68288d8bed31068d3a9a45f50f9797ff21a Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 15 Apr 2017 19:30:50 +0300
Subject: [PATCH] - Revert back to specified Tox testenv for each platform and
 specific one for pre-commit.

---
 .travis.yml            | 18 +++++++++---------
 tests/requirements.txt |  1 -
 tox.ini                | 16 +++++++++-------
 3 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 5ecf808..5526686 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,14 +9,14 @@ env:
         - VBOX_MEMORY=2048
     matrix:
         - TOXENV=pre-commit
-        - tox_switches="--platform openbsd60"
-        - &openbsd59 tox_switches="--platform openbsd59"
-        - tox_switches="--platform xenial"
-        - tox_switches="--platform trusty"
-        - tox_switches="--platform precise"
-        - &stretch tox_switches="--platform stretch"
-        - tox_switches="--platform jessie"
-        - tox_switches="--platform wheezy"
+        - TOXENV=openbsd60
+        - &openbsd59 TOXENV=openbsd59
+        - TOXENV=xenial
+        - TOXENV=trusty
+        - TOXENV=precise
+        - &stretch TOXENV=stretch
+        - TOXENV=jessie
+        - TOXENV=wheezy
 matrix:
     fast_finish: True
     allow_failures:
@@ -36,7 +36,7 @@ install:
   - pip install tox-travis | cat
 
 script:
-  - travis_wait 45 tox -- $tox_switches
+  - travis_wait 45 tox
 
 notifications:
   webhooks: https://galaxy.ansible.com/api/v1/notifications/
diff --git a/tests/requirements.txt b/tests/requirements.txt
index 57c94d9..c0ffb8c 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -2,7 +2,6 @@ ansible==2.3.0.0
 testinfra==1.5.5
 molecule==1.23.2
 ansible-lint==3.4.12
-pre-commit==0.13.6
 python-vagrant==0.5.14
 netaddr==0.7.19
 passlib==1.7.1
diff --git a/tox.ini b/tox.ini
index e5f19d5..112a264 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,9 +1,9 @@
 [tox]
 skip_install = True
 skipsdist = True
-envlist = molecule
+envlist = openbsd60,openbsd59,xenial,trusty,precise,stretch,jessie,wheezy
 
-[testenv:pre-commit]
+[testenv]
 envdir = {toxinidir}/.tox
 deps = -rtests/requirements.txt
 passenv = HOME VBOX* ANSIBLE_*
@@ -11,15 +11,17 @@ whitelist_externals =
     sh
 commands =
     sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles"
-    molecule dependency
-    pre-commit run --all-files
+    molecule test --platform {envname}
 
-[testenv]
+[testenv:pre-commit]
 envdir = {toxinidir}/.tox
-deps = -rtests/requirements.txt
+deps =
+    -rtests/requirements.txt
+    pre-commit
 passenv = HOME VBOX* ANSIBLE_*
 whitelist_externals =
     sh
 commands =
     sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles"
-    molecule test {posargs}
+    molecule dependency
+    pre-commit run --all-files
-- 
GitLab