diff --git a/test/cors/main.py b/test/cors/main.py index eb3edc3d68..5fb2c30940 100755 --- a/test/cors/main.py +++ b/test/cors/main.py @@ -22,6 +22,7 @@ import os.path import sys import threading import time +import traceback from six.moves import urllib from six.moves import socketserver @@ -101,7 +102,7 @@ def setup(args): ENV['OS_AUTH_URL'], ENV['OS_USERNAME'], ENV['OS_PASSWORD'], - timeout=5) + timeout=30) # We've seen request times as high as 7-8s in the gate cluster_info = conn.get_capabilities() conn.put_container('private', { 'X-Container-Read': '', @@ -180,6 +181,9 @@ def run(args, url): try: browser = driver() except Exception as e: + if not ('needs to be in PATH' in str(e) or + 'SafariDriver was not found' in str(e)): + traceback.print_exc() results.append(('SKIP', browser_name, str(e).strip())) continue ran_one = True diff --git a/tools/playbooks/cors/post.yaml b/tools/playbooks/cors/post.yaml index b0e4ba438d..4bc84bdcdc 100644 --- a/tools/playbooks/cors/post.yaml +++ b/tools/playbooks/cors/post.yaml @@ -1,6 +1,11 @@ - hosts: all become: true tasks: + - name: Check for geckodriver log + stat: + path: '{{ ansible_env.HOME }}/geckodriver.log' + register: geckodriver_output + - name: Copy geckodriver log from worker nodes to executor node synchronize: src: '{{ ansible_env.HOME }}/geckodriver.log' @@ -8,6 +13,12 @@ mode: pull copy_links: true verify_host: true + when: geckodriver_output.stat.exists == true + + - name: Check for CORS test output + stat: + path: '{{ ansible_env.HOME }}/cors-test-results.txt' + register: test_output - name: Copy CORS tests output from worker nodes to executor node synchronize: @@ -16,6 +27,7 @@ mode: pull copy_links: true verify_host: true + when: test_output.stat.exists == true - zuul_return: data: @@ -23,3 +35,4 @@ artifacts: - name: CORS test results url: cors-test-results.txt + when: test_output.stat.exists == true