MCPcopy Create free account
hub / github.com/FastLED/FastLED / _make_direct_test_env

Function _make_direct_test_env

ci/meson/sequential_runner.py:335–357  ·  view source on GitHub ↗

Build env for the direct test subprocess (PATH/LD_LIBRARY_PATH + ASAN).

(
    source_dir: Path, build_dir: Path, build_mode: str
)

Source from the content-addressed store, hash-verified

333
334
335def _make_direct_test_env(
336 source_dir: Path, build_dir: Path, build_mode: str
337) -> dict[str, str]:
338 """Build env for the direct test subprocess (PATH/LD_LIBRARY_PATH + ASAN)."""
339 test_env = os.environ.copy()
340 fastled_lib_dir = str(build_dir / "ci" / "meson" / "native")
341 if os.name == "nt":
342 from clang_tool_chain import get_runtime_dll_paths
343
344 extra = os.pathsep.join([fastled_lib_dir] + get_runtime_dll_paths())
345 test_env["PATH"] = extra + os.pathsep + test_env.get("PATH", "")
346 else:
347 test_env["LD_LIBRARY_PATH"] = (
348 fastled_lib_dir + os.pathsep + test_env.get("LD_LIBRARY_PATH", "")
349 )
350 if "FASTLED_TEST_TIMEOUT" not in test_env:
351 test_env["FASTLED_TEST_TIMEOUT"] = "60"
352 # ASAN's vectored exception handler conflicts with our crash handler on Windows.
353 if build_mode == "debug" and os.name == "nt":
354 test_env["FASTLED_DISABLE_CRASH_HANDLER"] = "1"
355 # source_dir intentionally unused — kept for signature symmetry
356 _ = source_dir
357 return test_env
358
359
360def _print_direct_test_failure(

Callers 1

run_direct_testFunction · 0.85

Calls 2

copyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected