[Lldb-commits] [PATCH] D13124: test runner: switch to pure-Python timeout mechanism

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 28 15:02:11 PDT 2015


zturner added a comment.

In http://reviews.llvm.org/D13124#255144, @tfiala wrote:

> Ah I see I morphed all those together (the platform naming).
>
> > ... bummed to see them under test_runner...
>
>
> Heh, that's funny.  I was attempting to do a service of decluttering that top level test directory, which to me looks like somebody threw up a bunch of python code :-)  I didn't anticipate it would have the opposite effect!
>
> We can tackle that a few ways: make it a package, which accomplishes 99% of what I was trying to do --- getting things out of that top level lldb/test, *while* still allowing tests to pull in some of that functionality if they want.  So it becomes something like:
>
> lldb/test/lldb_platform/
>
>   __init__.py
>   ...
>   the_files_.py
>   ...
>   test/
>      the tests for the package
>   
>
> And then whatever is in there could be loaded from an lldb test with:
>  import lldb_platform.{whatever}
> or
>  from lldb_platform import {whatever}
>
> That seems totally reasonable to me.  How does that sound?


If it weren't for the fact that we have all these switches on `os.name`, `sys.platform`, and `platform.system` inside the tests as well as the test running infrastructure, then hiding it would be good.  But yea, the test suite itself is still really fragile due to all the conditionals, so it would be great to be able to use this cross platform helpers from anywhere in the test suite.  Making it a package sounds good, but I dont' think it needs to be done as part of this CL (or even immediately after) unless you really want to.


http://reviews.llvm.org/D13124





More information about the lldb-commits mailing list