您可以使用 Python 的 subprocess
模块来创建一个能够在 Linux 命令行模式下并行执行的 test_all.py 脚本。
以下是一个示例代码:
import subprocess
def run_command(command):
return subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
commands = ['run test1.log', 'run test2.log']
processes = [run_comm