From a85cefa35c00ab4999038fbed69a6c28d0244366 Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Mon, 24 Oct 2016 10:24:10 -0700 Subject: [PATCH] Change location of current symlink created by test-runner test-runner should be creating the current symlink in the directory above the output directory. In a previous commit, the current symlink was placed in the current working directory, which could be inaccessible. It is more likely that the output directory is always accessible. This is needed because without this there's no deterministic way to get the path to ZFS Test Suite results until after the test suite has started. This makes it difficult for buildbot to follow the log file. Reviewed-by: Brian Behlendorf Signed-off-by: Giuseppe Di Natale Closes #5314 --- tests/test-runner/cmd/test-runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-runner/cmd/test-runner.py b/tests/test-runner/cmd/test-runner.py index cbe8cfbf4..d7727e8d8 100755 --- a/tests/test-runner/cmd/test-runner.py +++ b/tests/test-runner/cmd/test-runner.py @@ -685,11 +685,12 @@ 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) + # make a symlink to the output for the currently running test + logsymlink = os.path.join(self.outputdir, '../current') if os.path.islink(logsymlink): os.unlink(logsymlink) if not os.path.exists(logsymlink):