diff --git a/test/test_cpu.py b/test/test_cpu.py index 5860eeebc..43a8a56e7 100644 --- a/test/test_cpu.py +++ b/test/test_cpu.py @@ -7,10 +7,11 @@ import unittest import pexpect import sys +import os class TestCPU(unittest.TestCase): - def boot_test(self, cpu_type, cpu_variant="standard"): - cmd = f'litex_sim --cpu-type={cpu_type} --cpu-variant={cpu_variant} --opt-level=O0' + def boot_test(self, cpu_type, jobs, cpu_variant="standard"): + cmd = f'litex_sim --cpu-type={cpu_type} --cpu-variant={cpu_variant} --opt-level=O0 --jobs {jobs}' litex_prompt = [b'\033\[[0-9;]+mlitex\033\[[0-9;]+m>'] is_success = True with open("/tmp/test_boot_log", "wb") as result_file: @@ -65,6 +66,7 @@ class TestCPU(unittest.TestCase): "zynq7000", # (arm / hardcore) -> Hardcore. "zynqmp", # (aarch64 / hardcore) -> Hardcore. ] + jobs = os.cpu_count() for cpu in tested_cpus: with self.subTest(target=cpu): - self.assertTrue(self.boot_test(cpu)) + self.assertTrue(self.boot_test(cpu, jobs))