mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Inconsistent execution environments make using a path-as-define difficult, so switch to an embedded file. Also fixes the lldb launch so that passing tests run cleanly, and adds TEST_TARGET to gdb (but without testing there). I'm dropping `sourceMap` because it's not handled quite correctly (also not great to be trying to pass source mappings in two different ways), and `env` didn't seem to be working as intended either; maybe specifying `initCommands` causes other things to not be evaluated. But the straight `initCommands` looks like it's working. I used lldb to validate execution of these changes. ``` Running initCommands: (lldb) command script import external/+llvm_project+llvm-project/llvm/utils/lldbDataFormatters.py (lldb) settings set target.source-map "." "/usr/local/google/home/jperkins/dev/carbon-lang" (lldb) settings set target.source-map "/proc/self/cwd" "/usr/local/google/home/jperkins/dev/carbon-lang" (lldb) env TEST_TARGET=//toolchain/testing:file_test (lldb) env TEST_TMPDIR=/tmp Running tests with 128 thread(s) . Done! Note: Google Test filter = ToolchainFileTest.toolchain/check/testdata/const/collapse.carbon [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from ToolchainFileTest [ RUN ] ToolchainFileTest.toolchain/check/testdata/const/collapse.carbon [ OK ] ToolchainFileTest.toolchain/check/testdata/const/collapse.carbon (0 ms) [----------] 1 test from ToolchainFileTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (1 ms total) [ PASSED ] 1 test. Process 3869310 exited with status = 0 (0x00000000) ```