|
18 | 18 | perf_test = { |
19 | 19 | "virtio-block": { |
20 | 20 | "label": "💿 Virtio Block Performance", |
21 | | - "test_path": "integration_tests/performance/test_block_ab.py::test_block_performance", |
| 21 | + "tests": "integration_tests/performance/test_block_ab.py::test_block_performance", |
22 | 22 | "devtool_opts": "-c 1-10 -m 0", |
23 | 23 | }, |
24 | 24 | "vhost-user-block": { |
25 | 25 | "label": "💿 vhost-user Block Performance", |
26 | | - "test_path": "integration_tests/performance/test_block_ab.py::test_block_vhost_user_performance", |
| 26 | + "tests": "integration_tests/performance/test_block_ab.py::test_block_vhost_user_performance", |
27 | 27 | "devtool_opts": "-c 1-10 -m 0", |
28 | 28 | "ab_opts": "--noise-threshold 0.1", |
29 | 29 | }, |
30 | 30 | "network": { |
31 | 31 | "label": "📠 Network Latency and Throughput", |
32 | | - "test_path": "integration_tests/performance/test_network_ab.py", |
| 32 | + "tests": "integration_tests/performance/test_network_ab.py", |
33 | 33 | "devtool_opts": "-c 1-10 -m 0", |
34 | 34 | # Triggers if delta is > 0.01ms (10µs) or default relative threshold (5%) |
35 | 35 | # only relevant for latency test, throughput test will always be magnitudes above this anyway |
36 | 36 | "ab_opts": "--absolute-strength 0.010", |
37 | 37 | }, |
38 | 38 | "snapshot-latency": { |
39 | 39 | "label": "📸 Snapshot Latency", |
40 | | - "test_path": "integration_tests/performance/test_snapshot_ab.py::test_restore_latency integration_tests/performance/test_snapshot_ab.py::test_post_restore_latency", |
| 40 | + "tests": "integration_tests/performance/test_snapshot_ab.py::test_restore_latency integration_tests/performance/test_snapshot_ab.py::test_post_restore_latency", |
41 | 41 | "devtool_opts": "-c 1-12 -m 0", |
42 | 42 | }, |
43 | 43 | "population-latency": { |
44 | 44 | "label": "📸 Memory Population Latency", |
45 | | - "test_path": "integration_tests/performance/test_snapshot_ab.py::test_population_latency", |
| 45 | + "tests": "integration_tests/performance/test_snapshot_ab.py::test_population_latency", |
46 | 46 | "devtool_opts": "-c 1-12 -m 0", |
47 | 47 | }, |
48 | 48 | "vsock-throughput": { |
49 | 49 | "label": "🧦 Vsock Throughput", |
50 | | - "test_path": "integration_tests/performance/test_vsock_ab.py", |
| 50 | + "tests": "integration_tests/performance/test_vsock_ab.py", |
51 | 51 | "devtool_opts": "-c 1-10 -m 0", |
52 | 52 | }, |
53 | 53 | "memory-overhead": { |
54 | 54 | "label": "💾 Memory Overhead and 👢 Boottime", |
55 | | - "test_path": "integration_tests/performance/test_memory_overhead.py integration_tests/performance/test_boottime.py::test_boottime", |
| 55 | + "tests": "integration_tests/performance/test_memory_overhead.py integration_tests/performance/test_boottime.py::test_boottime", |
56 | 56 | "devtool_opts": "-c 1-10 -m 0", |
57 | 57 | }, |
58 | 58 | } |
|
93 | 93 | tests = [perf_test[test] for test in pipeline.args.test or perf_test.keys()] |
94 | 94 | for test in tests: |
95 | 95 | devtool_opts = test.pop("devtool_opts") |
96 | | - test_path = test.pop("test_path") |
| 96 | + test_selector = test.pop("tests") |
97 | 97 | ab_opts = test.pop("ab_opts", "") |
98 | 98 | devtool_opts += " --performance" |
99 | | - pytest_opts = "" |
| 99 | + test_script_opts = "" |
100 | 100 | if REVISION_A: |
101 | 101 | devtool_opts += " --ab" |
102 | | - pytest_opts = ( |
103 | | - f"{ab_opts} run build/{REVISION_A}/ build/{REVISION_B} --test {test_path}" |
104 | | - ) |
| 102 | + test_script_opts = f'{ab_opts} run build/{REVISION_A}/ build/{REVISION_B} --pytest-opts "{test_selector}"' |
105 | 103 | else: |
106 | 104 | # Passing `-m ''` below instructs pytest to collect tests regardless of |
107 | 105 | # their markers (e.g. it will collect both tests marked as nonci, and |
108 | 106 | # tests without any markers). |
109 | | - pytest_opts += f" -m '' {test_path}" |
| 107 | + test_script_opts += f" -m '' {test_selector}" |
110 | 108 |
|
111 | 109 | pipeline.build_group( |
112 | | - command=pipeline.devtool_test(devtool_opts, pytest_opts), |
| 110 | + command=pipeline.devtool_test(devtool_opts, test_script_opts), |
113 | 111 | # and the rest can be command arguments |
114 | 112 | **test, |
115 | 113 | ) |
|
0 commit comments