]> granicus.if.org Git - zfs/commitdiff
Change location of current symlink created by test-runner
authorGiuseppe Di Natale <dinatale2@users.noreply.github.com>
Mon, 24 Oct 2016 17:24:10 +0000 (10:24 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 24 Oct 2016 17:24:10 +0000 (10:24 -0700)
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 <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #5314

tests/test-runner/cmd/test-runner.py

index cbe8cfbf436a547ad91060055ac31d918fc35ad3..d7727e8d8d8a2eff8a4d2b93add0f720a228d286 100755 (executable)
@@ -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):