Allow overridding OS_TEST_TIMEOUT via the role variables

Change-Id: I7e464ba27704a0b4b13d6e0787b81750deee965e
diff --git a/roles/run-tempest/README.rst b/roles/run-tempest/README.rst
index e1787b6..d4b253a 100644
--- a/roles/run-tempest/README.rst
+++ b/roles/run-tempest/README.rst
@@ -67,3 +67,8 @@
        ::
            vars:
              tox_extra_args: --sitepackages
+
+.. zuul:rolevar:: tempest_test_timeout
+   :default: ''
+
+   The timeout (in seconds) for each test.
diff --git a/roles/run-tempest/defaults/main.yaml b/roles/run-tempest/defaults/main.yaml
index 06918b5..79df3e1 100644
--- a/roles/run-tempest/defaults/main.yaml
+++ b/roles/run-tempest/defaults/main.yaml
@@ -3,3 +3,4 @@
 tox_envlist: smoke
 tempest_black_regex: ''
 tox_extra_args: ''
+tempest_test_timeout: ''
diff --git a/roles/run-tempest/tasks/main.yaml b/roles/run-tempest/tasks/main.yaml
index 16086aa..24bd4db 100644
--- a/roles/run-tempest/tasks/main.yaml
+++ b/roles/run-tempest/tasks/main.yaml
@@ -42,3 +42,4 @@
     chdir: "{{devstack_base_dir}}/tempest"
   become: true
   become_user: tempest
+  environment: '{{ {"OS_TEST_TIMEOUT": tempest_test_timeout} if tempest_test_timeout else {} }}'