Run all tests on the full frozen build using the frozen launcher

Much more comprehensive test coverage at the cost of slightly increasing
the frozen build size.
This commit is contained in:
Kovid Goyal
2021-02-19 17:57:59 +05:30
parent e06d40cb31
commit c2a924a5ea
8 changed files with 51 additions and 79 deletions

View File

@@ -18,8 +18,14 @@ orig_executable = spawn.get_executable()
def spawnv_passfds(path: str, args: List[str], passfds: List[int]) -> Any:
idx = args.index('-c')
patched_args = [spawn.get_executable(), '+runpy'] + args[idx + 1:]
if '-c' in args:
idx = args.index('-c')
patched_args = [spawn.get_executable(), '+runpy'] + args[idx + 1:]
else:
idx = args.index('--multiprocessing-fork')
prog = 'from multiprocessing.spawn import spawn_main; spawn_main(%s)'
prog %= ', '.join(item for item in args[idx+1:])
patched_args = [spawn.get_executable(), '+runpy', prog]
return orig_spawn_passfds(kitty_exe(), patched_args, passfds)