On 02/03/2014 11:22 AM, Paolo Bonzini wrote:
This helps me because I have the virt-test checkout on NFS, and the
exact path may be different on different systems.  By using a relative
symlink, I can access the "latest" log from all of them.

By the way, this has been pushed to master, thanks Paolo!


Signed-off-by: Paolo Bonzini <[email protected]>
---
  virttest/standalone_test.py | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/virttest/standalone_test.py b/virttest/standalone_test.py
index 17dc7a2..927863e 100644
--- a/virttest/standalone_test.py
+++ b/virttest/standalone_test.py
@@ -796,7 +796,8 @@ def run_tests(parser, options):
      """
      test_start_time = time.strftime('%Y-%m-%d-%H.%M.%S')
      logdir = options.logdir or os.path.join(data_dir.get_root_dir(), 'logs')
-    debugdir = os.path.join(logdir, 'run-%s' % test_start_time)
+    debugbase = 'run-%s' % test_start_time
+    debugdir = os.path.join(logdir, debugbase)
      latestdir = os.path.join(logdir, "latest")
      if not os.path.isdir(debugdir):
          os.makedirs(debugdir)
@@ -804,7 +805,7 @@ def run_tests(parser, options):
          os.unlink(latestdir)
      except OSError, detail:
          pass
-    os.symlink(debugdir, latestdir)
+    os.symlink(debugbase, latestdir)

      debuglog = os.path.join(debugdir, "debug.log")
      loglevel = options.log_level


_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to