Now skipped tests are shown as Passed in Sauce Labs

(cherry picked from commit 057fb1c9ba)
This commit is contained in:
axl89 2016-08-17 10:16:17 +02:00
parent cc2be5f697
commit 4ba3bf8eb8
1 changed files with 2 additions and 2 deletions

View File

@ -22,14 +22,14 @@ tests.run(c)
#Update Saouce Labs jobs
sauce_client = SauceClient(environ["SAUCE_USERNAME"], environ["SAUCE_ACCESS_KEY"])
for test,error_msg in c.failures+c.skipped+c.errors:
for test,error_msg in c.failures+c.errors:
try:
sauce_client.jobs.update_job(test.sauce_labs_job_id, passed=False,tags=[environ["TRAVIS_BRANCH"],test.id()],build_num=environ["TRAVIS_JOB_NUMBER"],name=str(environ["TRAVIS_COMMIT"])+"_"+str(test.id().split('.')[1]))
except:
print "Could not annotate Sauce Labs job #%s" % str(test)
next
for test,error_msg in c.success:
for test,error_msg in c.success+c.skipped:
try:
sauce_client.jobs.update_job(test.sauce_labs_job_id, passed=True,tags=[environ["TRAVIS_BRANCH"],test.id()],build_num=environ["TRAVIS_JOB_NUMBER"],name=str(environ["TRAVIS_COMMIT"])+"_"+str(test.id().split('.')[1]))
except: