[tests] Update to use lit_config and lit package, as appropriate.
Make helper static and fix formatting.