[Lldb-commits] [PATCH] D51874: Fix buildbot regression: NameError: global name 'test_directory' is not defined

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 10 11:53:44 PDT 2018


jankratochvil created this revision.
jankratochvil added a reviewer: vsk.
jankratochvil added a project: LLDB.

With buildbot slave under test - I get:
http://lab.llvm.org:8014/builders/lldb-x86_64-fedora-28-cmake/builds/243/steps/test1/logs/stdio

    File "/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/scripts/../llvm/tools/lldb/test/dotest.py", line 7, in <module>
      lldbsuite.test.run_suite()
    File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/dotest.py", line 1177, in run_suite
      configuration.results_formatter_object)
    File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/dosep.py", line 1692, in main
      dst = core.replace(test_directory, "")[1:]
  NameError: global name 'test_directory' is not defined

Do you agree with this patch? Unfortunately I do not have it reproducible here without checking it into repository as the test outside of buildbot does not hit this code path. I may reproduce it later but it looks obvious to me. Could you test the fix easily yourself? Thanks.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51874

Files:
  packages/Python/lldbsuite/test/dosep.py


Index: packages/Python/lldbsuite/test/dosep.py
===================================================================
--- packages/Python/lldbsuite/test/dosep.py
+++ packages/Python/lldbsuite/test/dosep.py
@@ -1688,6 +1688,7 @@
 
     # move core files into session dir
     cores = find('core.*', test_subdir)
+    test_directory = os.path.dirname(os.path.realpath(__file__))
     for core in cores:
         dst = core.replace(test_directory, "")[1:]
         dst = dst.replace(os.path.sep, "-")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51874.164709.patch
Type: text/x-patch
Size: 495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180910/bb41d87b/attachment.bin>


More information about the lldb-commits mailing list