(args, testlist, number_worker,suffix=None)
| 386 | |
| 387 | |
| 388 | def pcd_filter(args, testlist, number_worker,suffix=None): |
| 389 | if not os.path.exists(os.path.join(args.outdir,"pcd")): |
| 390 | os.makedirs(os.path.join(args.outdir,"pcd")) |
| 391 | |
| 392 | if number_worker>1: |
| 393 | partial_func = partial(pcd_filter_worker, args) |
| 394 | |
| 395 | p = Pool(number_worker, init_worker) |
| 396 | try: |
| 397 | p.map(partial_func, testlist) |
| 398 | except KeyboardInterrupt: |
| 399 | print("....\nCaught KeyboardInterrupt, terminating workers") |
| 400 | p.terminate() |
| 401 | else: |
| 402 | p.close() |
| 403 | p.join() |
| 404 | else: |
| 405 | if suffix is not None: |
| 406 | if not os.path.exists(os.path.join(args.outdir,"pcd_{}".format(suffix))): |
| 407 | os.makedirs(os.path.join(args.outdir,"pcd_{}".format(suffix))) |
| 408 | |
| 409 | for scene in testlist: |
| 410 | pcd_filter_worker(args,scene,suffix=suffix) |
no test coverage detected