Skip to content

Logs are unavailable when running tests from the Test Explorer #3140

Description

Brief Issue Summary

Hi! The new Test Explorer integration is great, but... when tests fail, it's hard or impossible to get at the output from the failed test.

On my first run, a Terminal window was opened that was showing test output. But all the tests seem to be writing to it in parallel, so all the outputs were garbled.

On subsequent runs, that Terminal window was no longer updated (no output was shown for the newer runs).

On the Output window, it still showed the log of which tests were being launched (not their output). At the end of the run, it used to say "[ctest] Output from these tests are in: /Testing/Temporary/LastTest.log", and clicking on this file would load nothing at all (just three lines, showing nothing more that the entire test run start/stop times). The full test logs then could be found in a different file in the same directory that included date and time, like for instance "LastTest_20230425-2240.log".

That Output window behavior was... before. Now, the "LastTest_20230425-2240.log" only includes the output from the last test run. I think each test that runs is overwriting the previous test's output (from the same run). So the output is being lost.

Please:

  • Preserve the output of all the tests that run.
  • Provide a way from the Test Explorer to open the log of a particular test. Especially from failed tests.
  • Figure out what's happening to the Terminal window:
    • Why it seems to stop receiving output, and...
    • Why the output form all the tests are being mixed together there.

Thanx!

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.77.3",
  "cmtVersion": "1.14.30",
  "configurations": [
    {
      "folder": "x:\\TTD4\\CoreTtd.Tests",
      "cmakeVersion": "3.20.5",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": true,
      "compilers": {
        "C": "clang-cl.exe",
        "CXX": "clang-cl.exe"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "RelWithDebInfo",
    "buildTypesSeen": [
      "RelWithDebInfo"
    ],
    "requests": [
      "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/TestX87Registers/Main.cpp",
      "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/AVXTest/Source.cpp",
      "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/AVXTest/AVXTest.cpp",
      "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/AVXTest/AVX2Test.cpp",
      "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/TestAVX2Vgather/Source.cpp",
      "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/TestFullCacheLineAccess/TestFullCacheLineAccess.cpp"
    ],
    "responses": [
      {
        "uri": "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/TestX87Registers/Main.cpp",
        "configuration": {
          "includePath": [
            "x:/ttd4/corettd.tests/src/testcommon/inc",
            "x:/ttd4/corettd.tests/build/x64-checked-clang/src/testcommon/geninc"
          ],
          "defines": [
            "DBG",
            "TAEF_NO_STD_FORMAT",
            "TTD_COMPILER_TOOLCHAIN_CLANG",
            "TTD_INTERNAL_TEAM_USE_ONLY",
            "UNDOCKED_WINDOWS_UCRT",
            "UNICODE",
            "WIL_SUPPRESS_PRIVATE_API_USE",
            "_UNICODE"
          ],
          "compilerPath": "c:/program files/microsoft visual studio/2022/preview/vc/tools/llvm/x64/bin/clang-cl.exe",
          "compilerArgs": [],
          "compilerFragments": [
            " --target=x86_64-pc-windows -MT",
            "/EHsc",
            "/Oxs",
            "/Ob2",
            "/Oy-",
            "/Brepro",
            "/Z7",
            "/d2Zi+",
            "/Zl",
            "/Zp8",
            "/GF",
            "/ZH:SHA_256",
            "/FC",
            "/bigobj",
            "/W4",
            "/WX",
            "/GR-",
            "/Gw",
            "/Gy",
            "/wd4324",
            "/wd4499",
            "/D_SILENCE_CLANG_COROUTINE_MESSAGE",
            "-mcx16",
            "-ferror-limit=100",
            "-Wno-assume",
            "-Wno-deprecated-declarations",
            "-Wno-ignored-attributes",
            "-Wno-invalid-offsetof",
            "-Wno-microsoft-include",
            "-Wno-microsoft-cast",
            "-Wno-missing-field-initializers",
            "-Wno-typename-missing",
            "-Wno-unused-variable",
            "-std:c++20"
          ]
        }
      },
      {
        "uri": "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/AVXTest/Source.cpp",
        "configuration": {
          "includePath": [
            "x:/ttd4/corettd.tests/src/testcommon/inc",
            "x:/ttd4/corettd.tests/build/x64-checked-clang/src/testcommon/geninc"
          ],
          "defines": [
            "DBG",
            "TAEF_NO_STD_FORMAT",
            "TTD_COMPILER_TOOLCHAIN_CLANG",
            "TTD_INTERNAL_TEAM_USE_ONLY",
            "UNDOCKED_WINDOWS_UCRT",
            "UNICODE",
            "WIL_SUPPRESS_PRIVATE_API_USE",
            "_UNICODE"
          ],
          "compilerPath": "c:/program files/microsoft visual studio/2022/preview/vc/tools/llvm/x64/bin/clang-cl.exe",
          "compilerArgs": [],
          "compilerFragments": [
            " --target=x86_64-pc-windows -MT",
            "/EHsc",
            "/Oxs",
            "/Ob2",
            "/Oy-",
            "/Brepro",
            "/Z7",
            "/d2Zi+",
            "/Zl",
            "/Zp8",
            "/GF",
            "/ZH:SHA_256",
            "/FC",
            "/bigobj",
            "/W4",
            "/WX",
            "/GR-",
            "/Gw",
            "/Gy",
            "/wd4324",
            "/wd4499",
            "/D_SILENCE_CLANG_COROUTINE_MESSAGE",
            "-mcx16",
            "-ferror-limit=100",
            "-Wno-assume",
            "-Wno-deprecated-declarations",
            "-Wno-ignored-attributes",
            "-Wno-invalid-offsetof",
            "-Wno-microsoft-include",
            "-Wno-microsoft-cast",
            "-Wno-missing-field-initializers",
            "-Wno-typename-missing",
            "-Wno-unused-variable",
            "-std:c++20"
          ]
        }
      },
      {
        "uri": "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/AVXTest/AVXTest.cpp",
        "configuration": {
          "includePath": [
            "x:/ttd4/corettd.tests/src/testcommon/inc",
            "x:/ttd4/corettd.tests/build/x64-checked-clang/src/testcommon/geninc"
          ],
          "defines": [
            "DBG",
            "TAEF_NO_STD_FORMAT",
            "TTD_COMPILER_TOOLCHAIN_CLANG",
            "TTD_INTERNAL_TEAM_USE_ONLY",
            "UNDOCKED_WINDOWS_UCRT",
            "UNICODE",
            "WIL_SUPPRESS_PRIVATE_API_USE",
            "_UNICODE"
          ],
          "compilerPath": "c:/program files/microsoft visual studio/2022/preview/vc/tools/llvm/x64/bin/clang-cl.exe",
          "compilerArgs": [],
          "compilerFragments": [
            " --target=x86_64-pc-windows -MT",
            "/EHsc",
            "/Oxs",
            "/Ob2",
            "/Oy-",
            "/Brepro",
            "/Z7",
            "/d2Zi+",
            "/Zl",
            "/Zp8",
            "/GF",
            "/ZH:SHA_256",
            "/FC",
            "/bigobj",
            "/W4",
            "/WX",
            "/GR-",
            "/Gw",
            "/Gy",
            "/wd4324",
            "/wd4499",
            "/D_SILENCE_CLANG_COROUTINE_MESSAGE",
            "-mcx16",
            "-ferror-limit=100",
            "-Wno-assume",
            "-Wno-deprecated-declarations",
            "-Wno-ignored-attributes",
            "-Wno-invalid-offsetof",
            "-Wno-microsoft-include",
            "-Wno-microsoft-cast",
            "-Wno-missing-field-initializers",
            "-Wno-typename-missing",
            "-Wno-unused-variable",
            "-std:c++20",
            "-arch:AVX"
          ]
        }
      },
      {
        "uri": "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/AVXTest/AVX2Test.cpp",
        "configuration": {
          "includePath": [
            "x:/ttd4/corettd.tests/src/testcommon/inc",
            "x:/ttd4/corettd.tests/build/x64-checked-clang/src/testcommon/geninc"
          ],
          "defines": [
            "DBG",
            "TAEF_NO_STD_FORMAT",
            "TTD_COMPILER_TOOLCHAIN_CLANG",
            "TTD_INTERNAL_TEAM_USE_ONLY",
            "UNDOCKED_WINDOWS_UCRT",
            "UNICODE",
            "WIL_SUPPRESS_PRIVATE_API_USE",
            "_UNICODE"
          ],
          "compilerPath": "c:/program files/microsoft visual studio/2022/preview/vc/tools/llvm/x64/bin/clang-cl.exe",
          "compilerArgs": [],
          "compilerFragments": [
            " --target=x86_64-pc-windows -MT",
            "/EHsc",
            "/Oxs",
            "/Ob2",
            "/Oy-",
            "/Brepro",
            "/Z7",
            "/d2Zi+",
            "/Zl",
            "/Zp8",
            "/GF",
            "/ZH:SHA_256",
            "/FC",
            "/bigobj",
            "/W4",
            "/WX",
            "/GR-",
            "/Gw",
            "/Gy",
            "/wd4324",
            "/wd4499",
            "/D_SILENCE_CLANG_COROUTINE_MESSAGE",
            "-mcx16",
            "-ferror-limit=100",
            "-Wno-assume",
            "-Wno-deprecated-declarations",
            "-Wno-ignored-attributes",
            "-Wno-invalid-offsetof",
            "-Wno-microsoft-include",
            "-Wno-microsoft-cast",
            "-Wno-missing-field-initializers",
            "-Wno-typename-missing",
            "-Wno-unused-variable",
            "-std:c++20",
            "-arch:AVX2"
          ]
        }
      },
      {
        "uri": "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/TestAVX2Vgather/Source.cpp",
        "configuration": {
          "includePath": [
            "x:/ttd4/corettd.tests/src/testcommon/inc",
            "x:/ttd4/corettd.tests/build/x64-checked-clang/src/testcommon/geninc"
          ],
          "defines": [
            "DBG",
            "TAEF_NO_STD_FORMAT",
            "TTD_COMPILER_TOOLCHAIN_CLANG",
            "TTD_INTERNAL_TEAM_USE_ONLY",
            "UNDOCKED_WINDOWS_UCRT",
            "UNICODE",
            "WIL_SUPPRESS_PRIVATE_API_USE",
            "_UNICODE"
          ],
          "compilerPath": "c:/program files/microsoft visual studio/2022/preview/vc/tools/llvm/x64/bin/clang-cl.exe",
          "compilerArgs": [],
          "compilerFragments": [
            " --target=x86_64-pc-windows -MT",
            "-arch:AVX2",
            "/EHsc",
            "/Oxs",
            "/Ob2",
            "/Oy-",
            "/Brepro",
            "/Z7",
            "/d2Zi+",
            "/Zl",
            "/Zp8",
            "/GF",
            "/ZH:SHA_256",
            "/FC",
            "/bigobj",
            "/W4",
            "/WX",
            "/GR-",
            "/Gw",
            "/Gy",
            "/wd4324",
            "/wd4499",
            "/D_SILENCE_CLANG_COROUTINE_MESSAGE",
            "-mcx16",
            "-ferror-limit=100",
            "-Wno-assume",
            "-Wno-deprecated-declarations",
            "-Wno-ignored-attributes",
            "-Wno-invalid-offsetof",
            "-Wno-microsoft-include",
            "-Wno-microsoft-cast",
            "-Wno-missing-field-initializers",
            "-Wno-typename-missing",
            "-Wno-unused-variable",
            "-std:c++20"
          ]
        }
      },
      {
        "uri": "file:///x%3A/TTD4/CoreTtd.Tests/src/TestPrograms/TestFullCacheLineAccess/TestFullCacheLineAccess.cpp",
        "configuration": {
          "includePath": [],
          "defines": [
            "DBG",
            "TTD_COMPILER_TOOLCHAIN_CLANG",
            "TTD_INTERNAL_TEAM_USE_ONLY",
            "UNDOCKED_WINDOWS_UCRT",
            "UNICODE",
            "WIL_SUPPRESS_PRIVATE_API_USE",
            "_UNICODE"
          ],
          "compilerPath": "c:/program files/microsoft visual studio/2022/preview/vc/tools/llvm/x64/bin/clang-cl.exe",
          "compilerArgs": [],
          "compilerFragments": [
            " --target=x86_64-pc-windows -MT",
            "-arch:AVX",
            "/EHsc",
            "/Oxs",
            "/Ob2",
            "/Oy-",
            "/Brepro",
            "/Z7",
            "/d2Zi+",
            "/Zl",
            "/Zp8",
            "/GF",
            "/ZH:SHA_256",
            "/FC",
            "/bigobj",
            "/W4",
            "/WX",
            "/GR-",
            "/Gw",
            "/Gy",
            "/wd4324",
            "/wd4499",
            "/D_SILENCE_CLANG_COROUTINE_MESSAGE",
            "-mcx16",
            "-ferror-limit=100",
            "-Wno-assume",
            "-Wno-deprecated-declarations",
            "-Wno-ignored-attributes",
            "-Wno-invalid-offsetof",
            "-Wno-microsoft-include",
            "-Wno-microsoft-cast",
            "-Wno-missing-field-initializers",
            "-Wno-typename-missing",
            "-Wno-unused-variable",
            "-std:c++20"
          ]
        }
      }
    ],
    "partialMatches": [],
    "targetCount": 40,
    "executablesCount": 32,
    "librariesCount": 8,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

I can provide if needed.

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions