From 146ab70a56f6e2142a69451367cadf31f59d9d42 Mon Sep 17 00:00:00 2001
From: Luigi Toscano <ltoscano@redhat.com>
Date: Thu, 9 Feb 2017 12:29:02 +0100
Subject: [PATCH] Use ostestr instead of the custom pretty_tox.sh

Switch to os-testr as wrapper for testr, instead of the custom
script pretty_tox.sh.

Change-Id: I5b76cf9ffca530664b1c1ddcbf98679ab4fca8b5
---
 test-requirements.txt | 2 +-
 tools/pretty_tox.sh   | 6 ------
 tox.ini               | 2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
 delete mode 100644 tools/pretty_tox.sh

diff --git a/test-requirements.txt b/test-requirements.txt
index 81cbd188..c44180b6 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -6,7 +6,7 @@ mock>=1.0
 python-subunit
 oslo.sphinx
 oslotest>=1.2.0
-tempest-lib
+os-testr>=0.4.1
 testrepository>=0.0.18
 testscenarios>=0.4,<0.5
 testtools>=0.9.34
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh
deleted file mode 100644
index ac760458..00000000
--- a/tools/pretty_tox.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-
-set -o pipefail
-
-TESTRARGS=$1
-python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
diff --git a/tox.ini b/tox.ini
index 50f6fe71..2dc81578 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,7 +11,7 @@ setenv =
 passenv = OS_TEST_TIMEOUT
 deps = -r{toxinidir}/requirements.txt
        -r{toxinidir}/test-requirements.txt
-commands = bash tools/pretty_tox.sh '{posargs}'
+commands = ostestr '{posargs}'
 whitelist_externals = bash
 
 [testenv:pep8]