Switch to stestr

According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I3fb32622b029bfadef7f34e973d8277c107112f0
diff --git a/.gitignore b/.gitignore
index 5685b36..48f6897 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,7 @@
 *.sqlite
 *.swp
 .coverage
-.testrepository
+.stestr/
 .tox
 .venv
 .idea
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..ecc147c
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_path=./barbican_tempest_plugin/tests
+top_dir=./
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 6a52f97..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-test_command=${PYTHON:-python} -m subunit.run discover -s ./barbican_tempest_plugin -t . $LISTOPT $IDOPTION
-
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/test-requirements.txt b/test-requirements.txt
index b858041..f3062b0 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -8,7 +8,7 @@
 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
 oslosphinx>=4.7.0 # Apache-2.0
 oslotest>=3.2.0 # Apache-2.0
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
 testscenarios>=0.4 # Apache-2.0/BSD
 testtools>=2.2.0 # MIT
 
diff --git a/tox.ini b/tox.ini
index 1f1ce01..6fec391 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,7 +10,7 @@
    VIRTUAL_ENV={envdir}
    PYTHONWARNINGS=default::DeprecationWarning
 deps = -r{toxinidir}/test-requirements.txt
-commands = python setup.py testr --slowest --testr-args='{posargs}'
+commands = stestr run --slowest {posargs}
 
 [testenv:pep8]
 commands =