[RFC] Delete the "testcases" symlink

So, I want to delete the testcases symlink from the LLDB tree, and move the tests out of the packages directory into tests/testcases.

A few reasons why I want to do this:
(1) I can't imagine symlinks in SVN is something that works well on platforms that don't support symlinks (like Windows)
(2) It trips up scripts and tools that try to operate on the files without calling realpath (while I know I could fix those, it is easier to just fix this)
(3) It seems to me that it is completely unnecessary. In lldbsuite's __init__.py we already find the test cases by path from the lldb checkout root, so having them live in the python packages just seems odd.


Is there a reason why they need to live in the packages directory that I'm unaware of?


The reason they were put into the packages directory in the first place is because this forms a proper python package so that more code can be shared amongst test cases. I don’t know why the symlink was ever created in the first place, sounds like that was probably put in place by someone who thought packages/python/lldbsuite/test was too much to type (hard to argue with, tbh). In any case, as long as you can maintain the package structure so that a testcase can write “from support import fs” then you can re-arrange stuff however you like.

I also think some people had expressed interest in writing bindings for other languages, but I haven’t heard anything about that in some time, so until I see more effort on that front a concrete proposal, we don’t need to worry about it.

Yes, writing that long path every time you run a test case was indeed the reason for that symlink. I stood it for a couple of weeks before it drove me round the bend! You want it to be a real path and not just have the test suite accept partial paths because it is really handy to use the shell’s filename completion.

Anyway, if there’s some compelling reason to remove the link, I’ll just remake it by hand in all my checkouts, not too much of a hardship. But it would be much better if we could remove that long path and move the test cases back into the test directory.


It’s definitely possible to (at worst) shorten the path if we say we don’t care about supporting other languages (i’m fine saying that for now unless someone comes along with a serious committment to support and maintaining other bindings). So we could drop packages/Python for example.

I also remember the whole third party debacle now. That was (IIRC) the reason for the packages indirection, because we want both LLDB scripts (i.e. stuff in the scripts/ folder) as well as test cases and test infrastructure to all be able to share the same code.

Things get really nasty when you start putting stuff in different trees, Python isn’t really designed to work well in this scenario, it expects all code to share a common root, which is why it was difficult to have testcases and package code in a different tree.

If someone finds a way to make it work though, more power to them :slight_smile:

We were contemplating some sort of a Java binding for lldb, but that
isn't going to happen any time soon, so you don't have to hold a place
open for other languages because of us.

Happy new year,