summaryrefslogtreecommitdiffstats
path: root/tests/test-runner
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2016-10-18 10:19:28 -0700
committerBrian Behlendorf <[email protected]>2016-10-18 10:19:28 -0700
commitdf7492240ab628f245a5400086ab898c8e33b3da (patch)
tree59e5e6e941d9360885b159fb0df9a1ecdf136b4f /tests/test-runner
parentb60eac3d1a7b74e54ac8af9d533ff423c8ce9f8f (diff)
Create a symlink to current test-runner output
Generate a symlink in the current working directory to test-runner.py output. This will make it easier for the ZFS buildbot to collect logs. Reviewed by: John Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #5293
Diffstat (limited to 'tests/test-runner')
-rwxr-xr-xtests/test-runner/cmd/test-runner.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-runner/cmd/test-runner.py b/tests/test-runner/cmd/test-runner.py
index 687284907..cbe8cfbf4 100755
--- a/tests/test-runner/cmd/test-runner.py
+++ b/tests/test-runner/cmd/test-runner.py
@@ -685,10 +685,18 @@ class TestRun(object):
"""
Walk through all the Tests and TestGroups, calling run().
"""
+ logsymlink = os.path.join(os.getcwd(), 'current')
try:
os.chdir(self.outputdir)
except OSError:
fail('Could not change to directory %s' % self.outputdir)
+ if os.path.islink(logsymlink):
+ os.unlink(logsymlink)
+ if not os.path.exists(logsymlink):
+ os.symlink(self.outputdir, logsymlink)
+ else:
+ print 'Could not make a symlink to directory %s' % (
+ self.outputdir)
for test in sorted(self.tests.keys()):
self.tests[test].run(self.logger, options)
for testgroup in sorted(self.testgroups.keys()):