mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #16148 from jmchilton/latest_test_errors
When writing test error debug directories, create a 'latest' symlink.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Basis for Selenium test framework."""
|
||||
|
||||
import datetime
|
||||
import errno
|
||||
import json
|
||||
import os
|
||||
import traceback
|
||||
@@ -167,6 +168,20 @@ def dump_test_information(self, name_prefix):
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
try_symlink(target_directory, os.path.join(GALAXY_TEST_ERRORS_DIRECTORY, "latest"))
|
||||
|
||||
|
||||
def try_symlink(file1, file2):
|
||||
try:
|
||||
try:
|
||||
os.symlink(file1, file2)
|
||||
except OSError as e:
|
||||
if e.errno == errno.EEXIST:
|
||||
os.remove(file2)
|
||||
os.symlink(file1, file2)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def selenium_test(f):
|
||||
test_name = f.__name__
|
||||
|
||||
Reference in New Issue
Block a user