MCPcopy Create free account
hub / github.com/NVIDIA/SOL-ExecBench / TestExecute

Class TestExecute

tests/sol_execbench/driver/test_problem_packager.py:241–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240
241class TestExecute:
242 def test_returns_command(
243 self, tmp_path, definition, workloads, python_solution, config
244 ):
245 pkg = _make_packager(tmp_path, definition, workloads, python_solution, config)
246 cmd = pkg.execute()
247 assert cmd == ["python", "eval_driver.py"]
248
249 def test_eval_driver_staged(
250 self, tmp_path, definition, workloads, python_solution, config
251 ):
252 pkg = _make_packager(tmp_path, definition, workloads, python_solution, config)
253 pkg.execute()
254 driver = pkg.output_dir / "eval_driver.py"
255 assert driver.exists()
256 ast.parse(driver.read_text())
257
258 def test_raises_without_so_for_cpp(
259 self, tmp_path, definition, workloads, cuda_solution, config
260 ):
261 pkg = _make_packager(tmp_path, definition, workloads, cuda_solution, config)
262 with pytest.raises(FileNotFoundError, match="benchmark_kernel.so"):
263 pkg.execute()
264
265 def test_succeeds_with_so_for_cpp(
266 self, tmp_path, definition, workloads, cuda_solution, config
267 ):
268 pkg = _make_packager(tmp_path, definition, workloads, cuda_solution, config)
269 # Simulate a compiled artifact.
270 (pkg.output_dir / "benchmark_kernel.so").write_bytes(b"\x00")
271 cmd = pkg.execute()
272 assert cmd == ["python", "eval_driver.py"]
273
274
275# ── convert_stdout_to_traces() ────────────────────────────────────────────────

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected