Move some android platform functions to lldbplatformutil. My eventual goal is to move all of the test decorators to their own module such as `decorators.py`. But some of the decorators use existing functions in `lldbtest.py` and conceptually the functions are probably more appropriately placed in lldbplatformutil. Moreover, `lldbtest.py` is a huge file with a ton of random utility functions scattered around, so this patch also works toward the goal of reducing the footprint of this one module to a more reasonable size. So this patch starts by moveing some utility functions over to `lldbplatformutil` with the eventual goal of moving decorators over to their own module as well.
Seems to be working after applying the fixes below.
I was considering whether this shouldn't be moved to an even more platform-specific file (say androidutil.py or something), but I'll leave that up to you...
|63 ↗||(On Diff #46721)|
|38 ↗||(On Diff #46721)|
Looks reasonable and I agree with Pavel in the idea of moving the android related utility functions into their own file for better separation
|73–81 ↗||(On Diff #46721)|
Can we just return True/False? I don't see any usecase where we are caring about the reason why the device isn't matched.
|683–685 ↗||(On Diff #46721)|
Can we move this function to a higher scope so we don't have to duplicate it in every android specific decorator?
I thought about creating an android specific module but I decided taht there is so little code right now it might not make sense. And then we already had this lldbplatformutil file that had only 1 function in it, so nobody was even really using it. So rather than end up with 2 different modules with 3 functions each, just have just have 1 module with 6 functions. On the other hand, if they continue to grow, then splitting apart makes a lot of sense.
It's not a big deal to me either way, so if you guys feel strongly I can move it. Since you're in a different time zone though and might not get this for another 24 hours, maybe I'll commit like this and then if you