<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/137599>137599</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Many lldb-dap TestDAP_Launch.py tests fail on Windows due to get_stdout()
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            test-suite,
            lldb-dap
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          DavidSpickett
      </td>
    </tr>
</table>

<pre>
    For example: https://lab.llvm.org/buildbot/#/builders/141/builds/8271
```
FAIL: test_args (TestDAP_launch.TestDAP_launch.test_args)

    Tests launch of a simple program with arguments

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\tools\lldb-dap\launch\TestDAP_launch.py", line 245, in test_args

    self.assertTrue(output and len(output) > 0, "expect program output")

AssertionError: None is not true : expect program output

Config=aarch64-C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe

======================================================================

FAIL: test_cwd (TestDAP_launch.TestDAP_launch.test_cwd)

    Tests the default launch of a simple program with a current working

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\tools\lldb-dap\launch\TestDAP_launch.py", line 109, in test_cwd

    self.assertTrue(output and len(output) > 0, "expect program output")

AssertionError: None is not true : expect program output

Config=aarch64-C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe

======================================================================

FAIL: test_default (TestDAP_launch.TestDAP_launch.test_default)

    Tests the default launch of a simple program. No arguments,

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\tools\lldb-dap\launch\TestDAP_launch.py", line 26, in test_default

    self.assertTrue(output and len(output) > 0, "expect program output")

AssertionError: None is not true : expect program output

Config=aarch64-C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe

======================================================================

FAIL: test_environment_with_array (TestDAP_launch.TestDAP_launch.test_environment_with_array)

    Tests launch of a simple program with environment variables

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\tools\lldb-dap\launch\TestDAP_launch.py", line 304, in test_environment_with_array

    self.assertTrue(output and len(output) > 0, "expect program output")

AssertionError: None is not true : expect program output

Config=aarch64-C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe

======================================================================

FAIL: test_environment_with_object (TestDAP_launch.TestDAP_launch.test_environment_with_object)

    Tests launch of a simple program with environment variables

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\tools\lldb-dap\launch\TestDAP_launch.py", line 275, in test_environment_with_object

    self.assertTrue(output and len(output) > 0, "expect program output")

AssertionError: None is not true : expect program output

Config=aarch64-C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe

======================================================================

FAIL: test_shellExpandArguments_disabled (TestDAP_launch.TestDAP_launch.test_shellExpandArguments_disabled)

 Tests the default launch of a simple program with shell expansion

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\tools\lldb-dap\launch\TestDAP_launch.py", line 225, in test_shellExpandArguments_disabled

    self.assertTrue(output and len(output) > 0, "expect no program output")

AssertionError: None is not true : expect no program output

Config=aarch64-C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe
```
All these tests call `self.get_stdout()` which returns `None` despite the program printing output as expected:
```
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build>C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\lldb-test-build.noindex\tools\lldb-dap\launch\TestDAP_launch.test_default\a.out
arg[0] = "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\lldb-test-build.noindex\tools\lldb-dap\launch\TestDAP_launch.test_default\a.out"
env[0] = "ALLUSERSPROFILE=C:\ProgramData"
<...>
cwd = "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build"
```
I notice that all other tests using `self.get_stdout()` in other files have been skipped on Windows too.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsmV9vozgXxj-Nc3NURAyk4YILJn-kSn3nraYd7WVk8Al469jINkn77VeGkKbdbttpu3OxTRQpsbEPPs95fjEEZq2oFGJGkm8kmY9Y62ptsjnbCn7diPIWnRsVmt9nS20A79imkUiiHGrnGkuinNAloUvJikDK7SbQpiJ0WbRC8kK77mA0dKCxhC7H8Xjo8M0pPR-TMCeTcP8O82V-celP4dC6FTOVBUKnN2jdPL9aSdaqsg6eNA9DCU19tDAHAPCDLPRDQK-BgRV-_dAYXRm2gZ1wNTBTtRtUzvYTzz7l1ce6MazEgpW3PoONtg4MlqgclExKkMw6v94oH5a8FBKBUDrzfcnsp_WSJTNX7iqSzLzAZzttbtF0LV6cMWbKehKf7YTiemeHQY3Rf2Lp9qN8BLS-lV9d-IbW0g4ROGv8104jksye6NrcE0oJnYEUCoHGif8u1ENpHsS2KNcBsxaNuzEtEjrVrWtaB0xxkKgOHYSmQKIFhD4WoRTvGizdoSbDIHooZd4FFVotjNHGO-O7VgjCgtIOnGkRfOfzcboIM63WoiLRfNDrAwJ3zvWfQpFkVkqmqgDvsD8Rieb_tXeX1yMkyx1_I5Hljj8DpKsROK5ZK93rcELZGuOR8XURqjpB-gqk4zA9htSX4MTol2N04OttnO5Hv5vVAL7ro32Uzk6UvraVTo4hHfQ_gfrlQEW1FUYrD87K73grZgy7fyO3z09-xzXwUSDYMiNYIfF0PfwaxFEYH1P8D9U4QX2CWhfef--lup99wvp37c3nyYtY78tx4vrLcW1rlHJx1zDF8-Fqd8WF9Vy99Z74xRgPjP_6rXIX2HuBKSu0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