Page MenuHomePhabricator

Fix buildbot regression by rL339929: NameError: global name 'test_directory' is not defined

Authored by jankratochvil on Sep 10 2018, 11:53 AM.



With buildbot slave under test - I get after rL339929:

  File "/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/scripts/../llvm/tools/lldb/test/", line 7, in <module>
  File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/", line 1177, in run_suite
  File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/", 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.

Diff Detail


Event Timeline

jankratochvil created this revision.Sep 10 2018, 11:53 AM
jankratochvil retitled this revision from Fix buildbot regression: NameError: global name 'test_directory' is not defined to Fix buildbot regression by rL339929: NameError: global name 'test_directory' is not defined.
jankratochvil edited the summary of this revision. (Show Details)
davide accepted this revision.Oct 3 2018, 1:55 PM
davide added a subscriber: davide.

I think this looks fine. Vedant, thoughts?

This revision is now accepted and ready to land.Oct 3 2018, 1:55 PM
vsk added inline comments.Oct 3 2018, 2:29 PM

Instead of redefining test_directory, please use 'test_subdir' in the call to core.replace. That leaves the logic to find the right path in configuration.get_absolute_path_to_root_test_dir.

This revision was automatically updated to reflect the committed changes.