MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / run_command

Function run_command

cpp/tests/resources/scripts/build_engines_utils.py:24–35  ·  view source on GitHub ↗
(command: _tp.Sequence[str],
                *,
                cwd=None,
                timeout=None,
                **kwargs)

Source from the content-addressed store, hash-verified

22
23
24def run_command(command: _tp.Sequence[str],
25 *,
26 cwd=None,
27 timeout=None,
28 **kwargs) -> None:
29 _log.info("Running: cd %s && %s", str(cwd), " ".join(command))
30 override_timeout = int(_os.environ.get("CPP_TEST_TIMEOUT_OVERRIDDEN", "-1"))
31 if override_timeout > 0 and (timeout is None or override_timeout > timeout):
32 _log.info("Overriding the command timeout: %s (before) and %s (after)",
33 timeout, override_timeout)
34 timeout = override_timeout
35 _sp.check_call(command, cwd=cwd, timeout=timeout, **kwargs)
36
37
38# We can't use run_command() because robocopy (Robust Copy, rsync equivalent on Windows)

Callers 15

build_engineFunction · 0.90
build_enginesFunction · 0.90
build_engineFunction · 0.90
build_enginesFunction · 0.90
build_engineFunction · 0.90
build_enginesFunction · 0.90
build_engineFunction · 0.90
build_enginesFunction · 0.90
convert_ckptFunction · 0.90
build_engineFunction · 0.90
build_enginesFunction · 0.90
build_engineFunction · 0.90

Calls 2

infoMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected