https://github.com/AlexK0 updated https://github.com/llvm/llvm-project/pull/131600
>From 2186582c6113033a7adf2c3ac7fb1a6fcde5726c Mon Sep 17 00:00:00 2001 From: Aleksandr Korepanov <alexander.korepa...@jetbrains.com> Date: Mon, 17 Mar 2025 11:03:57 +0100 Subject: [PATCH 1/2] [LLDB][tests] Transfer APPDATA env for running tests On Windows without APPDATA environment variable, the test framework cannot import the 'packaging' module. --- lldb/test/API/lit.cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py index 08cf11c8a68db..4336a89d57c5f 100644 --- a/lldb/test/API/lit.cfg.py +++ b/lldb/test/API/lit.cfg.py @@ -343,6 +343,6 @@ def delete_module_cache(path): # Transfer some environment variables into the tests on Windows build host. if platform.system() == "Windows": - for v in ["SystemDrive"]: + for v in ["SystemDrive", "APPDATA"]: if v in os.environ: config.environment[v] = os.environ[v] >From cc68d4a639d7cd3bdd783f91ce51824fc1c03ab6 Mon Sep 17 00:00:00 2001 From: Aleksandr Korepanov <alexander.korepa...@jetbrains.com> Date: Mon, 17 Mar 2025 11:06:46 +0100 Subject: [PATCH 2/2] [LLDB][tests] Fix tests for Windows - On Windows there is different error message on setting watchpoint. - Use 'test -d' to check for a directory instead of 'file' because Windows does not have the 'file' utility. --- .../watchpoint/watchlocation/TestTargetWatchAddress.py | 6 +++--- lldb/test/Shell/Diagnostics/TestDump.test | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index 7a0e42a4fc278..bc9680583a29c 100644 --- a/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -201,8 +201,8 @@ def test_watch_address_with_invalid_watch_size(self): value.GetValueAsUnsigned(), 365, wp_opts, error ) self.assertFalse(watchpoint) - self.expect( + # The message depends on whether the lldb-server implementation or the in-process implementation is used. + self.assertRegex( error.GetCString(), - exe=False, - substrs=["Setting one of the watchpoint resources failed"], + "Can't enable watchpoint|Setting one of the watchpoint resources failed", ) diff --git a/lldb/test/Shell/Diagnostics/TestDump.test b/lldb/test/Shell/Diagnostics/TestDump.test index 2adde6b86d35a..cf10991d51c35 100644 --- a/lldb/test/Shell/Diagnostics/TestDump.test +++ b/lldb/test/Shell/Diagnostics/TestDump.test @@ -5,11 +5,11 @@ # RUN: rm -rf %t.existing # RUN: mkdir -p %t.existing # RUN: %lldb -o 'diagnostics dump -d %t.existing' -# RUN: file %t.existing | FileCheck %s +# RUN: test -d %t.existing # Dump to a non-existing directory. # RUN: rm -rf %t.nonexisting # RUN: %lldb -o 'diagnostics dump -d %t.nonexisting' -# RUN: file %t.nonexisting | FileCheck %s +# RUN: test -d %t.nonexisting # CHECK: directory _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits